-
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
Update the appearance of the template details popover #32042
Conversation
Size Change: +113 B (0%) Total Size: 1.03 MB
ℹ️ View Unchanged
|
@@ -40,6 +40,9 @@ export default function EditTemplateTitle() { | |||
<TextControl | |||
label={ __( 'Title' ) } | |||
value={ templateTitle } | |||
help={ __( | |||
'Give the template a title that indicates its purpose, e.g. "Full Width"' |
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.
Period at the end?
margin-right: - $grid-unit-15; | ||
padding: $grid-unit-15; | ||
padding-bottom: 0; | ||
border-top: 1px solid $gray-300; |
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.
Nitpick, can be $border-width
} | ||
|
||
.edit-post-template-top-area__second-menu-group { | ||
margin-left: - $grid-unit-15; |
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.
Oh interesting with the space after the minus! I'd usually do -$grid-unit-15 for negative numbers. Not really something that needs fixing, just stood out.
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.
I've had issues with not putting a space in the past, so put one in habitually now. I'll check if it's actually needed though.
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.
I assume it's fine, just looking at the code here while I'm rebooting my environment testing your other PR.
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.
* Update the appearance of the template details popover * Tweaks * use secondary variant for delete button
* Update the appearance of the template details popover * Tweaks * use secondary variant for delete button
This includes the following fixes: Widgets Editor: - Load widgets.php WordPress/gutenberg#32299 - Fix Legacy Widget Preview WordPress/gutenberg#32300 - Fix error when saving empty Legacy Widget block WordPress/gutenberg#32359 Widget blocks in the customizer: - Fix deselection blocks when the inspector is open WordPress/gutenberg#32361 - Display wide widgets as popovers WordPress/gutenberg#31736 Global Styles: - Align classNames generation between client and server WordPress/gutenberg#32352 - Group typography block supports WordPress/gutenberg#32252 WordPress/gutenberg#32444 WordPress/gutenberg#32459 - Make theme.json syntax errors more visible to the users WordPress/gutenberg#32404 Template Editor: - Update the appearance of the template details WordPress/gutenberg#32042 - Fix layout definition WordPress/gutenberg#32425 - Fix grouping post content block WordPress/gutenberg#32453 Miscellaneous: - Prevent saving when the post is locked WordPress/gutenberg#32341 - Fix allowed block patterns selector WordPress/gutenberg#32376 - Fix wrong results in the Post Author picker WordPress/gutenberg#32344 - Fix notices position in top toolbar mode WordPress/gutenberg#32238 - Allow non-latin characters in post slugs WordPress/gutenberg#32232 - Fix Random collapse of the color settings panel WordPress/gutenberg#32388 - Fix theme logo theme mode not being removed on theme removal WordPress/gutenberg#32370 - Fix block alignment styles in the editor WordPress/gutenberg#32454 - Fix some block toolbar overlaps WordPress/gutenberg#32424 - Fix content loss when switching list types WordPress/gutenberg#32432 Performance: - Improve the performance of buttons block WordPress/gutenberg#32356 - Improve the performance of the container blocks WordPress/gutenberg#32380 Props noisysocks, nosolosw, jorgefilipecosta. See #52991. git-svn-id: https://develop.svn.wordpress.org/trunk@51089 602fd350-edb4-49c9-b593-d223f7449a82
This includes the following fixes: Widgets Editor: - Load widgets.php WordPress/gutenberg#32299 - Fix Legacy Widget Preview WordPress/gutenberg#32300 - Fix error when saving empty Legacy Widget block WordPress/gutenberg#32359 Widget blocks in the customizer: - Fix deselection blocks when the inspector is open WordPress/gutenberg#32361 - Display wide widgets as popovers WordPress/gutenberg#31736 Global Styles: - Align classNames generation between client and server WordPress/gutenberg#32352 - Group typography block supports WordPress/gutenberg#32252 WordPress/gutenberg#32444 WordPress/gutenberg#32459 - Make theme.json syntax errors more visible to the users WordPress/gutenberg#32404 Template Editor: - Update the appearance of the template details WordPress/gutenberg#32042 - Fix layout definition WordPress/gutenberg#32425 - Fix grouping post content block WordPress/gutenberg#32453 Miscellaneous: - Prevent saving when the post is locked WordPress/gutenberg#32341 - Fix allowed block patterns selector WordPress/gutenberg#32376 - Fix wrong results in the Post Author picker WordPress/gutenberg#32344 - Fix notices position in top toolbar mode WordPress/gutenberg#32238 - Allow non-latin characters in post slugs WordPress/gutenberg#32232 - Fix Random collapse of the color settings panel WordPress/gutenberg#32388 - Fix theme logo theme mode not being removed on theme removal WordPress/gutenberg#32370 - Fix block alignment styles in the editor WordPress/gutenberg#32454 - Fix some block toolbar overlaps WordPress/gutenberg#32424 - Fix content loss when switching list types WordPress/gutenberg#32432 Performance: - Improve the performance of buttons block WordPress/gutenberg#32356 - Improve the performance of the container blocks WordPress/gutenberg#32380 Props noisysocks, nosolosw, jorgefilipecosta. See #52991. git-svn-id: https://develop.svn.wordpress.org/trunk@51089 602fd350-edb4-49c9-b593-d223f7449a82
This includes the following fixes: Widgets Editor: - Load widgets.php WordPress/gutenberg#32299 - Fix Legacy Widget Preview WordPress/gutenberg#32300 - Fix error when saving empty Legacy Widget block WordPress/gutenberg#32359 Widget blocks in the customizer: - Fix deselection blocks when the inspector is open WordPress/gutenberg#32361 - Display wide widgets as popovers WordPress/gutenberg#31736 Global Styles: - Align classNames generation between client and server WordPress/gutenberg#32352 - Group typography block supports WordPress/gutenberg#32252 WordPress/gutenberg#32444 WordPress/gutenberg#32459 - Make theme.json syntax errors more visible to the users WordPress/gutenberg#32404 Template Editor: - Update the appearance of the template details WordPress/gutenberg#32042 - Fix layout definition WordPress/gutenberg#32425 - Fix grouping post content block WordPress/gutenberg#32453 Miscellaneous: - Prevent saving when the post is locked WordPress/gutenberg#32341 - Fix allowed block patterns selector WordPress/gutenberg#32376 - Fix wrong results in the Post Author picker WordPress/gutenberg#32344 - Fix notices position in top toolbar mode WordPress/gutenberg#32238 - Allow non-latin characters in post slugs WordPress/gutenberg#32232 - Fix Random collapse of the color settings panel WordPress/gutenberg#32388 - Fix theme logo theme mode not being removed on theme removal WordPress/gutenberg#32370 - Fix block alignment styles in the editor WordPress/gutenberg#32454 - Fix some block toolbar overlaps WordPress/gutenberg#32424 - Fix content loss when switching list types WordPress/gutenberg#32432 Performance: - Improve the performance of buttons block WordPress/gutenberg#32356 - Improve the performance of the container blocks WordPress/gutenberg#32380 Props noisysocks, nosolosw, jorgefilipecosta. See #52991. Built from https://develop.svn.wordpress.org/trunk@51089 git-svn-id: http://core.svn.wordpress.org/trunk@50698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This includes the following fixes: Widgets Editor: - Load widgets.php WordPress/gutenberg#32299 - Fix Legacy Widget Preview WordPress/gutenberg#32300 - Fix error when saving empty Legacy Widget block WordPress/gutenberg#32359 Widget blocks in the customizer: - Fix deselection blocks when the inspector is open WordPress/gutenberg#32361 - Display wide widgets as popovers WordPress/gutenberg#31736 Global Styles: - Align classNames generation between client and server WordPress/gutenberg#32352 - Group typography block supports WordPress/gutenberg#32252 WordPress/gutenberg#32444 WordPress/gutenberg#32459 - Make theme.json syntax errors more visible to the users WordPress/gutenberg#32404 Template Editor: - Update the appearance of the template details WordPress/gutenberg#32042 - Fix layout definition WordPress/gutenberg#32425 - Fix grouping post content block WordPress/gutenberg#32453 Miscellaneous: - Prevent saving when the post is locked WordPress/gutenberg#32341 - Fix allowed block patterns selector WordPress/gutenberg#32376 - Fix wrong results in the Post Author picker WordPress/gutenberg#32344 - Fix notices position in top toolbar mode WordPress/gutenberg#32238 - Allow non-latin characters in post slugs WordPress/gutenberg#32232 - Fix Random collapse of the color settings panel WordPress/gutenberg#32388 - Fix theme logo theme mode not being removed on theme removal WordPress/gutenberg#32370 - Fix block alignment styles in the editor WordPress/gutenberg#32454 - Fix some block toolbar overlaps WordPress/gutenberg#32424 - Fix content loss when switching list types WordPress/gutenberg#32432 Performance: - Improve the performance of buttons block WordPress/gutenberg#32356 - Improve the performance of the container blocks WordPress/gutenberg#32380 Props noisysocks, nosolosw, jorgefilipecosta. See #52991. Built from https://develop.svn.wordpress.org/trunk@51089 git-svn-id: https://core.svn.wordpress.org/trunk@50698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This includes the following fixes: Widgets Editor: - Load widgets.php WordPress/gutenberg#32299 - Fix Legacy Widget Preview WordPress/gutenberg#32300 - Fix error when saving empty Legacy Widget block WordPress/gutenberg#32359 Widget blocks in the customizer: - Fix deselection blocks when the inspector is open WordPress/gutenberg#32361 - Display wide widgets as popovers WordPress/gutenberg#31736 Global Styles: - Align classNames generation between client and server WordPress/gutenberg#32352 - Group typography block supports WordPress/gutenberg#32252 WordPress/gutenberg#32444 WordPress/gutenberg#32459 - Make theme.json syntax errors more visible to the users WordPress/gutenberg#32404 Template Editor: - Update the appearance of the template details WordPress/gutenberg#32042 - Fix layout definition WordPress/gutenberg#32425 - Fix grouping post content block WordPress/gutenberg#32453 Miscellaneous: - Prevent saving when the post is locked WordPress/gutenberg#32341 - Fix allowed block patterns selector WordPress/gutenberg#32376 - Fix wrong results in the Post Author picker WordPress/gutenberg#32344 - Fix notices position in top toolbar mode WordPress/gutenberg#32238 - Allow non-latin characters in post slugs WordPress/gutenberg#32232 - Fix Random collapse of the color settings panel WordPress/gutenberg#32388 - Fix theme logo theme mode not being removed on theme removal WordPress/gutenberg#32370 - Fix block alignment styles in the editor WordPress/gutenberg#32454 - Fix some block toolbar overlaps WordPress/gutenberg#32424 - Fix content loss when switching list types WordPress/gutenberg#32432 Performance: - Improve the performance of buttons block WordPress/gutenberg#32356 - Improve the performance of the container blocks WordPress/gutenberg#32380 Props noisysocks, nosolosw, jorgefilipecosta. See #52991. Built from https://develop.svn.wordpress.org/trunk@51089 git-svn-id: http://core.svn.wordpress.org/trunk@50698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
A quick question. I no longer see the delete template option. Is there a new way to delete it now? Thanks in advance! |
That'd make sense, but the thing is, I don't see the three-dots menu either. That feels familiar, but I haven't seen it for a while. For example, I don't see them on the site TT2 (or TT3) is activated. What am I missing? |
Adding more context. I realised that I had a template I didn't need. I deleted the template file from the theme directory. But the template is still listed in the list in the editor even though there isn't the template file in the theme anymore. I tried to delete the cache, but it didn't help, so I wanted to know how to delete it from the list. |
You can only delete templates that were added in-product. If the template exists in the file system (IE supplied by the theme) then it cannot be deleted.
Do you remember if you customised the template? A customised template will remain, even if you delete the template file in the theme. I think this might be a bug... customised templates should be revertable (resets them back to the file supplied by the theme), but if the file is deleted from the file system then there's nothing to revert to. In this case the delete action should appear. It's a bit of an edge case, but worth opening an issue if you have the time. |
Thank you for the detailed reply. Much appreciated.
I see. That makes sense for the majority of the users to stop accidentally deleting the templates.
Unless I'm missing something obvious, in my experience, even non-customised templates that have been deleted from the theme folder keep showing up on the template list... and if you open the template, you'll see this... With this in mind, it feels reasonable to think the template should be gone from the list when it's removed from a theme. I tried clearing the cache and deactivating/activating the theme, but only rebooting the dev environment removed the unwanted template from the list. If the template was customised, it remains on the list, and I can see the customised design when I open it. Thanks again, @jameskoster, for sharing your knowledge. It feels like it's worth creating an issue/question about it. |
Yeah I can't explain that, so I agree it would appear to be a bug. Definitely worth opening an issue if you have the time. |
Here's the before:
Here's the after:
Changes: