-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: Add rename page command #60231
base: trunk
Are you sure you want to change the base?
Conversation
Size Change: +305 B (0%) Total Size: 1.73 MB
ℹ️ View Unchanged
|
There are still a couple of edge cases here that I'm in the process of addressing, e.g. the command isn't working with table dataview. I'll be AFK until the middle of next week but will pick this up again as soon as I'm back. |
e9e2028
to
d7823cb
Compare
The non-list dataviews (grid and table) don't render the |
Looks like there's been some refactoring merged in trunk moving the actions to the editor package. I'll keep this in draft status until I get a chance to update this PR accordingly to resolve conflicts. |
Remove isEligible
The page command modals are normally added to the Editor component however with the new dataviews layouts including grid and table, the Editor isn't rendered so without this misses out on the modal.
f03fe87
to
735d970
Compare
This should be ready for some feedback now 🙏 In particular, it would be great to get some thoughts on better approaches to ensuring the command modal can be displayed regardless of whether we have the Editor preview or only DataViews with a non-list list layout e.g. grid or table view. |
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was some feedback on the addition of rename and trash options to the page panel that features should be added to either both editors or none. As a result, this PR might need some further tweaks. |
Related:
What?
Adds a command to the site editor for easier renaming of pages
Why?
If a page doesn't include a Title block there is no easy way to update the page while editing it within the site editor.
How?
PageModal
component is currently added to both thePagePages
component and the site editor'sEditor
to cover when the command is used while editing a page or on its details nav screen as well as when the entire page is a dataview only e.g. with the grid or table layouts.Open to suggestions on a better approach to that last point!
Known Issue
With DataView layouts that appear alongside an editor, notices are shown in two snackbar lists. There is an open issue for this (#60457) so it will be addressed separately.
Testing Instructions
Screenshots or screencast
Screen.Recording.2024-03-27.at.2.39.36.PM.mp4