Repository navigation
Site Editor: Add New - Custom/General template - #42127
jorgefilipecosta merged 1 commit into
Conversation
|
This is looking good and working well. My one small piece of feedback is that the the description appearing both on the menuitem, and in the modal feels a bit repetitive. I think we can remove it from the modal like so: I acknowledge that some context will be lost in the post editor, but now that we can create templates for single entities we need to revisit that UX anyway (#41257). |
| ); | ||
| } ) } | ||
| </MenuGroup> | ||
| <MenuItem |
There was a problem hiding this comment.
Should we append this to the existing MenuGroup? Should we add in a separate one? 🤔 Right now there is more space from the other items due to that..
There was a problem hiding this comment.
Nice catch I missed wrapping the item in a group. We want a new group so we have a divider.
|
|
||
| setIsBusy( true ); | ||
|
|
||
| await createTemplate( |
There was a problem hiding this comment.
I don't think we need to await and close the modal here, as the passed createTemplate will navigate to a different page after creation and unmount this component.
3faa4df to
35451ea
Compare
35451ea to
1a89e8e
Compare
jorgefilipecosta
left a comment
There was a problem hiding this comment.
Hi @ntsekouras, @jameskoster thank you for the reviews. Your feedback was applied!
|
Size Change: +367 B (0%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
jameskoster
left a comment
There was a problem hiding this comment.
Thanks for the design tweak @jorgefilipecosta.
It's somewhat tangential and doesn't need to hold up this PR but I'd love to hear thoughts from @WordPress/gutenberg-design and/or the copy review team on the input helper text:
On reflection I'm not sure that "purpose" is the correct wording, and whether there might be a better example than "full width". Perhaps it should just be:
Describe the template, e.g. "Post with sidebar"
|
Hi @jameskoster, I like |
|
@jorgefilipecosta sounds good, let's open a PR and get the wording right therein :) |


This PR adds an option to create a generic template on the site editor. The generic template can be used on any post or page.
Closes: #36860
Part of: #37407
No UI is created, we are using the same modal that already exists on the edit post.
cc: @jameskoster in case you have any design insights.
The template is created in a blank content state for now like what happens for all the other templates.