Skip to content
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

6.1 Dev Notes Tracking #42961

Closed
89 tasks done
bph opened this issue Aug 4, 2022 · 47 comments
Closed
89 tasks done

6.1 Dev Notes Tracking #42961

bph opened this issue Aug 4, 2022 · 47 comments
Assignees
Labels
Needs Dev Note Requires a developer note for a major WordPress release cycle [Type] Overview Comprehensive, high level view of an area of focus often with multiple tracking issues [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.

Comments

@bph
Copy link
Contributor

bph commented Aug 4, 2022

Tracking all Dev Notes from Gutenberg plugin releases 13.1 - 14.1

After a review of the processes establish during 6.0 release cycle, the release leads for documentation agreed on some modifications. Please read the information below carefully. If you have questions, connect with @bph or @zzap via Slack or comment here.

Not all developer related information needs to be in a separate DevNote on the Make Core blog for the field guide. We can group related information.
During the course of the next few weeks, this first list will be completed after the last Gutenberg plugin.
We can already make decision on some features if warrant a stand-alone blog post or if the information will be part of a group post.

Stand-alone post

To streamline the process and eliminate bottlenecks, all writers of stand-alone dev notes will receive privileges on the Make Core Blog. (Please connect with @bph or @zzap, if you need access)

  • Create your note in a new post,
  • Save as Draft
  • Enable public preview
  • Share the link to the public preview in a comment below, as "ready for review"
  • "For dev notes, each one must have at least two reviewers" (Handbook)

Part of a group post

If the information related to your PR will be part of a group post, please write the dev note in a comment on the PR, so it can be reviewed and, if necessary commented on, by the release docs team or a reviewer.

Before you start writing


Global Styles

Layout

Elements support @scruffian

Fluid typography @ramonjd

Create Block Scaffolding Tool @gziolo / @ryanwelcher

Style Engine @ramonjd @andrewserong

Block Library (Package)

Query Loop @ntsekouras

Components package

Margin deprecation @mirka (dev note here)

Popover @ciampo (dev note here)

New APIs

useDisabled hook + disabled component

Deprecated

Unsorted for now

theme.json

Preference Persistence


Update 10/8
removed - #42485 not in 6.1

Updates: 10/03 - bph
several more PR references

Updates: 9/21 / - bph

to be continued

@bph bph self-assigned this Aug 4, 2022
@bph bph added Needs Dev Note Requires a developer note for a major WordPress release cycle [Type] Overview Comprehensive, high level view of an area of focus often with multiple tracking issues [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues. labels Aug 4, 2022
@ramonjd
Copy link
Member

ramonjd commented Aug 4, 2022

Fluid typography @ramonjd

Thanks @bph! I have a dev note ready to roll, but have shelved it until we're closer to RC1. I am told this is the usual protocol.

@bph
Copy link
Contributor Author

bph commented Aug 5, 2022

@ramonjd and all

Publishing close to RC 1 is not a hard rule. It only makes sure that there isn't something in the dev notes, the might have changed between drafting it and release.

On the doc release team we need a bit of a lead time as Dev Notes need to be reviewed by two people before publishing. If all dev notes are published a day before RC 1, it creates an unnecessary bottleneck and undue stress on the team.

Ideally, the draft on the make blog could be available around Beta 1. Then it can get into the queue for reviewers, finalized and published by RC 1, to make it into the Field Guide.

@andrewserong
Copy link
Contributor

Thanks for the ping @bph!

For this one, I don't believe a separate post is required, it can be added to any dev note blog post on smaller changes. I've drafted a comment on the PR for inclusion in such a post: #42544 (comment) — the main purpose of the dev note is to communicate to creators of themes that currently use an undocumented approach of opting out of Layout styles to use the new formal approach.

@bph
Copy link
Contributor Author

bph commented Aug 9, 2022

Thank you, @andrewserong - I marked this dev note as done for now.

@bph
Copy link
Contributor Author

bph commented Aug 11, 2022

Thanks @ramonjd for message about the Draft Dev Note ready for review 👏  🙌

@glendaviesnz
Copy link
Contributor

Draft for spacing presets available for review at https://make.wordpress.org/core/?p=98177&preview=1&_ppp=00c8d7730a

@t-hamano
Copy link
Contributor

t-hamano commented Sep 7, 2022

I commented on the above PR because I thought it should be mentioned in the dev note.
In my opinion, it is better to include it as part of the group post, such as Block Editor miscellaneous Dev Notes for WordPress 6.0.

@bph
Copy link
Contributor Author

bph commented Sep 7, 2022

Thank you so much @t-hamano to add this here and put this on our radar for WP 6.1.

@scruffian
Copy link
Contributor

@bph I created a draft for elements support: https://make.wordpress.org/core/?p=98557

@t-hamano
Copy link
Contributor

t-hamano commented Sep 8, 2022

#42677 (comment)
I have left a comment about "the inheritance of template lock in the column block", as it was deemed necessary to include this as part of the dev note.

@bph
Copy link
Contributor Author

bph commented Sep 13, 2022

@scruffian Thanks for the Dev Note! and the link!

@bph bph added the [Status] In Progress Tracking issues with work in progress label Sep 14, 2022
@oandregal
Copy link
Member

I've listed the authors of #43840 in the issue description. I was listed but I was involved.

@ntsekouras
Copy link
Contributor

👋 - I was wondering if all the additions in the templates offered to create in site editor should be part of post like this already posted one: https://make.wordpress.org/core/2022/07/21/core-editor-improvement-deeper-customization-with-more-template-options/.

Related PRs that Needs Dev Note label was added are:

For Query Loop extensibility PRs, there is going to be a documentation page(related open PR), so I guess that would be enough? 🤔

Finally for the Query Loop parents filter is just a filter for the block to restrict the results based on their parent. I don't think it needs a separate dev note, but if we want we could add somewhere a sentence about it like:

Query Loop has now parent filtering support, with a new property in the existing query attribute, called parents. The filter is only shown for hierarchical post types and if you have selected multiple parents it will display the children of all of them(union).

@gziolo
Copy link
Member

gziolo commented Sep 16, 2022

I started a draft post for Block API changes covering:

For the Create Block section, there is also an open PR that we should land closer to the release date that integrates the new render API from block.json and bumps the minimum required WordPress version to 6.1:

Besides, we should mostly cover new CLI options / prompts that allow selecting different variants (dynamic vs static) and a way to scaffold code only for a block (without the plugin wrapper).

@adamziel
Copy link
Contributor

@bph I've marked this one as done:

#41873

It was closed without merging as there wasn't enough alignment to move forward.

@andrewserong
Copy link
Contributor

I've added a draft note for the layout refactor in this comment (#40875 (comment)). The layout dev notes will likely all be consolidated with ones from @tellthemachines and @ramonjd into a single blog post, since lots of the individual PRs and changes are all related.

@tellthemachines
Copy link
Contributor

Oh, I think we need to add #42763 (Try "constrained" content width as new layout type) and #42085 (Core CSS support for root padding and alignfull blocks) to this list. I'm writing dev notes for them, anyway 😅

@bph
Copy link
Contributor Author

bph commented Sep 21, 2022

@tellthemachines I updated the tracking section above.

@getdave
Copy link
Contributor

getdave commented Sep 22, 2022

I added a dev note for pseudo class support for elements in theme.json. It's being tech reviewed by @scruffian and @draganescu.

@afragen
Copy link
Member

afragen commented Sep 22, 2022

Block Library: Add filter for inner blocks in the Navigation block

I added a short dev note for this.

https://make.wordpress.org/core/?p=98980&preview=1&_ppp=56c57f986f

@tellthemachines
Copy link
Contributor

tellthemachines commented Sep 26, 2022

Hey folks, there's a draft post for all Layout-related dev notes here: https://make.wordpress.org/core/?p=99019&preview=1&_ppp=992173a9ba

@ramonjd
Copy link
Member

ramonjd commented Sep 27, 2022

I've thrown up a first draft for the Style Engine dev note here:

https://make.wordpress.org/core/?p=99063&preview=1&_ppp=10ef94cb0b

Thank you!

@fabiankaegy
Copy link
Member

I moved the draft of the block-based template parts devnote from the Google Doc to a draft post: https://make.wordpress.org/core/?p=99068&preview=1&_ppp=25529485e7

@draganescu
Copy link
Contributor

Howdy here is the draft dev note for the navigation block fallback updates in 6.1 https://make.wordpress.org/core/?p=99073&preview=1&_ppp=82bfc16fed

@oandregal
Copy link
Member

oandregal commented Oct 4, 2022

Closing the loop for #44015 and #44159

Draft at https://make.wordpress.org/core/?p=99398&preview=1&_ppp=40c8cd7718

Filters for theme.json

WordPress 6.1 has introduced some server-side filters to hook into the theme.json data provided at the different data layers:

  • theme_json_default: hooks into the default data provided by WordPress
  • theme_json_blocks: hooks into the data provided by the blocks
  • theme_json_theme: hooks into the data provided by the theme
  • theme_json_user: hooks into the data provided by the user

Each filter receives an instance of the WP_Theme_JSON_Data class with the data for the respective layer. To provide new data, the filter callback needs to use the update_with( $new_data ) method, where $new_data is a valid theme.json-like structure. As with any theme.json, the new data needs to declare which version of the theme.json is using, so it can correctly be migrated to the runtime one, should it be different.

Example:

This is how to pass a new color palette for the theme and disable the text color UI:

function filter_theme_json_theme( $theme_json ){
	$new_data = array(
		'version'  => 2,
		'settings' => array(
			'color' => array(
				'text'       => false,
				'palette'    => array( /* New palette */
					array(
						'slug'  => 'foreground',
						'color' => 'black',
						'name'  => __( 'Foreground', 'theme-domain' ),
					),
					array(
						'slug'  => 'background',
						'color' => 'white',
						'name'  => __( 'Background', 'theme-domain' ),
					),
				),
			),
		),
	);

	return $theme_json->update_with( $new_data );
}
add_filter( 'theme_json_theme', 'filter_theme_json_theme' );

@oandregal
Copy link
Member

oandregal commented Oct 4, 2022

I've noticed that in the 6.1 cycle there has been a few features introduced in theme.json. Some I've tracked (there may be more):

  • hover/focus/active states
  • spacing presets
  • fluid typography
  • new elements
  • filters

I suggest that we create a "theme.json in WordPress 6.1" devnote to compile them all (whether or not some of those individual features merit its own devnote as well).

cc people that led the changes in this area in case anyone wants to draft it up. @scruffian @MaggieCabrera @mikachan @ajlende @getdave @draganescu @glendaviesnz @andrewserong @ramonjd @aaronrobertshaw

@getdave
Copy link
Contributor

getdave commented Oct 4, 2022

hover/focus/active states

Here's the Dev Note for this.

@bph
Copy link
Contributor Author

bph commented Oct 4, 2022

@oandregal looking at your list in your comment

This is the current list of stand-alone Dev Notes already drafted on the Make Blog:

This is the list of theme.json PRs. See link list above.
Screen Shot 2022-10-04 at 18 35 41
My idea would be to add "More Theme.json Updates" Dev Note covering the list and link to already existing Dev notes.

@bph
Copy link
Contributor Author

bph commented Oct 4, 2022

@jorgefilipecosta @t-hamano We already have a "Block Library Updates" (public preview) Dev note in the works, where we can add a paragraph about these PRs
#42677
#43663

And if you can, also for #40554

What do you think? You can add it all in a comment on this issue together.

@ryanwelcher
Copy link
Contributor

ryanwelcher commented Oct 6, 2022

@bph combined dev note for the create-block stuff.

Create-Block Dev notes WP 6.1

#WordPress 6.1 introduces many updates and new features to the @wordpress/create-block.

New Features

Block Variants

The new –variant flag allows users of the tool to choose a block variant to be scaffolded. The internal templates provided by the create-block package support a dynamic and static variant with will scaffold a dynamic and static block respectively. If no variant is passed, the static variant is used.

Scaffolding using the dynamic variant:

npx @wordpress/create-block custom-block --variant=dynamic

Template authors can define variants by adding a variants object to the template definition with each property being the name of a variant and its value an object containing values that can add to or overwrite the default values defined in the defaultValues key. See the create-block-tutorial-template for an example of defining variants.

Related pull requests:

–no-plugin mode

A highly requested feature for the package was to be able to add additional blocks to an existing plugin. With the addition of the --no-plugin flag that is now possible!

When the command is run with the flag, a new set of block files will be created in the directory where the command was run in a directory named for the slug passed.

npx @wordpress/create-block custom-block --no-plugin

Related pull requests: #41642

Enhancements:

  • I18n references have been removed from the internal templates to avoid potential issues with translated strings causing block validation errors ( #43035 )
  • Improvements to the developer experience by prompting to continue the scaffolding process if the tool thinks system requirements are not met ( #42151, #42254 ) and some more general fixes to the scaffold to remove some warnings and errors ( #40479, #41273 ).
  • Adds support for the new render block.json key ( #44185 )

Documentation

The documentation around creating External Templates has been split into its own section ( #43718) and links to the documentation in the associated create-block-tutorial-template have been fixed to link to the correct places ( #42839 ).

@bph Make draft if here: https://make.wordpress.org/core/?p=99350&preview=1&_ppp=79a1db742d

@ntsekouras
Copy link
Contributor

ntsekouras commented Oct 7, 2022

Extending the Query Loop block

Extenders needed a way to present bespoke versions of the Query Loop block, with their own presets, additional settings and without customization options which are irrelevant to their use-case. With WordPress 6.1 the Query Loop block offers very powerful ways to create such versions, through block variations.

To make Wordpress recognize your variation you need to set the isActive block variation property. For providing an easy and consistent way for extenders to recognize and scope their own variation a new namespace property has been introduced in Query Loop block.

Query Loop block now supports controlling which filters are displayed in the user through the allowedControls property, making it easier to be configured by users.

Now you have control over the query executed to fetch the desired posts. You can change the query executed in the block editor by setting extra arguments to the query attribute of the block, and you can do the same for the front end by using the query_loop_block_query_vars filter.

Customizing Query Block Layout

To customize your variation's layout you can use the innerBlocks attribute to set the blocks that are available at the start, bypassing the set-up stage. You can also create specific Query Loop variation patterns to be suggested in the setup, and replace flows of the block. To connect a pattern to a Query Loop variation, add the name of your variation prefixed with the Query Loop name (e.g. core/query/$variation_name) to the pattern’s blockTypes property.

An example block variation would look like this:

const MY_VARIATION_NAME = 'my-plugin/books-list';

registerBlockVariation( 'core/query', {
    name: MY_VARIATION_NAME,
    title: 'Books List',
    description: 'Displays a list of books',
    isActive: [ 'namespace' ],
    icon: /** An SVG icon can go here*/,
    attributes: {
        namespace: MY_VARIATION_NAME,
        query: {
            perPage: 6,
            pages: 0,
            offset: 0,
            postType: 'book',
            order: 'desc',
            orderBy: 'date',
            author: '',
            search: '',
            exclude: [],
            sticky: '',
            inherit: false,
        },
    },
    allowedControls: [ 'inherit', 'order', 'taxQuery', 'search' ],
    scope: [ 'inserter' ],
);

There is a new documentation page specifically for extending Query Loop block to learn more.

props @sunyatasattva for the documentation page.

make.wordpress draft: https://make.wordpress.org/core/?p=99476&preview=1&_ppp=c35ff058a0

@oandregal
Copy link
Member

@bph I've looked into changes and don't see anything left. People that worked actively in this area may want to double-check, cc @scruffian @ajlende @MaggieCabrera etc.

@t-hamano
Copy link
Contributor

t-hamano commented Oct 7, 2022

@bph

I will leave a note which should be added in the Block Libraries update in WordPress 6.1 post.

This note refers to three PRs:

If there are any misleading or unnatural phrases, please feel free to update them.


Navigation Block Menu Items filter

Content has already been created by @afragen.

Improvement of Cover Block

Markup changes

The markup has been changed to resolve the issue that duotone doesn't work with fixed background. Previously, the background image was applied to the root of the block, but it is now applied to the inner div with the img role and .wp-block-cover__image-background class.

Current:

<div class="wp-duotone-xxxxxx-xxxxxx-x wp-block-cover has-parallax" style="background-image:url(http://example.com/wp-content/uploads/2022/10/cover.jpg)">
	<span aria-hidden="true" class="wp-block-cover__background has-background-dim"></span>
	<div class="wp-block-cover__inner-container">
		<p>Inner Contents</pss=>
	</div>
</div>

New:

<div class="wp-duotone-xxxxxx-xxxxxx-x wp-block-cover has-parallax">
	<span aria-hidden="true" class="wp-block-cover__background has-background-dim"></span>
	<div role="img" class="wp-block-cover__image-background wp-image-xx has-parallax" style="background-image:url(http://example.com/wp-content/uploads/2022/09/cover.jpg)"></div>
	<div class="wp-block-cover__inner-container">
		<p>Inner Contents</p>
	</div>
</div>

For more info see #40554.

Keep the same position for both LTR and RTL languages

In the cover block, the content inside can be changed the content position, such as "Top Left" or "Center Right". But when changed to RTL languages, the content position flips left to right as compared to the LTR language. However, content position determines "physical" placement and should not be affected by language direction.

To solve this problem, the same position is now kept for both LTR and RTL languages. Because of this change, the content within the existing cover block in RTL languages is flipped left to right (i.e., in its original position), but if this is not what you are looking for, you can re-position it.

For more info see #43663.

Global template_lock inheritance in the column block

The block template defines a default list of blocks in an editor session. To prevent manipulation of the block list, all blocks can be locked by template_lock property.

However, in column blocks, the editor would crash on certain operations because it would initialize the lock status defined in the block template. To resolve this issue and to be more consistent about template lock status inheritance, column blocks now inherit the lock status of block templates.

For more info see #42677.

@bph
Copy link
Contributor Author

bph commented Oct 7, 2022

Awesome, Thank you @t-hamano !

@zzap
Copy link
Member

zzap commented Oct 7, 2022

Just to let everyone know, I've been going through the drafts at Core blog and adding 6.1 label to a bunch of dev notes. That is the most important label for the release so please use it if.

Thank you for awesome work ❤️

@bph
Copy link
Contributor Author

bph commented Oct 7, 2022

I have been doing that, to and I added dev-note-6.1 so we can collectively just refer to them in one tag. :-)

@zzap
Copy link
Member

zzap commented Oct 7, 2022

Yeah, but 6.1 + dev-notes are the ones that end up in here https://make.wordpress.org/core/6-1/

@bph
Copy link
Contributor Author

bph commented Oct 8, 2022

Update: October 8th, 2022

Yesterday, 4 dev notes were published, six are finished and in the queue to be reviewed, one is still in progress.

Published 📣

In Review 👓

In Progress 📝

Block API changes in WordPress 6.1

Not claimed PRs

In the list in the issue description above we still have a few white check boxes next to PRs.

  • Please double-check if there are still dev notes that need to be created.
  • If you feel they are worth a mention but don't value a stand-alone Dev note, maybe you can write a one paragraph blurb as to the nature of the change(s) and put it in a comment on this issue.
  • If you feel it's worth a mention but only in the "But wait there is more" section of the Field guide (example 6.0), please note that too.

@ramonjd
Copy link
Member

ramonjd commented Oct 8, 2022

@bph Could we possibly hold off on publishing the fluid typography dev note for a few days? There are some bugs we're scrambling to iron out and it will affect the content of the dev note, which I will update in due course. See:

🙇

@talldan
Copy link
Contributor

talldan commented Oct 10, 2022

Persisted preferences - https://make.wordpress.org/core/wp-admin/post.php?post=99657&action=edit

Writing this did make me realise there's a bug in 6.1 RC related to the backport for persisted preferences, so I'll work on fixing that asap. 🤦‍♂️

@oandregal
Copy link
Member

Oh, I forgot commenting about the settings hook. This is something client-specific and unrelated to server-side filters. It's about having a theme.json per block instance. Not all pieces to make this work have landed in 6.1, so I'm leaning towards not publishing the devnote just for now. cc @jorgefilipecosta in case he has thoughts.

@jorgefilipecosta
Copy link
Member

Oh, I forgot commenting about the settings hook. This is something client-specific and unrelated to server-side filters. It's about having a theme.json per block instance. Not all pieces to make this work have landed in 6.1, so I'm leaning towards not publishing the devnote just for now. cc @jorgefilipecosta in case he has thoughts.

Yes, I agree it is something experimental that we will continue trying on the plugin. The dev note should not go out for now.

@tyxla
Copy link
Member

tyxla commented Oct 10, 2022

@bph I've added a dev note for #44494 as a comment in the PR: #44494 (comment).

@Mamaduka
Copy link
Member

I've added two dev notes for Block Editor misc post - #40502 (comment) and #42186 (comment).

@bph
Copy link
Contributor Author

bph commented Oct 10, 2022

Thank You @tyxla and @Mamaduka for your notes! 😸

@jorgefilipecosta
Copy link
Member

jorgefilipecosta commented Oct 11, 2022

Here I add the missing dev note for #41791.
It can be included on a misc editor dev note.

Start content patterns for all post types.

With WordPress 6.0, we introduced the ability to add patterns that appear in a modal each time a new page was created, allowing the user to start from a set of pre-made patterns instead of in a blank state. In WordPress 6.1, this feature is expanded to all the post types.
To use this feature, one should include 'core/post-content' in the blockTypes array (same as what happened for pages) and include the desired postTypes where the modal should appear in a newly introduced postTypes property. If postTypes are specified, the pattern is only available on the post types that were set.
Example:

register_block_pattern( 'custom-pattern', array(
			'title'      => _x( 'Start post pattern', 'Block pattern title', 'gutenberg' ),
			'blockTypes' => array( 'core/paragraph', 'core/post-content' ),
			'postTypes' => array( 'product' ),
			'content'    => '<!-- wp:paragraph -->
<p>A start post pattern</p>
<!-- /wp:paragraph -->',
		) );

@bph
Copy link
Contributor Author

bph commented Oct 26, 2022

20 post published

This is definitely more than 5.9 (9) and 6.0 (9) together. :-) 🙌 🤯

👏 props to @scruffian @glendaviesnz @ramonjd @oandregal @draganescu @jorgefilipecosta @tellthemachines @scruffian @getdave @andrewserong @fabiankaegy @Mamaduka @annezazu @afragen @t-hamano @ellatrix @adamziel @gziolo @ciampo @mirka @aaronrobertshaw @talldan @ramonjd @ntsekouras @ryanwelcher @mburridge and Abha Thakor.

I close this issue, but if you find PRs that still need to have a mention in the Field Guide 6.1 by all means comment below and ping me.

@bph bph closed this as completed Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Dev Note Requires a developer note for a major WordPress release cycle [Type] Overview Comprehensive, high level view of an area of focus often with multiple tracking issues [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Projects
Status: Done
Development

No branches or pull requests