-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: Allow editing custom template title #36933
Conversation
> | ||
{ title } | ||
</Heading> | ||
{ template.is_custom ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I extract this into the custom util method, similar to isTemplateRevertable
and isTemplateRemovable
?
Size Change: +131 B (0%) Total Size: 1.1 MB
ℹ️ View Unchanged
|
I'm not sure if this is the right place to place a text input to. It isn't a form and might have accessibility concerns if not careful. Could it be possible to implement this in the template sidebar instead? @jameskoster WDYT? Edit: Oh I see it's mentioned in the original issue now. NVM |
350ef42
to
3f2f423
Compare
Just to clarify for anyone reading this after-the-fact: custom templates can already be renamed in the post editor: We're migrating that UX to the site editor for now, and will make this (and other template meta) editable in the Inspector later. |
Added fallback to slug logic as we discussed here - #36947 (comment) |
a03db96
to
ff817bb
Compare
@jameskoster, should we merge this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup it works for me.
* Site Editor: Allow editing custom template title * Fallback to slug
Description
PR adds a way to edit custom template titles in the Site Editor. UI matches edit title component from Template Mode.
Note: Currently, you can only edit user-created template titles that aren't in the WP template hierarchy - e.g., Index, Single, etc.
Closes #36773.
How has this been tested?
TextControl
to edit the template title.Screenshots
Types of changes
Enhancement
Checklist:
*.native.js
files for terms that need renaming or removal).