Skip to content

View Config: Add version handling - #79809

Merged
ntsekouras merged 13 commits into
trunkfrom
view-config-versioning-handling
Jul 7, 2026
Merged

View Config: Add version handling#79809
ntsekouras merged 13 commits into
trunkfrom
view-config-versioning-handling

Conversation

@ntsekouras

@ntsekouras ntsekouras commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

What?

Part of: #76544

This PR adds version handling to the server-side view configuration API (gutenberg_get_entity_view_config()).

Why?

Right now consumers of the filters have to customize the config by walking the raw payload (find the right index, foreach, unset, etc..), and imperative array manipulation can never be migrated. A later shape change could break existing callbacks in the wild. So even though there is only version 1 today and no migrations exist, this code is the safeguard to keep filters working in a possible shape change.

How?

The approach here partially mirrors theme.json version handling, where documents declare a version and WP_Theme_JSON_Data->update_with() migrates older data forward. So instead of mutating a single payload directly, now callbacks receive a data container and update the config through the container's specific methods.

Any update made is marked against the version it was written, and the payload could be migrated in newer versions.

Where it differs from theme.json handling is the need for updating configs that are arrays (e.g. fields and view_list) and handling index based transforms cannot happen reliably in a filter. These props though have stable identities (field.id, view_list.slug), so each part of the config has its own update function and patches are keyed by that identity: the key names the member, the value carries only the changes. All the update functions follow the same rules — an associative array merges key by key, a numerically indexed array replaces wholesale, and null deletes what it names: a nested key, a whole member, or a whole top-level key (which resets it to its default).

update_properties()

  • update_properties( $patch, $version ) merges partial changes into default_view, default_layouts, and form except its fields.
  • a null patch value unsets a nested key, and null for a whole top-level key resets it to its default.
function example_filter_page_view_config( $data ) {
    // Unset a nested value with null: drop the grid layout option. Form
    // properties other than `fields` also merge here
    $data->update_properties(
        array(
            'default_layouts' => array( 'grid' => null ),
            'form'                   => array( 'layout' => array( 'type' => 'regular' ) ),
        ),
        1
    );

    return $data;
}
add_filter( 'get_entity_view_config_postType_page', 'example_filter_page_view_config' );

update_view_list_items()

  • update_view_list_items( $items, $version ) patches the view_list, keyed by slug.
  • a matching view merges in place, an unknown slug appends a new view to the end, and null removes the view.
function example_filter_page_view_config( $data ) {
    // Add a saved view, retitle the existing Drafts view — matched by slug,
    // only the given keys change — and remove the Trash view with null.
    $data->update_view_list_items(
        array(
            'my-drafts' => array(
                'title' => __( 'My drafts', 'example' ),
                'view'  => array(
                    'filters' => array(
                        array(
                            'field'    => 'status',
                            'operator' => 'isAny',
                            'value'    => 'draft',
                            'isLocked' => true,
                        ),
                    ),
                ),
            ),
            'drafts'    => array( 'title' => __( 'In progress', 'example' ) ),
            'trash'     => null,
        ),
        1
    );

    return $data;
}
add_filter( 'get_entity_view_config_postType_page', 'example_filter_page_view_config' );

update_form_fields()

  • update_form_fields( $fields, $version ) patches the form fields, keyed by id. A field is found wherever it lives — at the top level or nested inside a group's children — so a patch only needs the id.
  • a matching field merges in place, an unknown id appends a new field, and null removes the field.
  • the id lives in the patch key and the value only carries overrides, so a new field with no overrides is 'my_field' => array(). Inside a field patch, an associative children value merges into the group's children by id (unknown ids append to the group), while a numerically indexed one replaces them wholesale.
function example_filter_page_view_config( $data ) {
    // Change label position to post-content-info field, remove the slug and author
    // fields with null, and append a field to the discussion group.
    $data->update_form_fields(
        array(
            'post-content-info' => array(
                'layout' => array( 'labelPosition' => 'side' ),
            ),
            'slug'                        => null,
            'author'                    => null,
            'discussion'             => array(
                'children' => array( 'my_field' => array() ),
            ),
        ),
        1
    );

    return $data;
}
add_filter( 'get_entity_view_config_postType_page', 'example_filter_page_view_config' );

set()

Replaces a whole top-level key. It shouldn't be the default choice — a callback using it stops inheriting core's future changes to that key — but it's useful for cases like a CPT that doesn't want the default post form at all.

function example_filter_book_view_config( $data ) {
    // The default post form doesn't fit books; define one from scratch.
    return $data->set(
        'form',
        array(
            'layout' => array( 'type' => 'panel' ),
            'fields' => array( 'isbn', 'publisher' ),
        ),
        1
    );
}
add_filter( 'get_entity_view_config_postType_book', 'example_filter_book_view_config' );

Testing Instructions

  1. Add the example callback above in PHP.
  2. Open Site Editor → Pages:
    • The "My drafts" view appears in the views list; the Drafts view is retitled "In progress"; the Trash view is gone.
    • The Grid layout option is no longer offered.
  3. Open Quick Edit on a page: the Slug and Author fields are gone from the form.
  4. Play around with different payloads

Use of AI Tools

Opus 4.8 and Fable 5 with direction, changes and review

