Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site Editor: Remove/Deprecate edited post type and edited context state. #66921

Closed
youknowriad opened this issue Nov 12, 2024 · 1 comment
Closed
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Type] Code Quality Issues or PRs that relate to code quality

Comments

@youknowriad
Copy link
Contributor

As the site editor is growing to become a multi page app, it doesn't really make sense to have an edited post type and context state in it.
That state is forcing us today to have a two synchronization mechanism between the url and the state causing some issues related to performance and some hidden bugs at times.

Ideally the routes would just pass the post type, post id to the editor component.

That said, in order to do that, we need to refactor the existing components and hooks to avoid using these selectors:

  • getEditedPostType
  • getEditedPostId
  • getEditedContext
  • getEditedPostContext

This issue just tracks this work.

@youknowriad
Copy link
Contributor Author

This is not entirely complete. My hope was to move the selector calls to the routes directly rather than having the Editor component "resolve" the entity.

That said, this doesn't seem to be possible at the moment without losing some nice transitions animates (for instance when moving from the root of the site editor to the styles page). So I'm going to close this issue for now, Good progress has been made already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

No branches or pull requests

1 participant