#53564
new
enhancement
Twenty Twenty-One: Consider adding block-templates support
|
|
|
|
---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description
Change History (40)
#1
@
3 years ago
#2
@
3 years ago
#3
@
3 years ago
-
Summary changed from Consider adding block-templates support to Twenty Twenty-One to Twenty Twenty-One: Consider adding block-templates support
This ticket was mentioned in PR #1455 on WordPress/wordpress-develop by kjellr .
3 years ago
#4
-
Keywords has-patch added
This ticket was mentioned in Slack in #core-editor by kjell. View the logs .
3 years ago
#6
@
3 years ago
#7
@
3 years ago
The effort to get it working well and to figure out the best way to keep backwards compatibility and avoid CSS duplication, not to mention dark mode and accessibility, is significant, and involves so much more than enabling theme support and one template.
This ticket was mentioned in Slack in #core-editor by annezazu. View the logs .
3 years ago
#9
@
3 years ago
#11
@
3 years ago
#12
@
3 years ago
#13
@
3 years ago
-
The title and tagline are centered (thanks, I forgot that's how the theme handles this!) -
The font weight of the post title matches the weight used in our usual templates. -
The meta is now the same size it is for the usual templates. -
The margins/spacing in the front end now match the usual templates more exactly. -
Separator blocks now appear the correct width.
#14
@
3 years ago
A temporary(?) solution suggested in #53530 would be to turn off dark mode in all editors. I worry about how this will affect users who use this feature.
#15
@
3 years ago
#16
@
3 years ago
#17
@
3 years ago
The background is always white no matter what background color is selected in the customizer, including the default, and dark mode is off.
Only the post title has the correct font family. The site title, tagline, and post date are using the font family serif.
This ticket was mentioned in Slack in #themereview by jffng. View the logs .
3 years ago
This ticket was mentioned in Slack in #themereview by kjell. View the logs .
3 years ago
#20
@
3 years ago
Stylesheet was not properly added. For blocks, use the block API's style ( https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#style ) or editorStyle ( https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#editor -style). For themes, use add_editor_style ( https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#editor -styles). < link rel="stylesheet" href="http://wordpressbeta.local/wp-admin/load-styles.php? c=1&dir=ltr&load%5Bchunk_0%5D=dashicons,admin-bar,buttons,media-views,editor-buttons,wp-components,wp-block-editor,wp-nux,wp-reusable-blocks,wp-editor,common,&load%5Bchunk_1%5D=forms,wp-reset-editor-styles,wp-block-library,wp-editor-classic-layout-styles,wp-edit-blocks,wp-edit-post,wp-block-directory,wp-&load%5Bchunk_2%5D=format-library,admin-menu, dashboard,list-tables,edit,revisions,media,themes,about,nav-menus,wp-pointer,widgets,site-icon,l10n,wp&load%5Bchunk_3%5D=-auth-check,wp-block-library-theme&ver=5.8-RC2-51366" media="all"> (anonymous) @ block-editor.min.js? ver=ccce823101eb1098c67ccbd5ea53f37a:12 <link rel="stylesheet" href=" http://wordpressbeta.local/wp-admin/load-styles.php?c=1& ; dir=ltr&load%5Bchunk_0%5D=dashicons,admin-bar,buttons,media-views,editor-buttons,wp-components,wp-block-editor,wp-nux,wp-reusable-blocks,wp-editor,common,&load%5Bchunk_1%5D=forms,wp-reset-editor-styles,wp-block-library,wp-editor-classic-layout-styles,wp-edit-blocks,wp-edit-post,wp-block-directory,wp-&load%5Bchunk_2%5D=format-library, admin-menu,dashboard,list-tables,edit,revisions,media,themes,about,nav-menus,wp-pointer,widgets,site-icon,l10n,wp&load%5Bchunk_3%5D=-auth-check,wp-block-library-theme&ver=5.8-RC2-51366" media="all">
#21
@
3 years ago
This ticket was mentioned in Slack in #core-editor by kjell. View the logs .
3 years ago
#25
@
3 years ago
#26
@
3 years ago
#28
@
3 years ago
This ticket was mentioned in Slack in #themereview by kjell. View the logs .
3 years ago
#30
@
3 years ago
-
Currently, if you apply this patch but have dark mode enabled on your site, the template mode will appear in light mode. Your front end will still appear in dark mode — it's just the template editing interface that will be shown in light mode. This is not consistent with the way the standard post and page editor works. -
The post and page editor uses wp_add_inline_style() and the enqueue_block_editor_assets hook to inject the dark mode color variables into the editor. This method is not compatible with the iframed template editor. My understanding is that only styles loaded via add_editor_style() are currently be enqueued there. -
To get this to work, I think we'd need to rewrite (or duplicate and modify) that dark mode function to use a new approach that's compatible with the iframe.
This ticket was mentioned in Slack in #core-editor by poena. View the logs .
3 years ago
This ticket was mentioned in PR #1626 on WordPress/wordpress-develop by carolinan .
3 years ago
#32
-
Add a version control for versions below WordPress 5.8. -
Fix any coding standard issues and optimizations. -
Testing -
Add props to ellatrix :)
#33
@
3 years ago
#34
@
3 years ago
#35
@
3 years ago
-
Enable dark mode in the customizer. -
Using the block editor, create and publish a new post. -
In the Template section in the block editor, click "New" to create a new template and enter the template editor. -
The green background is showing, and the is-dark-theme CSS class is missing from the iframed <bod>y element. -
Refresh the page or go back to the block editor and select edit to open the template editor again. -
The background is dark grey and the CSS class is there (There is a flash of the green background first).
#36
@
3 years ago
This ticket was mentioned in Slack in #core-themes by poena. View the logs .
3 years ago
This ticket was mentioned in Slack in #core-themes by poena. View the logs .
2 years ago
This ticket was mentioned in Slack in #core-editor by costdev. View the logs .
2 years ago
#40
@
3 months ago
-
Keywords needs-testing added -
Milestone changed from Awaiting Review to Future Release
#41
@
2 months ago
It seems reasonable that at least Twenty Twenty-One should support this feature when it's introduced.