@ntsekouras ntsekouras self-assigned this Jul 2, 2026
@ntsekouras ntsekouras added [Type] Enhancement A suggestion for improvement. [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond labels Jul 2, 2026
Comment thread docs/how-to-guides/curating-the-editor-experience/filters-and-hooks.md Outdated
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>
Co-authored-by: mcsf <mcsf@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@Mamaduka

Mamaduka commented Jul 2, 2026

Copy link
Copy Markdown
Member

Some surface notes, it's been ages since I've worked on the PHP-side APIs 😅

  • Do we want a more general filter that can change multiple configs? Usually filters like get_entity_view_config_{$kind}_{$name} come with something like get_entity_view_config in Core.
  • The get_entity_view_config_postType_post doesn't match Core filter naming conventions. Will that be okay?
  • The ::update_with method name is okay, but it requires reading the PHPDoc to understand what it really does. Do we have better alternatives?
  • Working with private methods can be hard in the future. It's better to have a good plan for how the Gutenberg plugin can patch those when needed.

cc @aaronjorbin, @peterwilsoncc

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Flaky tests detected in e988fad.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/28843166988
📝 Reported issues:

@ntsekouras

Copy link
Copy Markdown
Contributor Author

Do we want a more general filter that can change multiple configs? Usually filters like get_entity_view_config_{$kind}_{$name} come with something like get_entity_view_config in Core.

I'm assuming you mean a single filter to update all entities for my reply. TBH I don't think so - at least from the start.. Even current core usages have quite a few differences and I'm not sure how updating something for everything makes sense.

Working with private methods can be hard in the future. It's better to have a good plan for how the Gutenberg plugin can patch those when needed.

I think that this class will stay forever in GB to always override like WP_Theme_JSON_Data_Gutenberg.

@mcsf mcsf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having gone through the latest changes, in particular the provision of specific removal methods (remove_view_list_items and remove_fields), I must ask:

Would the API be clearer, less surprising and maybe even more maintainable if, instead of a general update_with, we had something like:

  • update_view_list_items( array, int )
  • update_form_fields( array, int )
  • update_properties( array, int ) (or _settings)

Comment thread phpunit/class-gutenberg-view-config-data-test.php Outdated
Comment thread phpunit/class-gutenberg-view-config-data-test.php Outdated
'fields' => array(
array(
'id' => 'discussion',
'children' => array(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would one replace all the children, if desired, and without changing the order of discussion among the other top-level fields?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the new approach you would do children => array( 'author' ).

Comment thread phpunit/class-gutenberg-view-config-data-test.php Outdated
Comment thread phpunit/class-gutenberg-view-config-data-test.php Outdated
Comment thread phpunit/class-gutenberg-view-config-data-test.php Outdated
Comment on lines +481 to +486
'fields' => array(
array(
'id' => 'excerpt',
'label' => null,
),
),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This highlights something I mentioned when we talked about this, which is the limitation of not using associative arrays.

If fields looked like:

[
  'excerpt' => [ 'label' => 'Excerpt' ],
[

then consumers of the API would have the flexibility to express either:

$data->update_with( [
  'form' => [
    'fields' => [
      'excerpt' => [ 'label' => null ], // Deletes label
    ],
  ],
], 1 );

$data->update_with( [
  'form' => [
    'fields' => [
      'excerpt' => null, // Deletes field, without the need for `remove`
    ],
  ],
], 1 );

This would also mean less magic in update_with, since it would no longer need special handling for different struct branches (slug within view_list, id within form > fields). It would also mean more consistency with the use case shown in the next test (unsetting default_view and view_list with null).

I understand that the reason for not having associative arrays here is that we're mimicking the internal shape as it currently stands. But since we're introducing a method to manipulate it, mightn't it be worth allowing associative arrays in $patch? Or would that confuse more than help?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's actually a good idea and I'll update the code. It aligns with your suggestion:

update_view_list_items( array, int )
update_form_fields( array, int )
update_properties( array, int ) (or _settings)

Additionally it would improve updating fields because update_form_fields would make updates based on identity, including nested fields. With the current code, to update a nested field you should also provide the parent, which could have changed in a callback.

Or would that confuse more than help?

I think the main thing that will make things just a tiny bit more confusing is that in order to update form.layout you would have to go through the generic update function, which I believe is not a big deal.

Comment thread lib/compat/wordpress-7.1/class-gutenberg-view-config-data.php Outdated
@ntsekouras ntsekouras changed the title View Config: Add versioning handling View Config: Add version handling Jul 3, 2026
@ntsekouras
ntsekouras force-pushed the view-config-versioning-handling branch 2 times, most recently from 787c882 to b27e862 Compare July 6, 2026 09:02

@mcsf mcsf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot here. :)

I think we're quite close.

That said, to be fully transparent, here are some questions that came to my mind throughout the review process:

  • Is there a risk that the shape of the API is too biased towards the internal structure? We've certainly improved things now that patches support keying ('discussion' => null), but who knows.
  • Any chance that, with the recent change of the API towards three separate updaters, the versioning itself might no longer be needed? (Probably best to keep it, as it's the whole point of the PR, but still a pertinent question: did the work embedded in this PR help us reduce the uncertainty around future changes to the config structure?)

General observations:

  • As hinted in the inline comments, documentation will need a rework before 7.1.
  • There's a lot to review. I did my best to scrutinise a lot, but not all of it.
  • There may or may not be some code patterns that could be condensed or refactored at some point, but I promise I won't get too distracted by that right now!

Comment thread lib/compat/wordpress-7.1/class-gutenberg-view-config-data.php Outdated
Comment thread lib/compat/wordpress-7.1/class-gutenberg-view-config-data.php Outdated
Comment thread lib/compat/wordpress-7.1/class-gutenberg-view-config-data.php Outdated
Comment thread lib/compat/wordpress-7.1/class-gutenberg-view-config-data.php Outdated
Comment thread lib/compat/wordpress-7.1/class-gutenberg-view-config-data.php Outdated
Comment thread lib/compat/wordpress-7.1/class-gutenberg-view-config-data.php
Comment thread lib/compat/wordpress-7.1/class-gutenberg-view-config-data.php Outdated
Comment thread lib/compat/wordpress-7.1/class-gutenberg-view-config-data.php
Comment thread lib/compat/wordpress-7.1/class-gutenberg-view-config-data.php Outdated
Comment thread lib/compat/wordpress-7.1/class-gutenberg-view-config-data.php Outdated
@ntsekouras
ntsekouras force-pushed the view-config-versioning-handling branch from b27e862 to c53d9a0 Compare July 6, 2026 12:30
@ntsekouras

Copy link
Copy Markdown
Contributor Author

Is there a risk that the shape of the API is too biased towards the internal structure?

I think that's unavoidable in order to ensure consumers don't target through indexes, nesting, etc.., which additionally is not even reliable due to possible multiple filters.

Any chance that, with the recent change of the API towards three separate updaters, the versioning itself might no longer be needed? (Probably best to keep it, as it's the whole point of the PR, but still a pertinent question: did the work embedded in this PR help us reduce the uncertainty around future changes to the config structure?)

While the new API reduced the uncertainty for view_list and form fields, it can't help when properties change (e.g. a property is renamed or moves elsewhere). Marking the update with the version is cheap now and future proof, so I'd say we should keep it from the start.

@mcsf mcsf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll leave the question of set up to you. Good work!

@ntsekouras
ntsekouras force-pushed the view-config-versioning-handling branch from 4e2f046 to e988fad Compare July 7, 2026 05:11
@ntsekouras
ntsekouras enabled auto-merge (squash) July 7, 2026 05:11
@ntsekouras
ntsekouras merged commit 977d675 into trunk Jul 7, 2026
42 of 43 checks passed
@ntsekouras
ntsekouras deleted the view-config-versioning-handling branch July 7, 2026 05:56
@github-actions github-actions Bot added this to the Gutenberg 23.6 milestone Jul 7, 2026
pento pushed a commit to WordPress/wordpress-develop that referenced this pull request Jul 8, 2026
Right now consumers of the `get_entity_view_config_{$kind}_{$name}` filter customize the config by walking the raw payload — find the right index, `foreach`, `unset`, etc. — and imperative array manipulation can never be migrated. A later shape change could break existing callbacks in the wild. So even though there is only version 1 today and no migrations exist, this is the safeguard to keep filters working through a possible shape change.

Instead of mutating the payload directly, callbacks now receive a `WP_View_Config_Data` container and update the configuration through its methods, partially mirroring `theme.json` version handling where documents declare a version and older data is migrated forward.

Ports the changes from the Gutenberg plugin. See WordPress/gutenberg#79809.

Follow-up to [62547].
Props ntsekouras, mcsf.
Fixes #65577.


git-svn-id: https://develop.svn.wordpress.org/trunk@62668 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Jul 8, 2026
Right now consumers of the `get_entity_view_config_{$kind}_{$name}` filter customize the config by walking the raw payload — find the right index, `foreach`, `unset`, etc. — and imperative array manipulation can never be migrated. A later shape change could break existing callbacks in the wild. So even though there is only version 1 today and no migrations exist, this is the safeguard to keep filters working through a possible shape change.

Instead of mutating the payload directly, callbacks now receive a `WP_View_Config_Data` container and update the configuration through its methods, partially mirroring `theme.json` version handling where documents declare a version and older data is migrated forward.

Ports the changes from the Gutenberg plugin. See WordPress/gutenberg#79809.

Follow-up to [62547].
Props ntsekouras, mcsf.
Fixes #65577.

Built from https://develop.svn.wordpress.org/trunk@62668


git-svn-id: http://core.svn.wordpress.org/trunk@61953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
t-hamano added a commit that referenced this pull request Jul 11, 2026
Follow-up to the previous commit, mirroring the registration logic that landed
on trunk in #79809.

Register the plugin's callbacks at priority 5, the same priority core uses for
its own base definitions, so that third-party callbacks registered at the
default priority compose on top of them regardless of registration order. Guard
the registration with function_exists() so a post type that core covers but the
plugin does not simply falls back to the default configuration instead of
hooking a callback that does not exist.

Co-Authored-By: Claude <noreply@anthropic.com>
t-hamano added a commit that referenced this pull request Jul 13, 2026
* Icons: Make WP_Icons_Registry::register() public

The register() method was protected, so every caller outside the registry
had to reach it through ReflectionMethod. Registering an icon is the
registry's primary purpose and is meant to be called by plugins and by
Gutenberg's own override routine, so the method should be part of the
public API rather than something callers work around with reflection.

* View Config: Remove core's filter callbacks at their registered priority

Core registers _wp_get_entity_view_config_post_type_* on the shared
get_entity_view_config_postType_{$post_type} hooks at priority 5, while the
plugin tried to remove them at the default priority 10. remove_filter() only
matches a callback at the priority it is given, so the core callbacks survived
and ran ahead of the plugin's own. They expect an object container, but this
branch's filter passes an array, so they fatal with "Call to a member function
set() on array" on every view config request.

Pass the priority reported by has_filter() to remove_filter() so the core
defaults are actually removed and only the plugin's array-based callbacks run.

Co-Authored-By: Claude <noreply@anthropic.com>

* View Config: Align the filter registration with trunk

Follow-up to the previous commit, mirroring the registration logic that landed
on trunk in #79809.

Register the plugin's callbacks at priority 5, the same priority core uses for
its own base definitions, so that third-party callbacks registered at the
default priority compose on top of them regardless of registration order. Guard
the registration with function_exists() so a post type that core covers but the
plugin does not simply falls back to the default configuration instead of
hooking a callback that does not exist.

Co-Authored-By: Claude <noreply@anthropic.com>

* Icons: Remove core's default icon registration when overriding the registry

Core registers its `core/` icons on `init` at priority 10 via
`_wp_register_default_icons()`. The plugin swaps the registry singleton for
WP_Icons_Registry_Gutenberg on `init` at priority 1, and that registry already
populated the `core/` icons from the plugin's own manifest. Core's callback then
re-registers the same names on the plugin registry, emitting an "Icon is already
registered." notice for every core icon on plugin activation.

Remove core's callback before it runs, reading its priority from has_action() so
the removal keeps working if core changes it.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Jul 14, 2026
This updates the pinned commit hash of the Gutenberg repository from `b5574edc8a952b2f1e528693761a97b1b3b580eb` (version `23.5.0`) to `2872d71cde528d82675f14862a1b84e2b8abbaea` (version `23.6.0 RC1`).

A full list of changes included in this commit can be found on GitHub: https://github.com/WordPress/gutenberg/compare/v23.5.0..v23.6.0-rc.1.

- IconButton: Use length zero for inline padding (WordPress/gutenberg#79722)
- Button: Align focus styles with design system (WordPress/gutenberg#78646)
- Remove playlist border radius support (WordPress/gutenberg#79753)
- ExternalLink: Stop setting default rel (WordPress/gutenberg#79743)
- Icons: Validate SVG icons include currentColor (WordPress/gutenberg#79751)
- Tests: Fix flaky 'GIF to Video' e2e test (WordPress/gutenberg#79758)
- CSS: Follow-up fixes to split_selector_list() (WordPress/gutenberg#79723)
- Automated Testing: Enforce no-unresolved checks for test files (WordPress/gutenberg#79718)
- Fix and permit unitless zeros used in CSS `calc` functions (WordPress/gutenberg#79786)
- Components: migrate View away from Emotion (WordPress/gutenberg#79443)
- Badge: update storybook with "don't use icons" example (WordPress/gutenberg#79585)
- Tabs: Prevent tab list from moving focus during revision navigation (WordPress/gutenberg#79730)
- Embed: Refactor 'EmbedPlaceholder' to use recommended components (WordPress/gutenberg#79759)
- RTC: Remove collaboration notification defaults filter (WordPress/gutenberg#79771)
- Tests: Honor waitForUploadQueueEmpty timeout in client-side media (WordPress/gutenberg#79783)
- lintstaged: Avoid appending filenames to the `prelint:js` command (WordPress/gutenberg#79800)
- Guidelines: Render block icons like the editor so every icon displays correctly (WordPress/gutenberg#79738)
- Isolated mode: Fix bin resolution, type mismatch, and missing dependencies (WordPress/gutenberg#79806)
- Duotone: Use HTML API class_list for duotone wrapper class handling (WordPress/gutenberg#79531)
- Deprecate `@wordpress/reusable-blocks` public APIs (WordPress/gutenberg#79805)
- UI: add LinkButton (WordPress/gutenberg#78944)
- Block Library: Replace obsolete `View` primitive with plain `div` (WordPress/gutenberg#79767)
- Site Editor: Update default theme color from fresh to modern (WordPress/gutenberg#79814)
- Prevent overscroll bounce for stage and inspector surfaces (WordPress/gutenberg#78587)
- Widgets: add attribute `relevance` and inline editing in the tile toolbar (WordPress/gutenberg#79735)
- Automated Testing: Configure lint:css to report needless disables (WordPress/gutenberg#79788)
- FormTokenField: Hard deprecate 40px default size (WordPress/gutenberg#79720)
- UnitControl: Hard deprecate 40px default size (WordPress/gutenberg#79721)
- Omnibar: move the 'site icon in admin bar' feature from experiment to 7.1 compat (WordPress/gutenberg#79807)
- Update waveform player dependency to bring in upstream a11y improvements (WordPress/gutenberg#79825)
- Backport changelog and package version updates from NPM (WordPress/gutenberg#79816)
- Block variations: Support innerContent for the Custom HTML block (WordPress/gutenberg#79659)
- Packages: Polish release changelog headings (WordPress/gutenberg#79826)
- Theme: Clarify focus token naming docs (WordPress/gutenberg#79764)
- Media: Return the filtered `wp_editor_set_quality` value in the upload response (WordPress/gutenberg#78420)
- Media: Backport client-side media improvements from WordPress core backports (WordPress/gutenberg#79603)
- Dynamic Gallery Block: Add a dynamic mode of the gallery block (WordPress/gutenberg#78796)
- Global Styles: Match block panel order to the block inspector (WordPress/gutenberg#79794)
- Verse block: add background gradient support (WordPress/gutenberg#79391)
- UI: Add Skeleton component (WordPress/gutenberg#79671)
- Widgets: add a declarative `help` metadata field, surfaced as a header infotip (WordPress/gutenberg#79830)
- CustomSelectControl: Hard deprecate 40px default size (WordPress/gutenberg#79796)
- Use subscribeDelegatedListener for selectionchange in rich text (WordPress/gutenberg#79712)
- Vips: preserve bit depth of high-bit-depth AVIF in sub-sizes (WordPress/gutenberg#79556)
- DataViews: Fix infinite-scroll jump on async page loads (WordPress/gutenberg#79546)
- Added Missing Global Documentation (WordPress/gutenberg#79827)
- Vips: Add positional-crop test for high-bit-depth AVIF (WordPress/gutenberg#79880)
- Responsive style states: Update responsive editing help text and avoid showing desktop badge (WordPress/gutenberg#79615)
- Packages: Update Ariakit to 0.4.32 (WordPress/gutenberg#79860)
- Block position: Allow options dropdown to flip (WordPress/gutenberg#79798)
- Command Palette: show the search icon on desktop as well (WordPress/gutenberg#79881)
- Docs: Clarify release recovery steps (WordPress/gutenberg#79884)
- Widgets: auto-save inline attribute edits (WordPress/gutenberg#79808)
- Classic block: Remove migration notice and restore inserter availability (WordPress/gutenberg#79894)
- Media: enable uploading images inserted by URL (WordPress/gutenberg#79409)
- Editor: saveDirtyEntities: don't allow onSave to filter records (WordPress/gutenberg#79850)
- Theme: Use token reference as docs source (WordPress/gutenberg#79829)
- RTC: Add RTC WebSocket tests to CI (WordPress/gutenberg#79757)
- Components: migrate Flex to SCSS module (WordPress/gutenberg#79450)
- Collaboration: only report changed properties from the default sync config (WordPress/gutenberg#79908)
- ThemeProvider: Document wrapper customization scope (WordPress/gutenberg#79763)
- Backfill unreleased changelog entries for the widget packages (WordPress/gutenberg#79909)
- Remove unused FocalPointPicker style.scss (WordPress/gutenberg#79902)
- SelectControl: Hard deprecate 40px default size (WordPress/gutenberg#79797)
- Github workflows: extend package changelog nudge to bundled packages (WordPress/gutenberg#78934)
- DimensionControl: Include styles in stylesheet (WordPress/gutenberg#79916)
- Skip flakey collaboration e2e test (WordPress/gutenberg#79922)
- Backport Changelog: Link Core PR WordPress/gutenberg#12007 for WordPress/gutenberg#75793 (WordPress/gutenberg#78786)
- Block Style Variations: Simplify block style variation selector regex (WordPress/gutenberg#79924)
- View Config: Add version handling (WordPress/gutenberg#79809)
- HTML Block: Preserve innerContent when transforming to group, columns (WordPress/gutenberg#79887)
- remove layout settings from widget dashboard (WordPress/gutenberg#79903)
- Components: migrate Theme away from Emotion (WordPress/gutenberg#79447)
- Blocks package: Stabilize `cloneSanitizedBlock` and `sanitizeBlockAttributes` (WordPress/gutenberg#79928)
- Move real-time collaboration compat code to wordpress-7.1 (WordPress/gutenberg#79863)
- Button: Fix focus ring for link (WordPress/gutenberg#79837)
- Fix: DataForm inspector shows raw "auto-draft" status for new posts (WordPress/gutenberg#79914)
- Block Supports: Prevent Additional CSS duplication inside Query Loop (WordPress/gutenberg#78282)
- Code Quality: Use modern PHP string functions instead of strpos/substr (WordPress/gutenberg#79927)
- Playlist: seek value text localization (WordPress/gutenberg#79834)
- Code Quality: Use null coalescing operator instead of isset() ternaries (WordPress/gutenberg#79946)
- Block editor: Fix clipped/doubled focus outline on inserter block list items (WordPress/gutenberg#79845)
- Lint-staged: Match lint:css file globs (WordPress/gutenberg#79918)
- Latest Posts: Parse blocks in full content display (WordPress/gutenberg#74866)
- Block Editor: Share block-bindings context assembly between call sites (WordPress/gutenberg#79855)
- Stylelint: Enforce class naming for all stylesheets (WordPress/gutenberg#79900)
- Components: migrate Spacer to SCSS module (WordPress/gutenberg#79449)
- Design system MCP: Document Codex CLI prerequisite for MCP setup (WordPress/gutenberg#79917)
- NumberControl: Hard deprecate 40px default size (WordPress/gutenberg#79861)
- Remove unused customizer-edit-widgets-initializer style.scss (WordPress/gutenberg#79915)
- stylelint-config: Convert config to ESM (WordPress/gutenberg#79755)
- Button: Fix suppressed ESLint errors (WordPress/gutenberg#79944)
- Replace user-based authentication with a GitHub App for release-related logic (WordPress/gutenberg#79912)
- Set selection before typing in RTC stress test (WordPress/gutenberg#79954)
- Navigation Link/Submenu: run should-render check also without gutenberg plugin (WordPress/gutenberg#79748)
- Rich Text: Move RichTextShortcut and RichTextInputEvent into @wordpress/rich-text (WordPress/gutenberg#79828)
- Docs: Generalize the `npx` guidance in AGENTS.md to cover `wp-scripts` (WordPress/gutenberg#79973)
- Media: Fix fatal error from narrowed create_item_from_url() visibility (WordPress/gutenberg#79972)
- Editor: render back button as true <Button> and remove custom CSS (WordPress/gutenberg#79862)
- SandBox: Inject resize script into head to stop it leaking as text (WordPress/gutenberg#79920)
- Tabs: Remove editor-only block context (WordPress/gutenberg#79848)
- Allow setting viewport tablet and mobile values in theme.json (WordPress/gutenberg#79104)
- Media Inserter: Guard attach, detach, and invalidate behind a ! isExternalResource check (WordPress/gutenberg#79978)
- BorderBoxControl: Fix unlink button positioning after View Emotion migration (WordPress/gutenberg#79967)
- List: Fix suppressed ESLint errors (WordPress/gutenberg#79983)
- Media Modals: Invalidate attachment caches when closing the modal (WordPress/gutenberg#79844)
- Perf tests: wait for upload queue to settle between media-upload iterations (WordPress/gutenberg#79952)
- GIF block variation: Remove icons from "Display as" toolbar buttons and only show when block can be inserted (WordPress/gutenberg#79985)
- Stylelint: Lint all CSS file extensions (WordPress/gutenberg#79957)
- Project automation: Stop flagging returning contributors as first-timers when they use hidden email addresses (WordPress/gutenberg#79987)
- PHP-Only blocks: forward current post ID to server render (WordPress/gutenberg#78909)
- Widget Dashboard: reserve paint space for tile focus rings (WordPress/gutenberg#79990)
- Playlist: Show album art thumbnails (WordPress/gutenberg#79942)
- Editor: Preload the view config form request for the DataForm inspector (WordPress/gutenberg#79910)
- Properly configure Git user metadata for new app. (WordPress/gutenberg#80005)
- Site Editor v2 experiment: correctly hide admin bar in distraction-free mode (WordPress/gutenberg#79937)
- Switch from App ID to App user ID in git metadata. (WordPress/gutenberg#80006)
- Playlist block: Avoid laggy layout shift when changing tracks (WordPress/gutenberg#79497)
- Add ariaLabel supports for Tab List Block (WordPress/gutenberg#79948)
- Restore responsive editing viewport dropdown copy changes (WordPress/gutenberg#79999)
- Enable default gap processing on Gallery block (WordPress/gutenberg#79984)
- Hide block toolbar slots when editing a responsive style state (WordPress/gutenberg#79998)
- Tabs: Fix active tab switching from a stale inner-block selection (WordPress/gutenberg#79981)
- Added Missing Global Documentation (WordPress/gutenberg#80033)
- Media editor: address accessibility review feedback (WordPress/gutenberg#79966)
- Build: Fix non-breaking npm audit vulnerability alerts (WordPress/gutenberg#79886)
- Style Book: Pass site editor settings to StyleBookPreview on the styles route (WordPress/gutenberg#80035)
- Editor: Fix regression and restore the back button focus ring (WordPress/gutenberg#80029)
- Editor: render mobile back button as proper <Button> and remove custom CSS (WordPress/gutenberg#80032)
- Style Book: Migrate to Tabs from @wordpress/ui (WordPress/gutenberg#80040)
- Document widget relevance, help (WordPress/gutenberg#80007)
- Visual revisions: Label autosaves in the revisions timeline (WordPress/gutenberg#79950)
- Fix flaky "can use appender in site editor sidebar list view" e2e test (WordPress/gutenberg#80044)
- Theme: Fix token story swatch accessibility (WordPress/gutenberg#79960)
- Global Styles: Show skeleton placeholder while previews load (WordPress/gutenberg#79849)
- Theme: Fill semantic token state gaps (WordPress/gutenberg#79770)
- Theme: Document accessibility responsibilities (WordPress/gutenberg#79943)
- Theme: Restrict seed colors to opaque values (WordPress/gutenberg#79773)
- Theme: Document token naming grammar (WordPress/gutenberg#79769)
- RTC: Only apply CRDT updates synchronously when collaborating (WordPress/gutenberg#79991)
- Bump docker/login-action from 4.2.0 to 4.4.0 in /.github/workflows in the github-actions group across 1 directory (WordPress/gutenberg#80047)
- Packages: Widen React peer dependency support to include React 19 (WordPress/gutenberg#80024)
- Tabs: track overflow by observing each tab, mirroring Base UI (WordPress/gutenberg#79856)
- Theme: Update design token format links (WordPress/gutenberg#80052)
- design-system-mcp: Use fixed version for alpha MCP server (WordPress/gutenberg#80061)
- Fix global gap styles for Gallery block (WordPress/gutenberg#80030)
- Notes: Add a "Resolved" divider above resolved notes (WordPress/gutenberg#80019)
- Checkbox: Add form primitive to @wordpress/ui (WordPress/gutenberg#80039)
- InputControl: Hard deprecate 40px default size (WordPress/gutenberg#79962)
- Panel: fix focus style for toggle button (WordPress/gutenberg#80064)
- GIF to video conversion: make it opt-in. Switching via block transforms (WordPress/gutenberg#80072)
- Theme: Make @wordpress/theme ESM only (WordPress/gutenberg#80063)
- theme: Clarify package docs (WordPress/gutenberg#79961)
- Fix focus ring for document bar (WordPress/gutenberg#80084)
- Visual revisions: Make the autosave notice work with the visual revisions UI (WordPress/gutenberg#79947)
- Fix flaky 'Activate theme' e2e test (WordPress/gutenberg#80090)
- Fix playlist artwork removal on track switch (WordPress/gutenberg#80025)
- Move styles into specific waveform styles dropdown area (WordPress/gutenberg#80060)
- stylelint-config: Enable token fallback rule (WordPress/gutenberg#79768)
- Fix flashing track state when adding new track (WordPress/gutenberg#80076)
- Icons: Filter the icon library picker by collection (WordPress/gutenberg#79681)
- Post editor: always iframe (WordPress/gutenberg#74042)
- A11y: replace local aria-live regions with speak() (WordPress/gutenberg#79600)
- Generalize playlist block wording (WordPress/gutenberg#80071)
- Docs: Add missing @param and @return tags to REST API compat functions (WordPress/gutenberg#80079)
- Guidelines: Add Blocks as a registry scope (WordPress/gutenberg#79709)
- Allow font size customization (WordPress/gutenberg#80069)
- UI: Restore Link focus styles (WordPress/gutenberg#80091)
- Editor: use the DS focus color for all sidebar elements (WordPress/gutenberg#80087)
- File Block: Changed the context for fetching the media (WordPress/gutenberg#80085)
- Theme: Remove elevation tokens (WordPress/gutenberg#80099)
- Build: Upgrade to TypeScript 7.0 (WordPress/gutenberg#80083)
- Connectors: add application password settings UI (WordPress/gutenberg#79403)
- Icons: Unify collection-scoping route param on `collection` and validate description (WordPress/gutenberg#80113)
- Add translation comment to waveform styles (WordPress/gutenberg#80112)
- Playlist: use PlainText v2 to avoid HTML entities (WordPress/gutenberg#80068)
- Move inspector controls styles slot back to previous position (WordPress/gutenberg#80111)
- Fix playlist waveform artist rendering (WordPress/gutenberg#80104)
- Fix linting of waveform test (WordPress/gutenberg#80124)
- Theme: Document and test build plugin transform boundaries (WordPress/gutenberg#80088)
- CODEOWNERS: Exclude eslint suppressions.json from /tools ownership (WordPress/gutenberg#80125)
- Second click or space/enter keypress on playing track pauses it (WordPress/gutenberg#80066)
- Theme: Cover display contents wrapper focus behavior (WordPress/gutenberg#80056)
- wp-build: Allow @wordpress/theme 1.x peer versions (WordPress/gutenberg#80089)
- Writing flow: fix selection end mapping at block boundaries (WordPress/gutenberg#80126)
- Components: link recommended UI component (WordPress/gutenberg#80127)
- Typewriter: remove the block selection gate (WordPress/gutenberg#80130)
- useMergeRefs: apply ref changes after out-of-render attachment (WordPress/gutenberg#80133)
- Observe typing on the writing flow node (WordPress/gutenberg#80131)
- Components/Button: Don't use box-shadow for secondary buttons (WordPress/gutenberg#79982)
- DataViews: Add a richtext control backed by a private RichTextControl shell in @wordpress/components (WordPress/gutenberg#78471)
- Apply and correct EXIF orientation for client side sub-sizes (WordPress/gutenberg#79384)
- Fix typo in inline comment  in `collaboration.php` (WordPress/gutenberg#80147)
- Media Inserter: Allow core media categories to subscribe to changes (WordPress/gutenberg#79921)
- Accordion block: add background gradient support (WordPress/gutenberg#79840)
- Rich text: synchronize the selection before events that consume it (WordPress/gutenberg#80151)
- Quote block: add background gradient support (WordPress/gutenberg#79843)
- Add option to exclude current post from query block (WordPress/gutenberg#64916)
- Pullquote block: add background gradient support (WordPress/gutenberg#79841)
- Block Supports: Ensure that custom CSS is output after the block library styles (WordPress/gutenberg#80062)
- Rich text: cut through the record instead of execCommand (WordPress/gutenberg#80155)
- Media Inserter: Add pagination to core media inserter categories (WordPress/gutenberg#80038)
- Responsive editing: Add a Tooltip to the viewport / states badge (WordPress/gutenberg#80080)
- Scripts: Make 'test-e2e' run Playwright and remove Puppeteer (WordPress/gutenberg#80058)
- Post Content block: add background gradient support (WordPress/gutenberg#79842)
- Notes: Remove snackbar when resolving or reopening a note (WordPress/gutenberg#80017)
- Enable text alignment to be set by viewport state (WordPress/gutenberg#80037)
- Preview dropdown: simplify viewport style state descriptions (WordPress/gutenberg#80146)
- File Block: Deduplicate the file to audio/video/image transforms (WordPress/gutenberg#80158)
- Responsive editing: Show crop dimensions on image block placeholder (WordPress/gutenberg#80162)
- Add missing docblocks to client-assets.php (WordPress/gutenberg#80135)
- Move typescript and rimraf out of the root package.json (WordPress/gutenberg#80086)
- Release: Harden latest npm metadata publishing (WordPress/gutenberg#79904)
- Add Playlist icon. (WordPress/gutenberg#80168)
- Sync changes from core for view-config version handling (WordPress/gutenberg#80170)
- CODEOWNERS: Exclude stylelint suppressions.json from /tools ownership (WordPress/gutenberg#80171)
- Editor: only show back button focus ring on :focus-visible (WordPress/gutenberg#80114)
- Release: Harden plugin release workflow guardrails (WordPress/gutenberg#79858)
- Icons: Add "sites" icon. (WordPress/gutenberg#80094)
- Flaky tests: fix widgets global inserter (WordPress/gutenberg#80177)
- Release: Harden all npm package release paths (WordPress/gutenberg#79905)
- Update `actionlint` to version `1.7.12`. (WordPress/gutenberg#79833)
- Flaky tests: fix rich text backtick undo (WordPress/gutenberg#80183)
- Button: hide Core focus ring when button as link is pressed (WordPress/gutenberg#80082)
- Term Name: Migrate to textAlign block support (WordPress/gutenberg#76581)
- Cover: allow restricting video embed providers (WordPress/gutenberg#80092)
- Playlist icon: Fix bug with missing viewbox. (WordPress/gutenberg#80180)
- Use playlist icon for Playlist block (WordPress/gutenberg#80174)
- Build: Make installed-deps check layout-agnostic and surface opt-out env var (WordPress/gutenberg#79687)
- Blocks: Rename _gutenberg_apply_content_filters() to _wp_apply_content_filters() (WordPress/gutenberg#80191)
- Tabs: Wrap tab list onto multiple lines by default (WordPress/gutenberg#80097)
- Flaky tests: fix writing flow arrow navigation (WordPress/gutenberg#80179)
- Theme: Use public design token stylesheet imports (WordPress/gutenberg#80050)
- Simplify playlist waveform metadata updates (WordPress/gutenberg#80193)
- Notes: Support inline rich text (bold, italic, link, code) (WordPress/gutenberg#78242)
- Playlist Block: Add artwork to play button (WordPress/gutenberg#79938)
- Cover Block: Fix unsaveable state when clearing an embed video background (WordPress/gutenberg#80184)
- DS: Name font weight tokens by intent (WordPress/gutenberg#80093)
- theme: Validate npm publish surface (WordPress/gutenberg#79552)
- Theme: Remove experimental package messaging (WordPress/gutenberg#80049)
- Playlist Block: add waveform and waveform background color options (WordPress/gutenberg#80065)
- Add more workflow file static analysis with Zizmor (WordPress/gutenberg#71523)
- Block Editor: Simplify layout panel selector getter (WordPress/gutenberg#80176)
- Media Inserter: Omit page arg from requests for the first set of results (WordPress/gutenberg#80219)
- Notes: Add @mention autocomplete (WordPress/gutenberg#79604)
- Latest Posts: Fix slow category selection with large category lists (WordPress/gutenberg#80198)
- Block visibility: add theme json opt out (WordPress/gutenberg#76559)
- Add an `editableRoot` block support for native cross-block selection (WordPress/gutenberg#79105)
- Notes: Allow canceling the autocompleter popover with Escape without dismissing the note form (WordPress/gutenberg#80224)
- Add contrast checking for viewport and pseudo states (WordPress/gutenberg#80223)
- Blocks: Rename _wp_apply_content_filters() to _wp_apply_block_content_filters() (WordPress/gutenberg#80225)
- Widget Primitives: Add a field type registry for widget attributes (WordPress/gutenberg#80148)
- Icon block: When the default icon is unregistered, nothing is displayed (WordPress/gutenberg#80166)
- Make the Playlist blocks stable (WordPress/gutenberg#80203)
- Autocomplete: Use regular weight for result items (WordPress/gutenberg#80196)
- Make pause button visually same size as play button (WordPress/gutenberg#80217)
- Editor: Render post preview action as a menu item (WordPress/gutenberg#80195)
- Release: Fail changelog generation cleanly (WordPress/gutenberg#80175)
- Stabilize Tabs block (WordPress/gutenberg#80163)
- Theme: Correct documented default background seed (WordPress/gutenberg#80237)
- Block Supports: Improve handling of block class name to avoid fatal (WordPress/gutenberg#80214)
- Rename 'Responsive editing' toggle to 'Responsive styles' (WordPress/gutenberg#80241)
- Release: Make npm publishing rerunnable (WordPress/gutenberg#80187)
- Only include icon library SVGs listed as `public` in the Zip file published to GitHub Container Registry for `wordpress-develop` (WordPress/gutenberg#79338)

Props desrosj, wildworks.
Fixes #65529.
Built from https://develop.svn.wordpress.org/trunk@62739


git-svn-id: http://core.svn.wordpress.org/trunk@62023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
pull Bot pushed a commit to tigefa4u/wordpress-develop that referenced this pull request Jul 14, 2026
This updates the pinned commit hash of the Gutenberg repository from `b5574edc8a952b2f1e528693761a97b1b3b580eb` (version `23.5.0`) to `2872d71cde528d82675f14862a1b84e2b8abbaea` (version `23.6.0 RC1`).

A full list of changes included in this commit can be found on GitHub: https://github.com/WordPress/gutenberg/compare/v23.5.0..v23.6.0-rc.1.

- IconButton: Use length zero for inline padding (WordPress/gutenberg#79722)
- Button: Align focus styles with design system (WordPress/gutenberg#78646)
- Remove playlist border radius support (WordPress/gutenberg#79753)
- ExternalLink: Stop setting default rel (WordPress/gutenberg#79743)
- Icons: Validate SVG icons include currentColor (WordPress/gutenberg#79751)
- Tests: Fix flaky 'GIF to Video' e2e test (WordPress/gutenberg#79758)
- CSS: Follow-up fixes to split_selector_list() (WordPress/gutenberg#79723)
- Automated Testing: Enforce no-unresolved checks for test files (WordPress/gutenberg#79718)
- Fix and permit unitless zeros used in CSS `calc` functions (WordPress/gutenberg#79786)
- Components: migrate View away from Emotion (WordPress/gutenberg#79443)
- Badge: update storybook with "don't use icons" example (WordPress/gutenberg#79585)
- Tabs: Prevent tab list from moving focus during revision navigation (WordPress/gutenberg#79730)
- Embed: Refactor 'EmbedPlaceholder' to use recommended components (WordPress/gutenberg#79759)
- RTC: Remove collaboration notification defaults filter (WordPress/gutenberg#79771)
- Tests: Honor waitForUploadQueueEmpty timeout in client-side media (WordPress/gutenberg#79783)
- lintstaged: Avoid appending filenames to the `prelint:js` command (WordPress/gutenberg#79800)
- Guidelines: Render block icons like the editor so every icon displays correctly (WordPress/gutenberg#79738)
- Isolated mode: Fix bin resolution, type mismatch, and missing dependencies (WordPress/gutenberg#79806)
- Duotone: Use HTML API class_list for duotone wrapper class handling (WordPress/gutenberg#79531)
- Deprecate `@wordpress/reusable-blocks` public APIs (WordPress/gutenberg#79805)
- UI: add LinkButton (WordPress/gutenberg#78944)
- Block Library: Replace obsolete `View` primitive with plain `div` (WordPress/gutenberg#79767)
- Site Editor: Update default theme color from fresh to modern (WordPress/gutenberg#79814)
- Prevent overscroll bounce for stage and inspector surfaces (WordPress/gutenberg#78587)
- Widgets: add attribute `relevance` and inline editing in the tile toolbar (WordPress/gutenberg#79735)
- Automated Testing: Configure lint:css to report needless disables (WordPress/gutenberg#79788)
- FormTokenField: Hard deprecate 40px default size (WordPress/gutenberg#79720)
- UnitControl: Hard deprecate 40px default size (WordPress/gutenberg#79721)
- Omnibar: move the 'site icon in admin bar' feature from experiment to 7.1 compat (WordPress/gutenberg#79807)
- Update waveform player dependency to bring in upstream a11y improvements (WordPress/gutenberg#79825)
- Backport changelog and package version updates from NPM (WordPress/gutenberg#79816)
- Block variations: Support innerContent for the Custom HTML block (WordPress/gutenberg#79659)
- Packages: Polish release changelog headings (WordPress/gutenberg#79826)
- Theme: Clarify focus token naming docs (WordPress/gutenberg#79764)
- Media: Return the filtered `wp_editor_set_quality` value in the upload response (WordPress/gutenberg#78420)
- Media: Backport client-side media improvements from WordPress core backports (WordPress/gutenberg#79603)
- Dynamic Gallery Block: Add a dynamic mode of the gallery block (WordPress/gutenberg#78796)
- Global Styles: Match block panel order to the block inspector (WordPress/gutenberg#79794)
- Verse block: add background gradient support (WordPress/gutenberg#79391)
- UI: Add Skeleton component (WordPress/gutenberg#79671)
- Widgets: add a declarative `help` metadata field, surfaced as a header infotip (WordPress/gutenberg#79830)
- CustomSelectControl: Hard deprecate 40px default size (WordPress/gutenberg#79796)
- Use subscribeDelegatedListener for selectionchange in rich text (WordPress/gutenberg#79712)
- Vips: preserve bit depth of high-bit-depth AVIF in sub-sizes (WordPress/gutenberg#79556)
- DataViews: Fix infinite-scroll jump on async page loads (WordPress/gutenberg#79546)
- Added Missing Global Documentation (WordPress/gutenberg#79827)
- Vips: Add positional-crop test for high-bit-depth AVIF (WordPress/gutenberg#79880)
- Responsive style states: Update responsive editing help text and avoid showing desktop badge (WordPress/gutenberg#79615)
- Packages: Update Ariakit to 0.4.32 (WordPress/gutenberg#79860)
- Block position: Allow options dropdown to flip (WordPress/gutenberg#79798)
- Command Palette: show the search icon on desktop as well (WordPress/gutenberg#79881)
- Docs: Clarify release recovery steps (WordPress/gutenberg#79884)
- Widgets: auto-save inline attribute edits (WordPress/gutenberg#79808)
- Classic block: Remove migration notice and restore inserter availability (WordPress/gutenberg#79894)
- Media: enable uploading images inserted by URL (WordPress/gutenberg#79409)
- Editor: saveDirtyEntities: don't allow onSave to filter records (WordPress/gutenberg#79850)
- Theme: Use token reference as docs source (WordPress/gutenberg#79829)
- RTC: Add RTC WebSocket tests to CI (WordPress/gutenberg#79757)
- Components: migrate Flex to SCSS module (WordPress/gutenberg#79450)
- Collaboration: only report changed properties from the default sync config (WordPress/gutenberg#79908)
- ThemeProvider: Document wrapper customization scope (WordPress/gutenberg#79763)
- Backfill unreleased changelog entries for the widget packages (WordPress/gutenberg#79909)
- Remove unused FocalPointPicker style.scss (WordPress/gutenberg#79902)
- SelectControl: Hard deprecate 40px default size (WordPress/gutenberg#79797)
- Github workflows: extend package changelog nudge to bundled packages (WordPress/gutenberg#78934)
- DimensionControl: Include styles in stylesheet (WordPress/gutenberg#79916)
- Skip flakey collaboration e2e test (WordPress/gutenberg#79922)
- Backport Changelog: Link Core PR WordPress/gutenberg#12007 for WordPress/gutenberg#75793 (WordPress/gutenberg#78786)
- Block Style Variations: Simplify block style variation selector regex (WordPress/gutenberg#79924)
- View Config: Add version handling (WordPress/gutenberg#79809)
- HTML Block: Preserve innerContent when transforming to group, columns (WordPress/gutenberg#79887)
- remove layout settings from widget dashboard (WordPress/gutenberg#79903)
- Components: migrate Theme away from Emotion (WordPress/gutenberg#79447)
- Blocks package: Stabilize `cloneSanitizedBlock` and `sanitizeBlockAttributes` (WordPress/gutenberg#79928)
- Move real-time collaboration compat code to wordpress-7.1 (WordPress/gutenberg#79863)
- Button: Fix focus ring for link (WordPress/gutenberg#79837)
- Fix: DataForm inspector shows raw "auto-draft" status for new posts (WordPress/gutenberg#79914)
- Block Supports: Prevent Additional CSS duplication inside Query Loop (WordPress/gutenberg#78282)
- Code Quality: Use modern PHP string functions instead of strpos/substr (WordPress/gutenberg#79927)
- Playlist: seek value text localization (WordPress/gutenberg#79834)
- Code Quality: Use null coalescing operator instead of isset() ternaries (WordPress/gutenberg#79946)
- Block editor: Fix clipped/doubled focus outline on inserter block list items (WordPress/gutenberg#79845)
- Lint-staged: Match lint:css file globs (WordPress/gutenberg#79918)
- Latest Posts: Parse blocks in full content display (WordPress/gutenberg#74866)
- Block Editor: Share block-bindings context assembly between call sites (WordPress/gutenberg#79855)
- Stylelint: Enforce class naming for all stylesheets (WordPress/gutenberg#79900)
- Components: migrate Spacer to SCSS module (WordPress/gutenberg#79449)
- Design system MCP: Document Codex CLI prerequisite for MCP setup (WordPress/gutenberg#79917)
- NumberControl: Hard deprecate 40px default size (WordPress/gutenberg#79861)
- Remove unused customizer-edit-widgets-initializer style.scss (WordPress/gutenberg#79915)
- stylelint-config: Convert config to ESM (WordPress/gutenberg#79755)
- Button: Fix suppressed ESLint errors (WordPress/gutenberg#79944)
- Replace user-based authentication with a GitHub App for release-related logic (WordPress/gutenberg#79912)
- Set selection before typing in RTC stress test (WordPress/gutenberg#79954)
- Navigation Link/Submenu: run should-render check also without gutenberg plugin (WordPress/gutenberg#79748)
- Rich Text: Move RichTextShortcut and RichTextInputEvent into @wordpress/rich-text (WordPress/gutenberg#79828)
- Docs: Generalize the `npx` guidance in AGENTS.md to cover `wp-scripts` (WordPress/gutenberg#79973)
- Media: Fix fatal error from narrowed create_item_from_url() visibility (WordPress/gutenberg#79972)
- Editor: render back button as true <Button> and remove custom CSS (WordPress/gutenberg#79862)
- SandBox: Inject resize script into head to stop it leaking as text (WordPress/gutenberg#79920)
- Tabs: Remove editor-only block context (WordPress/gutenberg#79848)
- Allow setting viewport tablet and mobile values in theme.json (WordPress/gutenberg#79104)
- Media Inserter: Guard attach, detach, and invalidate behind a ! isExternalResource check (WordPress/gutenberg#79978)
- BorderBoxControl: Fix unlink button positioning after View Emotion migration (WordPress/gutenberg#79967)
- List: Fix suppressed ESLint errors (WordPress/gutenberg#79983)
- Media Modals: Invalidate attachment caches when closing the modal (WordPress/gutenberg#79844)
- Perf tests: wait for upload queue to settle between media-upload iterations (WordPress/gutenberg#79952)
- GIF block variation: Remove icons from "Display as" toolbar buttons and only show when block can be inserted (WordPress/gutenberg#79985)
- Stylelint: Lint all CSS file extensions (WordPress/gutenberg#79957)
- Project automation: Stop flagging returning contributors as first-timers when they use hidden email addresses (WordPress/gutenberg#79987)
- PHP-Only blocks: forward current post ID to server render (WordPress/gutenberg#78909)
- Widget Dashboard: reserve paint space for tile focus rings (WordPress/gutenberg#79990)
- Playlist: Show album art thumbnails (WordPress/gutenberg#79942)
- Editor: Preload the view config form request for the DataForm inspector (WordPress/gutenberg#79910)
- Properly configure Git user metadata for new app. (WordPress/gutenberg#80005)
- Site Editor v2 experiment: correctly hide admin bar in distraction-free mode (WordPress/gutenberg#79937)
- Switch from App ID to App user ID in git metadata. (WordPress/gutenberg#80006)
- Playlist block: Avoid laggy layout shift when changing tracks (WordPress/gutenberg#79497)
- Add ariaLabel supports for Tab List Block (WordPress/gutenberg#79948)
- Restore responsive editing viewport dropdown copy changes (WordPress/gutenberg#79999)
- Enable default gap processing on Gallery block (WordPress/gutenberg#79984)
- Hide block toolbar slots when editing a responsive style state (WordPress/gutenberg#79998)
- Tabs: Fix active tab switching from a stale inner-block selection (WordPress/gutenberg#79981)
- Added Missing Global Documentation (WordPress/gutenberg#80033)
- Media editor: address accessibility review feedback (WordPress/gutenberg#79966)
- Build: Fix non-breaking npm audit vulnerability alerts (WordPress/gutenberg#79886)
- Style Book: Pass site editor settings to StyleBookPreview on the styles route (WordPress/gutenberg#80035)
- Editor: Fix regression and restore the back button focus ring (WordPress/gutenberg#80029)
- Editor: render mobile back button as proper <Button> and remove custom CSS (WordPress/gutenberg#80032)
- Style Book: Migrate to Tabs from @wordpress/ui (WordPress/gutenberg#80040)
- Document widget relevance, help (WordPress/gutenberg#80007)
- Visual revisions: Label autosaves in the revisions timeline (WordPress/gutenberg#79950)
- Fix flaky "can use appender in site editor sidebar list view" e2e test (WordPress/gutenberg#80044)
- Theme: Fix token story swatch accessibility (WordPress/gutenberg#79960)
- Global Styles: Show skeleton placeholder while previews load (WordPress/gutenberg#79849)
- Theme: Fill semantic token state gaps (WordPress/gutenberg#79770)
- Theme: Document accessibility responsibilities (WordPress/gutenberg#79943)
- Theme: Restrict seed colors to opaque values (WordPress/gutenberg#79773)
- Theme: Document token naming grammar (WordPress/gutenberg#79769)
- RTC: Only apply CRDT updates synchronously when collaborating (WordPress/gutenberg#79991)
- Bump docker/login-action from 4.2.0 to 4.4.0 in /.github/workflows in the github-actions group across 1 directory (WordPress/gutenberg#80047)
- Packages: Widen React peer dependency support to include React 19 (WordPress/gutenberg#80024)
- Tabs: track overflow by observing each tab, mirroring Base UI (WordPress/gutenberg#79856)
- Theme: Update design token format links (WordPress/gutenberg#80052)
- design-system-mcp: Use fixed version for alpha MCP server (WordPress/gutenberg#80061)
- Fix global gap styles for Gallery block (WordPress/gutenberg#80030)
- Notes: Add a "Resolved" divider above resolved notes (WordPress/gutenberg#80019)
- Checkbox: Add form primitive to @wordpress/ui (WordPress/gutenberg#80039)
- InputControl: Hard deprecate 40px default size (WordPress/gutenberg#79962)
- Panel: fix focus style for toggle button (WordPress/gutenberg#80064)
- GIF to video conversion: make it opt-in. Switching via block transforms (WordPress/gutenberg#80072)
- Theme: Make @wordpress/theme ESM only (WordPress/gutenberg#80063)
- theme: Clarify package docs (WordPress/gutenberg#79961)
- Fix focus ring for document bar (WordPress/gutenberg#80084)
- Visual revisions: Make the autosave notice work with the visual revisions UI (WordPress/gutenberg#79947)
- Fix flaky 'Activate theme' e2e test (WordPress/gutenberg#80090)
- Fix playlist artwork removal on track switch (WordPress/gutenberg#80025)
- Move styles into specific waveform styles dropdown area (WordPress/gutenberg#80060)
- stylelint-config: Enable token fallback rule (WordPress/gutenberg#79768)
- Fix flashing track state when adding new track (WordPress/gutenberg#80076)
- Icons: Filter the icon library picker by collection (WordPress/gutenberg#79681)
- Post editor: always iframe (WordPress/gutenberg#74042)
- A11y: replace local aria-live regions with speak() (WordPress/gutenberg#79600)
- Generalize playlist block wording (WordPress/gutenberg#80071)
- Docs: Add missing @param and @return tags to REST API compat functions (WordPress/gutenberg#80079)
- Guidelines: Add Blocks as a registry scope (WordPress/gutenberg#79709)
- Allow font size customization (WordPress/gutenberg#80069)
- UI: Restore Link focus styles (WordPress/gutenberg#80091)
- Editor: use the DS focus color for all sidebar elements (WordPress/gutenberg#80087)
- File Block: Changed the context for fetching the media (WordPress/gutenberg#80085)
- Theme: Remove elevation tokens (WordPress/gutenberg#80099)
- Build: Upgrade to TypeScript 7.0 (WordPress/gutenberg#80083)
- Connectors: add application password settings UI (WordPress/gutenberg#79403)
- Icons: Unify collection-scoping route param on `collection` and validate description (WordPress/gutenberg#80113)
- Add translation comment to waveform styles (WordPress/gutenberg#80112)
- Playlist: use PlainText v2 to avoid HTML entities (WordPress/gutenberg#80068)
- Move inspector controls styles slot back to previous position (WordPress/gutenberg#80111)
- Fix playlist waveform artist rendering (WordPress/gutenberg#80104)
- Fix linting of waveform test (WordPress/gutenberg#80124)
- Theme: Document and test build plugin transform boundaries (WordPress/gutenberg#80088)
- CODEOWNERS: Exclude eslint suppressions.json from /tools ownership (WordPress/gutenberg#80125)
- Second click or space/enter keypress on playing track pauses it (WordPress/gutenberg#80066)
- Theme: Cover display contents wrapper focus behavior (WordPress/gutenberg#80056)
- wp-build: Allow @wordpress/theme 1.x peer versions (WordPress/gutenberg#80089)
- Writing flow: fix selection end mapping at block boundaries (WordPress/gutenberg#80126)
- Components: link recommended UI component (WordPress/gutenberg#80127)
- Typewriter: remove the block selection gate (WordPress/gutenberg#80130)
- useMergeRefs: apply ref changes after out-of-render attachment (WordPress/gutenberg#80133)
- Observe typing on the writing flow node (WordPress/gutenberg#80131)
- Components/Button: Don't use box-shadow for secondary buttons (WordPress/gutenberg#79982)
- DataViews: Add a richtext control backed by a private RichTextControl shell in @wordpress/components (WordPress/gutenberg#78471)
- Apply and correct EXIF orientation for client side sub-sizes (WordPress/gutenberg#79384)
- Fix typo in inline comment  in `collaboration.php` (WordPress/gutenberg#80147)
- Media Inserter: Allow core media categories to subscribe to changes (WordPress/gutenberg#79921)
- Accordion block: add background gradient support (WordPress/gutenberg#79840)
- Rich text: synchronize the selection before events that consume it (WordPress/gutenberg#80151)
- Quote block: add background gradient support (WordPress/gutenberg#79843)
- Add option to exclude current post from query block (WordPress/gutenberg#64916)
- Pullquote block: add background gradient support (WordPress/gutenberg#79841)
- Block Supports: Ensure that custom CSS is output after the block library styles (WordPress/gutenberg#80062)
- Rich text: cut through the record instead of execCommand (WordPress/gutenberg#80155)
- Media Inserter: Add pagination to core media inserter categories (WordPress/gutenberg#80038)
- Responsive editing: Add a Tooltip to the viewport / states badge (WordPress/gutenberg#80080)
- Scripts: Make 'test-e2e' run Playwright and remove Puppeteer (WordPress/gutenberg#80058)
- Post Content block: add background gradient support (WordPress/gutenberg#79842)
- Notes: Remove snackbar when resolving or reopening a note (WordPress/gutenberg#80017)
- Enable text alignment to be set by viewport state (WordPress/gutenberg#80037)
- Preview dropdown: simplify viewport style state descriptions (WordPress/gutenberg#80146)
- File Block: Deduplicate the file to audio/video/image transforms (WordPress/gutenberg#80158)
- Responsive editing: Show crop dimensions on image block placeholder (WordPress/gutenberg#80162)
- Add missing docblocks to client-assets.php (WordPress/gutenberg#80135)
- Move typescript and rimraf out of the root package.json (WordPress/gutenberg#80086)
- Release: Harden latest npm metadata publishing (WordPress/gutenberg#79904)
- Add Playlist icon. (WordPress/gutenberg#80168)
- Sync changes from core for view-config version handling (WordPress/gutenberg#80170)
- CODEOWNERS: Exclude stylelint suppressions.json from /tools ownership (WordPress/gutenberg#80171)
- Editor: only show back button focus ring on :focus-visible (WordPress/gutenberg#80114)
- Release: Harden plugin release workflow guardrails (WordPress/gutenberg#79858)
- Icons: Add "sites" icon. (WordPress/gutenberg#80094)
- Flaky tests: fix widgets global inserter (WordPress/gutenberg#80177)
- Release: Harden all npm package release paths (WordPress/gutenberg#79905)
- Update `actionlint` to version `1.7.12`. (WordPress/gutenberg#79833)
- Flaky tests: fix rich text backtick undo (WordPress/gutenberg#80183)
- Button: hide Core focus ring when button as link is pressed (WordPress/gutenberg#80082)
- Term Name: Migrate to textAlign block support (WordPress/gutenberg#76581)
- Cover: allow restricting video embed providers (WordPress/gutenberg#80092)
- Playlist icon: Fix bug with missing viewbox. (WordPress/gutenberg#80180)
- Use playlist icon for Playlist block (WordPress/gutenberg#80174)
- Build: Make installed-deps check layout-agnostic and surface opt-out env var (WordPress/gutenberg#79687)
- Blocks: Rename _gutenberg_apply_content_filters() to _wp_apply_content_filters() (WordPress/gutenberg#80191)
- Tabs: Wrap tab list onto multiple lines by default (WordPress/gutenberg#80097)
- Flaky tests: fix writing flow arrow navigation (WordPress/gutenberg#80179)
- Theme: Use public design token stylesheet imports (WordPress/gutenberg#80050)
- Simplify playlist waveform metadata updates (WordPress/gutenberg#80193)
- Notes: Support inline rich text (bold, italic, link, code) (WordPress/gutenberg#78242)
- Playlist Block: Add artwork to play button (WordPress/gutenberg#79938)
- Cover Block: Fix unsaveable state when clearing an embed video background (WordPress/gutenberg#80184)
- DS: Name font weight tokens by intent (WordPress/gutenberg#80093)
- theme: Validate npm publish surface (WordPress/gutenberg#79552)
- Theme: Remove experimental package messaging (WordPress/gutenberg#80049)
- Playlist Block: add waveform and waveform background color options (WordPress/gutenberg#80065)
- Add more workflow file static analysis with Zizmor (WordPress/gutenberg#71523)
- Block Editor: Simplify layout panel selector getter (WordPress/gutenberg#80176)
- Media Inserter: Omit page arg from requests for the first set of results (WordPress/gutenberg#80219)
- Notes: Add @mention autocomplete (WordPress/gutenberg#79604)
- Latest Posts: Fix slow category selection with large category lists (WordPress/gutenberg#80198)
- Block visibility: add theme json opt out (WordPress/gutenberg#76559)
- Add an `editableRoot` block support for native cross-block selection (WordPress/gutenberg#79105)
- Notes: Allow canceling the autocompleter popover with Escape without dismissing the note form (WordPress/gutenberg#80224)
- Add contrast checking for viewport and pseudo states (WordPress/gutenberg#80223)
- Blocks: Rename _wp_apply_content_filters() to _wp_apply_block_content_filters() (WordPress/gutenberg#80225)
- Widget Primitives: Add a field type registry for widget attributes (WordPress/gutenberg#80148)
- Icon block: When the default icon is unregistered, nothing is displayed (WordPress/gutenberg#80166)
- Make the Playlist blocks stable (WordPress/gutenberg#80203)
- Autocomplete: Use regular weight for result items (WordPress/gutenberg#80196)
- Make pause button visually same size as play button (WordPress/gutenberg#80217)
- Editor: Render post preview action as a menu item (WordPress/gutenberg#80195)
- Release: Fail changelog generation cleanly (WordPress/gutenberg#80175)
- Stabilize Tabs block (WordPress/gutenberg#80163)
- Theme: Correct documented default background seed (WordPress/gutenberg#80237)
- Block Supports: Improve handling of block class name to avoid fatal (WordPress/gutenberg#80214)
- Rename 'Responsive editing' toggle to 'Responsive styles' (WordPress/gutenberg#80241)
- Release: Make npm publishing rerunnable (WordPress/gutenberg#80187)
- Only include icon library SVGs listed as `public` in the Zip file published to GitHub Container Registry for `wordpress-develop` (WordPress/gutenberg#79338)

Props desrosj, wildworks.
Fixes #65529.

git-svn-id: https://develop.svn.wordpress.org/trunk@62739 602fd350-edb4-49c9-b593-d223f7449a82
@oandregal

Copy link
Copy Markdown
Member

👋 I ran into an issue with this API:

  • Updating scalar values ✅
  • Updating objects (associative arrays) ✅
  • Updating lists (numerical indexed arrays) 🔴 It's possible but will break if there's changes to the view config object shape — defeating the purpose of this API.
$data->update_properties( array(
    'default_view' => array(

        // Updating a scalar value (string, int, float, bool) works
        'type' => 'table',

        // Updating an object (associative array) without modifying sibling keys works.
        // This would leave sort.field untouched.
        'sort' => array(
            'direction' => 'desc'
        ),

        // Updating a list (numerical indexed array) will break if there's changes.
        // 
        // Updating a list (such as default_view.fields or default_view.filters) requires
        // accessing the existing values of that key, aka using get_config()[ 'default_view' ][ 'fields' ].
        // But this is problematic. If a consumer (filter callback) does this, it's tied to a specific tree version,
        // but the $data would come in the latest version — hence the risk of breakage.
        'fields' => array_merge(
	    $data->get_config()['default_view']['fields'],
             // I want to add an extra field but need to add the existing fields before
	    array('slug' ) 
        ),
        'filters' => array_merge(
            $data->get_config()['default_view']['filters'],
            // I want to add this new filter, but need to add the existing filters before.
            [
                'field' => 'status',
                'operator' => 'isAny',
                'value'=>['publish']
            ]
        )
) ), 1 );

This is the biggest issue. I think we need to get rid of get_config and provide a declarative way to add, update, and remove any aspect of the tree.

A secondary aspect is the naming and organization:

  • we have get_config but also set and update_properties (instead of get, set, update; or get_config, set_config, update_config; etc.)
  • update_properties doesn't update every property, there's a handful that have its own methods (view list, form fields)

@ntsekouras

Copy link
Copy Markdown
Contributor Author

// Updating a list (such as default_view.fields or default_view.filters) requires
// accessing the existing values of that key, aka using get_config()[ 'default_view' ][ 'fields' ].

There were already so many nuances for trying to solve this problem and yet your example highlights these use cases 😓 .

get_config wrongfully wasn't considered public API and it wasn't documented, but indeed it is and we could mitigate that by making it private. The problem of probably the most common scenario you present about adding some fields in the default view remains.

TBH I'm not sure right now what would be the best path forward and need to think about it more. The 7.1 deadline is here though and we should make a decision really soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants