-
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
Dev Notes for WordPress 5.8 #32365
Comments
#30804 Comes to mind as a change that can affect block-based themes using the Query block |
@MaggieCabrera Query block has never been released in Core so maybe we need a post for all new blocks but it's not necessarily something for theme authors I think. |
If they are using the Query block in their templates they need to change the markup (we've had to do it for some of our themes), but I agree it's not relevant in this case since the block is not in Core yet so forget I mentioned it :D |
― A post to introduce the theme.json file Probably worth pointing to the existing docs as well, which contains the rationale, examples, and the whole specification. This note can also be useful in explaining how the The docs also need to be adapted to highlight which parts are stable and landed in 5.8 and which parts are plugin-only. ― New Block Supports flags and Customizations Options The new additions also need to be documented in the block supports doc. I compared current 5.8 with what was in the 5.7 line and this is what I see:
― Should we remove these block supports from core? I've noticed a few block supports have been ported to core in WordPress/wordpress-develop#1176, such as: However, I wonder if we should remove this code from core? A plugin could enable them by hooking into the block editor settings filter. The UI for these is not clear yet. And for some, such as border, @aaronrobertshaw had queued up some breaking changes. |
Some core blocks do use these block supports even if they are experimental (not allowed for third-party blocks yet) |
There are two PRs specifically relating to the border block support. One to allow non-pixel units and another to allow individual border radius values per corner. These are needed to refine the border support UI before the support gets wider use (#31585). The PRs updating the border support both currently contain code to handle backwards compatibility so if those approaches are accepted those PRs wouldn't be breaking changes. Still, minimising their exposure before those changes land makes sense to me. |
What's the expectation of those block supports I shared? Is it that they work with WordPress 5.8 without the plugin? If so, we need to port more things to |
I think for me, there are two different things:
|
Dev note for Additions to the Block Patterns Registration API #30471 Contextual patterns for easier creation and block transformationsWe’ve all been there. Staring at a blank page sometimes with an idea of what you want to create and sometimes with a mind as blank as the page. To make the creation process easier there is now a way to suggest patterns based on the block one is working with. This is now implemented for In addition there is way to suggest pattern transformations that are contextual to the currently selected blocks. So how this is different to the patterns current behaviour? Patterns have some demo content and you have to update that content after insertion. With this feature it's possible to use some patterns and retain some of attributes/content you already have. So it's for existing blocks! An important thing to note here is that a pattern transform can result to adding more blocks than the ones currently selected. Quote.mp4This is the first iteration of the feature that covers most simple blocks (without innerBlocks). A new experimental API has been created where we can mark what block attributes count as In the long run as this work continues and spreads to more blocks, it will be easier to create content and get inspired without leaving the editor. Pattern Registration APIif you’re creating your own custom block patterns, there’s a new example
--props to @annezazu for some of the above content 💯 |
Since 5.8 includes support for Template Mode, would it be possible to include information in notes on how to detect a custom template using PHP? For example, currently we can use the following conditional tag to detect a template provided by the theme: is_page_template( 'templates/front-page.php' ); Is it possible to detect a custom template built by the user using Template Mode? |
I took a deeper look at this and discussed with some folks (Riad, Jorge, Miguel, Aaron): these aren't expected to work without the plugin. As per the code in core: it's fine that it stays there. When the plugin registers the supports it overwrites the core's, so two different implementations can't run at the same time. There's still the possibility that any other plugin activates them. We deem this as no problematic as they're experimental and judge the cost of removing them/syncing with core higher. From the block supports side, we only need clarification/dev notes for the the ones at "New Block Supports flags and Customizations Options" here. |
Hello friends, I come bearing gifts and praises ❤️ Not sure if you hear this often enough but you're all heroes and, personally, I admire your work, dedication and, especially, patience with us who wants more docs. Now business. We have 3 Trac tickets for Editor component marked for dev note. Reviewing everything in this thread, I believe they're not mentioned (correct me if I'm wrong) but think we could use some info about them in dev notes. These are:
I have two questions at this point:
Thanks ❤️ |
hi @zzap thanks for highlighting these.
@aristath would know more, I believe we did a post about it (maybe a dev note in the previous release or something but I'm uncertain). If there are changes in the behavior, a dev note would be needed yes.
Good one yes, I'll add to the list cc @gziolo
This one is already covered by: "Consolidate block registration using registerBlockType #32030 #30293" |
I'm planning to provide this week both dev notes @zzap and @youknowriad discussed above 👍🏻 |
Dev note for Deprecating the dark theme support flag #28233 Dark theme support is now automatically detected |
I started a gist with the dev note for changes in Block API since it might get lengthy: https://gist.github.com/gziolo/cbea77500316a243e445d509ced3c231 |
I have another gist opened with the dev note for changes related to the block editor configuration and filters used there: https://gist.github.com/gziolo/a947dc52eb2604c77a0a5b0797b2e781 |
Published Template Editor Dev Note. I marked off the item above and linked to the dev note also. |
Published @gziolo new Block Editor APIs for Multiple Admin Screens. I marked off the item above and linked to the dev note. |
Published @gziolo Block API Enhancements and marked the item above with link to the dev note. |
Published Block supports API updates for WordPress 5.8 - I don't see a corresponding item in the list above to mark complete. |
@nosolosw published Introducing theme.json dev note 👍 marked complete above |
Block Editor API deprecation and removalsRemove APIsKeeping deprecated JavaScript APIs around has a cost on performance and bundle size, this means at some point we need to consider removing some of the very old deprecated APIs, especially the ones with low usage. WordPress 5.8 does remove two APIs that were deprecated on WordPress 5.2.
Removed blocksBefore WordPress 5.0 and in the very early days of the Gutenberg plugin, we used to have a block called Subheading, this block has never been included in WordPress Core and it was hidden/deprecated very early. We expected its usage to be very small. WordPress 5.8 removes the code of this block meaning that if you open content relying on that block in the editor, it will ask you to fallback to the HTML block instead. We don't expect this to have a noticeable impact on the frontend of your site. |
This is the proposed dev note for the iframe in the template editor: https://make.wordpress.org/core/?p=89760&preview=1&_ppp=b976a86b78 |
@ellatrix That looks good, I do a couple of minor edits and added the proper tags. Feel free to review and publish when ready 👍 @youknowriad The Block Editor API deprecations looks good. |
@mkaz I also have this dev note that is almost ready https://make.wordpress.org/core/?p=89618&preview=1&_ppp=1f2254d383 it's just missing a potential Gif for the layout options in the sidebar. I'm AFK the next couple days, so feel free to ship it once you think it's ready. |
I added a GIF and published layout dev note at: https://make.wordpress.org/core/2021/06/29/on-layout-and-content-width-in-wordpress-5-8/ I also published the iframed editor here: https://make.wordpress.org/core/2021/06/29/blocks-in-an-iframed-template-editor/ Both marked complete above 👍 |
https://make.wordpress.org/core/2021/07/01/block-styles-loading-enhancements-in-wordpress-5-8/ |
The field guide is now published and it seems the latest items here are not that important to require their own dev note, so I'm going to close this temptatively. Thanks all for your work on these dev notes. |
Just noting that I don't believe the patterns one has been published: #32365 (comment). It's perfectly fine if we don't want to, but noting in case it has slipped through the cracks 😄 |
@ntsekouras missed this one, maybe we can do a "Miscellaneous block editor API changes" and include it with some other remaining small ones. WDYT @mkaz |
@youknowriad Please write a dev note for #31375. I am totally lost with styling and hooking into the correct functions now. |
@niklasp Hi there! I believe the dev note for that PR is this one https://make.wordpress.org/core/2021/06/29/blocks-in-an-iframed-template-editor/ |
https://github.com/WordPress/gutenberg/pulls?q=is%3Apr+is%3Amerged+label%3A%22Needs+Dev+Note%22
Here are all the PRs that need a Dev Note to be written. I tried organizing the PRs in different sections and each section represents a single make/core post.
Please share the dev notes here as comments here or links to shared documents. Please let me know if you're unable to write a note for your PR. The notes should be posted before WP 5.8 RC (June 29), but the sooner, the better.
Global Styles and Global Settings (theme.json)
Template Mode for classic themes
New Block Supports flags and Customizations Options
It seems most PRs introducing these are unlabeled. cc @nosolosw in case you know what new options have been stabilized/introduced during the 5.8 cycle.
Widgets Editor
A post about the new widgets editor and how it impacts third-party developers.
Related PRs:
Various Block Editor API removals.
Various new Block Editor APIs
registerBlockType
Blocks: DeprecateregisterBlockTypeFromMetadata
in favor ofregisterBlockType
#32030 Blocks: Introduce registerBlockTypeFromMetadata API #30293 @gziolo Publishedscope
from Query patterns and introduceblockTypes
#30471 @ntsekourasVarious changes to styling of blocks and editor potentially impacting themes.
I feel there's a number of unlabeled changes here. Let me know what we should include here cc @carolinan @scruffian @aristath @MaggieCabrera @kjellr
Please update the issue If you think there are other changes that would require a dev note.
Also cc @zzap as documentaion lead.
The text was updated successfully, but these errors were encountered: