Ability to rename pages in site editor without title block#54648
Ability to rename pages in site editor without title block#54648
Conversation
|
Size Change: +7.84 kB (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 596a524. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6255636143
|
| useDispatch( noticesStore ); | ||
|
|
||
| if ( template.type === TEMPLATE_POST_TYPE && ! template.is_custom ) { | ||
| if ( item.type === 'wp_template' && ! item.is_custom ) { |
There was a problem hiding this comment.
Why are we not using the TEMPLATE_POST_TYPE const anymore?
| isDestructive | ||
| variant="secondary" | ||
| > | ||
| <MenuItem onClick={ () => removePage() } isDestructive> |
There was a problem hiding this comment.
Is this change meant to be part of this PR? I didn't see it mentioned in the description...
| import EditPageMenuItem from '../rename-menu-item'; | ||
|
|
||
| export default function PageActions( { postId, toggleProps, onRemove } ) { | ||
| export default function PageActions( { post, toggleProps, onRemove } ) { |
There was a problem hiding this comment.
Is there a reason to change this prop? If possible its always better to pass simpler props as it prevents unnecessary rerenders in the component.
| }; | ||
| }, [] ); | ||
|
|
||
| const { id, type, status, date, password, title, modified } = page; |
There was a problem hiding this comment.
nice! We just need to make sure that if page doesn't exist this doesn't throw any errors.
|
This is a nice PR, and adds a nice added affordance. @jameskoster we should be able to fit this into the new summary card, no? Needs a rebase, but would be good to land! 🚀 |
|
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. |
|
It proved easiest (at least for me) to create a fresh PR off trunk for this. The alternative is up in #60232 so I'll close this once for now. |

What?
Adds ability to rename pages when in site editor when no post title block exists in template. This PR also adds rename menu item to templates as well to be consistent.
Why?
#52763
How?
Updates existing rename menu item component for templates to be used for any post type.
Testing Instructions