Skip to content

Conversation

@getdave
Copy link
Contributor

@getdave getdave commented Oct 8, 2025

Comments on Binding API "Shape"

We've created a dedicated Issue for the shape of bindings.


What

Fixes #72059: Eliminates the core/entity block binding source by adding a temporary hardcoded exception in core/post-data and core/term-data binding sources to support navigation blocks reading entity data from block attributes.

This PR removes redundancy in the block bindings architecture by:

  • Adding a hardcoded check in core/post-data and core/term-data (both PHP and JavaScript) to detect navigation blocks
  • When a navigation block (core/navigation-link or core/navigation-submenu) is detected, the binding sources read entity identifiers from block attributes instead of block context
  • All other blocks continue to use block context as normal
  • Navigation Link blocks programmatically select between core/post-data (for post-type entities) and core/term-data (for taxonomy entities) based on the kind attribute
  • Removing core/entity binding source entirely

⚠️ This is a temporary solution for WordPress 6.9. A proper binding configuration API will be designed for WordPress 7.0. See #71002 for ongoing discussion about the long-term solution.

This PR will also allow for closing out WordPress/wordpress-develop#10141

Why

The Problem

Navigation links have id, type, and kind as block attributes, but the existing core/post-data and core/term-data binding sources only read from block context. This means navigation links cannot use these existing, domain-specific binding sources.

The proposed solution in #71630 was to create a new core/entity binding source that reads from attributes. However, this creates redundancy - three separate binding sources doing similar work:

  • core/entity would handle both post-type and taxonomy entities using block attributes
  • core/post-data handles post entities using block context
  • core/term-data handles taxonomy entities using block context

Why a Hardcoded Exception?

Time Constraints: WordPress 6.9 is landing soon and we don't have enough testing runway to release a well-considered binding configuration API.

Avoiding Data Redundancy: Alternative approaches would require serializing redundant entity data to block markup (e.g., duplicating id and type in both block attributes and binding args).

Path Forward: By hardcoding this exception now, we can:

  1. Ship Dynamic URLs for navigation blocks in 6.9
  2. Maintain clean, non-redundant block markup
  3. Eliminate the redundant core/entity binding source
  4. Design and test a proper API for 7.0 without rushing

A more elegant solution using block-level binding configuration (potentially via block.json or a __default binding pattern) is being explored in #71002.

How

Implementation Details

Both core/post-data and core/term-data binding sources (PHP and JavaScript) now include a block name check:

JavaScript:

const blockName = getBlockName?.( clientId );
const isNavigationBlock = 
    blockName === 'core/navigation-link' || 
    blockName === 'core/navigation-submenu';

if ( isNavigationBlock ) {
    // Read from block attributes
    postId = blockAttributes?.id;
    postType = blockAttributes?.type;
} else {
    // Read from context (existing behavior)
    postId = context?.postId;
    postType = context?.postType;
}

PHP:

$block_name = $block_instance->name ?? '';
$is_navigation_block = in_array(
    $block_name,
    array( 'core/navigation-link', 'core/navigation-submenu' ),
    true
);

if ( $is_navigation_block ) {
    // Read from block attributes
    $post_id = $block_instance->attributes['id'] ?? null;
} else {
    // Read from context (existing behavior)
    $post_id = $block_instance->context['postId'] ?? null;
}

All four implementations include TODO comments linking to #71002 for the future API replacement in WP 7.0.

The core/entity binding source is removed entirely, eliminating the architectural redundancy.

Testing

Manual Testing:

  1. Test Post-Type Navigation Links:

    • Create a navigation link pointing to a post/page
    • Verify the link uses core/post-data binding with link key
    • Verify URL resolves correctly in editor and frontend
    • Check that binding markup remains clean (no redundant data)
  2. Test Taxonomy Navigation Links:

    • Create a navigation link pointing to a category/tag
    • Verify the link uses core/term-data binding with link key
    • Verify URL resolves correctly in editor and frontend
  3. Test Non-Navigation Blocks (Regression Testing):

    • Verify other blocks using core/post-data or core/term-data still work correctly
    • Test context-based bindings in templates (e.g., Post Date block)
    • Ensure the hardcoded exception doesn't affect non-navigation blocks
  4. Test Switching Entity Types:

    • Change a navigation link from post to category (or vice versa)
    • Verify binding source updates automatically based on kind

Automated Testing:

  • Existing unit tests should pass
  • E2E tests for navigation link functionality

@getdave getdave self-assigned this Oct 8, 2025
@getdave getdave added [Type] Code Quality Issues or PRs that relate to code quality [Block] Navigation Affects the Navigation Block [Block] Navigation Link Affects the Navigation Link Block [Block] Submenu Affects the Submenu Block - for submenus in navigation labels Oct 8, 2025
@getdave

This comment was marked as resolved.

@github-actions
Copy link

github-actions bot commented Oct 8, 2025

Size Change: +516 B (+0.02%)

Total Size: 2.08 MB

Filename Size Change
build/block-library/index.min.js 265 kB +131 B (+0.05%)
build/editor/index.min.js 161 kB +385 B (+0.24%)
ℹ️ View Unchanged
Filename Size
build-module/a11y/index.min.js 355 B
build-module/block-editor/utils/fit-text-frontend.min.js 551 B
build-module/block-library/accordion/view.min.js 520 B
build-module/block-library/file/view.min.js 346 B
build-module/block-library/form/view.min.js 528 B
build-module/block-library/image/view.min.js 1.64 kB
build-module/block-library/navigation/view.min.js 1.03 kB
build-module/block-library/query/view.min.js 518 B
build-module/block-library/search/view.min.js 497 B
build-module/interactivity-router/full-page.min.js 451 B
build-module/interactivity-router/index.min.js 11.5 kB
build-module/interactivity/debug.min.js 18.2 kB
build-module/interactivity/index.min.js 14.6 kB
build/a11y/index.min.js 1.06 kB
build/annotations/index.min.js 2.38 kB
build/api-fetch/index.min.js 2.83 kB
build/autop/index.min.js 2.18 kB
build/blob/index.min.js 631 B
build/block-directory/index.min.js 8.04 kB
build/block-directory/style-rtl.css 1.05 kB
build/block-directory/style.css 1.05 kB
build/block-editor/content-rtl.css 4.79 kB
build/block-editor/content.css 4.79 kB
build/block-editor/default-editor-styles-rtl.css 224 B
build/block-editor/default-editor-styles.css 224 B
build/block-editor/index.min.js 296 kB
build/block-editor/style-rtl.css 16.2 kB
build/block-editor/style.css 16.2 kB
build/block-library/accordion-heading/style-rtl.css 340 B
build/block-library/accordion-heading/style.css 340 B
build/block-library/accordion-item/style-rtl.css 213 B
build/block-library/accordion-item/style.css 213 B
build/block-library/accordion-panel/style-rtl.css 99 B
build/block-library/accordion-panel/style.css 99 B
build/block-library/archives/editor-rtl.css 61 B
build/block-library/archives/editor.css 61 B
build/block-library/archives/style-rtl.css 90 B
build/block-library/archives/style.css 90 B
build/block-library/audio/editor-rtl.css 149 B
build/block-library/audio/editor.css 151 B
build/block-library/audio/style-rtl.css 132 B
build/block-library/audio/style.css 132 B
build/block-library/audio/theme-rtl.css 134 B
build/block-library/audio/theme.css 134 B
build/block-library/avatar/editor-rtl.css 115 B
build/block-library/avatar/editor.css 115 B
build/block-library/avatar/style-rtl.css 104 B
build/block-library/avatar/style.css 104 B
build/block-library/breadcrumbs/style-rtl.css 203 B
build/block-library/breadcrumbs/style.css 203 B
build/block-library/button/editor-rtl.css 265 B
build/block-library/button/editor.css 265 B
build/block-library/button/style-rtl.css 554 B
build/block-library/button/style.css 554 B
build/block-library/buttons/editor-rtl.css 291 B
build/block-library/buttons/editor.css 291 B
build/block-library/buttons/style-rtl.css 349 B
build/block-library/buttons/style.css 349 B
build/block-library/calendar/style-rtl.css 239 B
build/block-library/calendar/style.css 239 B
build/block-library/categories/editor-rtl.css 132 B
build/block-library/categories/editor.css 131 B
build/block-library/categories/style-rtl.css 152 B
build/block-library/categories/style.css 152 B
build/block-library/classic-rtl.css 179 B
build/block-library/classic.css 179 B
build/block-library/code/editor-rtl.css 53 B
build/block-library/code/editor.css 53 B
build/block-library/code/style-rtl.css 139 B
build/block-library/code/style.css 139 B
build/block-library/code/theme-rtl.css 122 B
build/block-library/code/theme.css 122 B
build/block-library/columns/editor-rtl.css 108 B
build/block-library/columns/editor.css 108 B
build/block-library/columns/style-rtl.css 421 B
build/block-library/columns/style.css 421 B
build/block-library/comment-author-avatar/editor-rtl.css 124 B
build/block-library/comment-author-avatar/editor.css 124 B
build/block-library/comment-author-name/style-rtl.css 72 B
build/block-library/comment-author-name/style.css 72 B
build/block-library/comment-content/style-rtl.css 120 B
build/block-library/comment-content/style.css 120 B
build/block-library/comment-date/style-rtl.css 65 B
build/block-library/comment-date/style.css 65 B
build/block-library/comment-edit-link/style-rtl.css 70 B
build/block-library/comment-edit-link/style.css 70 B
build/block-library/comment-reply-link/style-rtl.css 71 B
build/block-library/comment-reply-link/style.css 71 B
build/block-library/comment-template/style-rtl.css 191 B
build/block-library/comment-template/style.css 191 B
build/block-library/comments-pagination-numbers/editor-rtl.css 122 B
build/block-library/comments-pagination-numbers/editor.css 121 B
build/block-library/comments-pagination/editor-rtl.css 168 B
build/block-library/comments-pagination/editor.css 168 B
build/block-library/comments-pagination/style-rtl.css 201 B
build/block-library/comments-pagination/style.css 201 B
build/block-library/comments-title/editor-rtl.css 75 B
build/block-library/comments-title/editor.css 75 B
build/block-library/comments/editor-rtl.css 842 B
build/block-library/comments/editor.css 842 B
build/block-library/comments/style-rtl.css 637 B
build/block-library/comments/style.css 637 B
build/block-library/common-rtl.css 1.11 kB
build/block-library/common.css 1.11 kB
build/block-library/cover/editor-rtl.css 631 B
build/block-library/cover/editor.css 631 B
build/block-library/cover/style-rtl.css 1.7 kB
build/block-library/cover/style.css 1.69 kB
build/block-library/details/editor-rtl.css 65 B
build/block-library/details/editor.css 65 B
build/block-library/details/style-rtl.css 86 B
build/block-library/details/style.css 86 B
build/block-library/editor-elements-rtl.css 75 B
build/block-library/editor-elements.css 75 B
build/block-library/editor-rtl.css 11.6 kB
build/block-library/editor.css 11.6 kB
build/block-library/elements-rtl.css 54 B
build/block-library/elements.css 54 B
build/block-library/embed/editor-rtl.css 331 B
build/block-library/embed/editor.css 331 B
build/block-library/embed/style-rtl.css 419 B
build/block-library/embed/style.css 419 B
build/block-library/embed/theme-rtl.css 133 B
build/block-library/embed/theme.css 133 B
build/block-library/file/editor-rtl.css 324 B
build/block-library/file/editor.css 324 B
build/block-library/file/style-rtl.css 278 B
build/block-library/file/style.css 278 B
build/block-library/footnotes/style-rtl.css 198 B
build/block-library/footnotes/style.css 197 B
build/block-library/form-input/editor-rtl.css 229 B
build/block-library/form-input/editor.css 229 B
build/block-library/form-input/style-rtl.css 366 B
build/block-library/form-input/style.css 366 B
build/block-library/form-submission-notification/editor-rtl.css 344 B
build/block-library/form-submission-notification/editor.css 341 B
build/block-library/form-submit-button/style-rtl.css 69 B
build/block-library/form-submit-button/style.css 69 B
build/block-library/freeform/editor-rtl.css 2.59 kB
build/block-library/freeform/editor.css 2.59 kB
build/block-library/gallery/editor-rtl.css 615 B
build/block-library/gallery/editor.css 616 B
build/block-library/gallery/style-rtl.css 1.84 kB
build/block-library/gallery/style.css 1.84 kB
build/block-library/gallery/theme-rtl.css 108 B
build/block-library/gallery/theme.css 108 B
build/block-library/group/editor-rtl.css 335 B
build/block-library/group/editor.css 335 B
build/block-library/group/style-rtl.css 103 B
build/block-library/group/style.css 103 B
build/block-library/group/theme-rtl.css 79 B
build/block-library/group/theme.css 79 B
build/block-library/heading/style-rtl.css 188 B
build/block-library/heading/style.css 188 B
build/block-library/html/editor-rtl.css 357 B
build/block-library/html/editor.css 358 B
build/block-library/image/editor-rtl.css 763 B
build/block-library/image/editor.css 763 B
build/block-library/image/style-rtl.css 1.6 kB
build/block-library/image/style.css 1.59 kB
build/block-library/image/theme-rtl.css 137 B
build/block-library/image/theme.css 137 B
build/block-library/latest-comments/style-rtl.css 355 B
build/block-library/latest-comments/style.css 354 B
build/block-library/latest-posts/editor-rtl.css 139 B
build/block-library/latest-posts/editor.css 138 B
build/block-library/latest-posts/style-rtl.css 520 B
build/block-library/latest-posts/style.css 520 B
build/block-library/list/style-rtl.css 107 B
build/block-library/list/style.css 107 B
build/block-library/loginout/style-rtl.css 61 B
build/block-library/loginout/style.css 61 B
build/block-library/media-text/editor-rtl.css 321 B
build/block-library/media-text/editor.css 320 B
build/block-library/media-text/style-rtl.css 543 B
build/block-library/media-text/style.css 542 B
build/block-library/more/editor-rtl.css 393 B
build/block-library/more/editor.css 393 B
build/block-library/navigation-link/editor-rtl.css 625 B
build/block-library/navigation-link/editor.css 628 B
build/block-library/navigation-link/style-rtl.css 190 B
build/block-library/navigation-link/style.css 188 B
build/block-library/navigation-submenu/editor-rtl.css 295 B
build/block-library/navigation-submenu/editor.css 294 B
build/block-library/navigation/editor-rtl.css 2.24 kB
build/block-library/navigation/editor.css 2.24 kB
build/block-library/navigation/style-rtl.css 2.27 kB
build/block-library/navigation/style.css 2.25 kB
build/block-library/nextpage/editor-rtl.css 392 B
build/block-library/nextpage/editor.css 392 B
build/block-library/page-list/editor-rtl.css 356 B
build/block-library/page-list/editor.css 356 B
build/block-library/page-list/style-rtl.css 192 B
build/block-library/page-list/style.css 192 B
build/block-library/paragraph/editor-rtl.css 251 B
build/block-library/paragraph/editor.css 251 B
build/block-library/paragraph/style-rtl.css 341 B
build/block-library/paragraph/style.css 340 B
build/block-library/post-author-biography/style-rtl.css 74 B
build/block-library/post-author-biography/style.css 74 B
build/block-library/post-author-name/style-rtl.css 69 B
build/block-library/post-author-name/style.css 69 B
build/block-library/post-author/style-rtl.css 188 B
build/block-library/post-author/style.css 189 B
build/block-library/post-comments-count/style-rtl.css 72 B
build/block-library/post-comments-count/style.css 72 B
build/block-library/post-comments-form/editor-rtl.css 96 B
build/block-library/post-comments-form/editor.css 96 B
build/block-library/post-comments-form/style-rtl.css 525 B
build/block-library/post-comments-form/style.css 525 B
build/block-library/post-comments-link/style-rtl.css 71 B
build/block-library/post-comments-link/style.css 71 B
build/block-library/post-content/style-rtl.css 61 B
build/block-library/post-content/style.css 61 B
build/block-library/post-date/style-rtl.css 62 B
build/block-library/post-date/style.css 62 B
build/block-library/post-excerpt/editor-rtl.css 71 B
build/block-library/post-excerpt/editor.css 71 B
build/block-library/post-excerpt/style-rtl.css 155 B
build/block-library/post-excerpt/style.css 155 B
build/block-library/post-featured-image/editor-rtl.css 719 B
build/block-library/post-featured-image/editor.css 717 B
build/block-library/post-featured-image/style-rtl.css 347 B
build/block-library/post-featured-image/style.css 347 B
build/block-library/post-navigation-link/style-rtl.css 215 B
build/block-library/post-navigation-link/style.css 214 B
build/block-library/post-template/style-rtl.css 414 B
build/block-library/post-template/style.css 414 B
build/block-library/post-terms/style-rtl.css 96 B
build/block-library/post-terms/style.css 96 B
build/block-library/post-time-to-read/style-rtl.css 70 B
build/block-library/post-time-to-read/style.css 70 B
build/block-library/post-title/style-rtl.css 162 B
build/block-library/post-title/style.css 162 B
build/block-library/preformatted/style-rtl.css 125 B
build/block-library/preformatted/style.css 125 B
build/block-library/pullquote/editor-rtl.css 133 B
build/block-library/pullquote/editor.css 133 B
build/block-library/pullquote/style-rtl.css 365 B
build/block-library/pullquote/style.css 365 B
build/block-library/pullquote/theme-rtl.css 176 B
build/block-library/pullquote/theme.css 176 B
build/block-library/query-pagination-numbers/editor-rtl.css 121 B
build/block-library/query-pagination-numbers/editor.css 118 B
build/block-library/query-pagination/editor-rtl.css 154 B
build/block-library/query-pagination/editor.css 154 B
build/block-library/query-pagination/style-rtl.css 237 B
build/block-library/query-pagination/style.css 237 B
build/block-library/query-title/style-rtl.css 64 B
build/block-library/query-title/style.css 64 B
build/block-library/query-total/style-rtl.css 64 B
build/block-library/query-total/style.css 64 B
build/block-library/query/editor-rtl.css 438 B
build/block-library/query/editor.css 438 B
build/block-library/quote/style-rtl.css 238 B
build/block-library/quote/style.css 238 B
build/block-library/quote/theme-rtl.css 233 B
build/block-library/quote/theme.css 236 B
build/block-library/read-more/style-rtl.css 131 B
build/block-library/read-more/style.css 131 B
build/block-library/reset-rtl.css 472 B
build/block-library/reset.css 472 B
build/block-library/rss/editor-rtl.css 126 B
build/block-library/rss/editor.css 126 B
build/block-library/rss/style-rtl.css 284 B
build/block-library/rss/style.css 283 B
build/block-library/search/editor-rtl.css 199 B
build/block-library/search/editor.css 199 B
build/block-library/search/style-rtl.css 665 B
build/block-library/search/style.css 666 B
build/block-library/search/theme-rtl.css 113 B
build/block-library/search/theme.css 113 B
build/block-library/separator/editor-rtl.css 100 B
build/block-library/separator/editor.css 100 B
build/block-library/separator/style-rtl.css 248 B
build/block-library/separator/style.css 248 B
build/block-library/separator/theme-rtl.css 195 B
build/block-library/separator/theme.css 195 B
build/block-library/shortcode/editor-rtl.css 286 B
build/block-library/shortcode/editor.css 286 B
build/block-library/site-logo/editor-rtl.css 773 B
build/block-library/site-logo/editor.css 770 B
build/block-library/site-logo/style-rtl.css 218 B
build/block-library/site-logo/style.css 218 B
build/block-library/site-tagline/editor-rtl.css 87 B
build/block-library/site-tagline/editor.css 87 B
build/block-library/site-tagline/style-rtl.css 65 B
build/block-library/site-tagline/style.css 65 B
build/block-library/site-title/editor-rtl.css 85 B
build/block-library/site-title/editor.css 85 B
build/block-library/site-title/style-rtl.css 143 B
build/block-library/site-title/style.css 143 B
build/block-library/social-link/editor-rtl.css 314 B
build/block-library/social-link/editor.css 314 B
build/block-library/social-links/editor-rtl.css 339 B
build/block-library/social-links/editor.css 338 B
build/block-library/social-links/style-rtl.css 1.51 kB
build/block-library/social-links/style.css 1.51 kB
build/block-library/spacer/editor-rtl.css 346 B
build/block-library/spacer/editor.css 346 B
build/block-library/spacer/style-rtl.css 48 B
build/block-library/spacer/style.css 48 B
build/block-library/style-rtl.css 15.6 kB
build/block-library/style.css 15.6 kB
build/block-library/table-of-contents/style-rtl.css 83 B
build/block-library/table-of-contents/style.css 83 B
build/block-library/table/editor-rtl.css 394 B
build/block-library/table/editor.css 394 B
build/block-library/table/style-rtl.css 641 B
build/block-library/table/style.css 640 B
build/block-library/table/theme-rtl.css 152 B
build/block-library/table/theme.css 152 B
build/block-library/tag-cloud/editor-rtl.css 92 B
build/block-library/tag-cloud/editor.css 92 B
build/block-library/tag-cloud/style-rtl.css 248 B
build/block-library/tag-cloud/style.css 248 B
build/block-library/template-part/editor-rtl.css 368 B
build/block-library/template-part/editor.css 368 B
build/block-library/template-part/theme-rtl.css 113 B
build/block-library/template-part/theme.css 113 B
build/block-library/term-count/style-rtl.css 63 B
build/block-library/term-count/style.css 63 B
build/block-library/term-description/style-rtl.css 126 B
build/block-library/term-description/style.css 126 B
build/block-library/term-name/style-rtl.css 62 B
build/block-library/term-name/style.css 62 B
build/block-library/term-template/editor-rtl.css 225 B
build/block-library/term-template/editor.css 225 B
build/block-library/term-template/style-rtl.css 114 B
build/block-library/term-template/style.css 114 B
build/block-library/text-columns/editor-rtl.css 95 B
build/block-library/text-columns/editor.css 95 B
build/block-library/text-columns/style-rtl.css 165 B
build/block-library/text-columns/style.css 165 B
build/block-library/theme-rtl.css 715 B
build/block-library/theme.css 719 B
build/block-library/verse/style-rtl.css 98 B
build/block-library/verse/style.css 98 B
build/block-library/video/editor-rtl.css 413 B
build/block-library/video/editor.css 414 B
build/block-library/video/style-rtl.css 202 B
build/block-library/video/style.css 202 B
build/block-library/video/theme-rtl.css 134 B
build/block-library/video/theme.css 134 B
build/block-serialization-default-parser/index.min.js 1.16 kB
build/block-serialization-spec-parser/index.min.js 3.08 kB
build/blocks/index.min.js 56.5 kB
build/commands/index.min.js 17.4 kB
build/commands/style-rtl.css 999 B
build/commands/style.css 1 kB
build/components/index.min.js 271 kB
build/components/style-rtl.css 14 kB
build/components/style.css 14 kB
build/compose/index.min.js 13.8 kB
build/core-commands/index.min.js 4.12 kB
build/core-data/index.min.js 85.3 kB
build/customize-widgets/index.min.js 12.3 kB
build/customize-widgets/style-rtl.css 1.44 kB
build/customize-widgets/style.css 1.44 kB
build/data-controls/index.min.js 793 B
build/data/index.min.js 9.61 kB
build/date/index.min.js 23.6 kB
build/deprecated/index.min.js 755 B
build/dom-ready/index.min.js 476 B
build/dom/index.min.js 4.89 kB
build/edit-post/classic-rtl.css 426 B
build/edit-post/classic.css 427 B
build/edit-post/index.min.js 15.8 kB
build/edit-post/style-rtl.css 3.33 kB
build/edit-post/style.css 3.33 kB
build/edit-site/index.min.js 260 kB
build/edit-site/posts-rtl.css 9.94 kB
build/edit-site/posts.css 9.94 kB
build/edit-site/style-rtl.css 15.9 kB
build/edit-site/style.css 15.9 kB
build/edit-widgets/index.min.js 20 kB
build/edit-widgets/style-rtl.css 4.59 kB
build/edit-widgets/style.css 4.59 kB
build/editor/style-rtl.css 9.96 kB
build/editor/style.css 9.96 kB
build/element/index.min.js 5.19 kB
build/escape-html/index.min.js 586 B
build/format-library/index.min.js 9.9 kB
build/format-library/style-rtl.css 308 B
build/format-library/style.css 308 B
build/hooks/index.min.js 1.83 kB
build/html-entities/index.min.js 494 B
build/i18n/index.min.js 2.46 kB
build/is-shallow-equal/index.min.js 568 B
build/keyboard-shortcuts/index.min.js 1.57 kB
build/keycodes/index.min.js 1.53 kB
build/list-reusable-blocks/index.min.js 2.44 kB
build/list-reusable-blocks/style-rtl.css 1.02 kB
build/list-reusable-blocks/style.css 1.02 kB
build/media-utils/index.min.js 3.96 kB
build/notices/index.min.js 1.11 kB
build/nux/index.min.js 1.88 kB
build/nux/style-rtl.css 622 B
build/nux/style.css 618 B
build/patterns/index.min.js 8.63 kB
build/patterns/style-rtl.css 703 B
build/patterns/style.css 703 B
build/plugins/index.min.js 2.14 kB
build/preferences-persistence/index.min.js 2.15 kB
build/preferences/index.min.js 3.3 kB
build/preferences/style-rtl.css 415 B
build/preferences/style.css 415 B
build/primitives/index.min.js 1.01 kB
build/priority-queue/index.min.js 1.61 kB
build/private-apis/index.min.js 1.03 kB
build/react-i18n/index.min.js 832 B
build/react-refresh-entry/index.min.js 9.47 kB
build/react-refresh-runtime/index.min.js 6.76 kB
build/redux-routine/index.min.js 3.36 kB
build/reusable-blocks/index.min.js 2.92 kB
build/reusable-blocks/style-rtl.css 275 B
build/reusable-blocks/style.css 275 B
build/rich-text/index.min.js 12.7 kB
build/router/index.min.js 5.96 kB
build/server-side-render/index.min.js 1.9 kB
build/shortcode/index.min.js 1.58 kB
build/style-engine/index.min.js 2.31 kB
build/token-list/index.min.js 740 B
build/undo-manager/index.min.js 915 B
build/url/index.min.js 3.98 kB
build/vendors/react-dom.min.js 41.7 kB
build/vendors/react-jsx-runtime.min.js 556 B
build/vendors/react.min.js 4.02 kB
build/viewport/index.min.js 1.22 kB
build/warning/index.min.js 454 B
build/widgets/index.min.js 7.83 kB
build/widgets/style-rtl.css 1.17 kB
build/widgets/style.css 1.18 kB
build/wordcount/index.min.js 1.04 kB

compressed-size-action

@scruffian
Copy link
Contributor

The current state of the block markup with the binding is:

<!-- wp:navigation-link {"label":"test","type":"page","id":123,"url":"http://wp-src.test/test/","kind":"post-type","metadata":{"bindings":{"url":{"source":"core/entity","args":{"key":"url"}}}}} /-->

There are some things that concern me here. The first is that the URL is redundant and potentially wrong, if it's been updated. I think we should just remove it:

<!-- wp:navigation-link {"label":"test","type":"page","id":123,"kind":"post-type","metadata":{"bindings":{"url":{"source":"core/entity","args":{"key":"url"}}}}} /-->

I have some other concerns about this. Relying implicitly on the ID for the binding feels like an implicit assumption that I would rather was explicit, so we could go with something like this:

<!-- wp:navigation-link {"label":"test","type":"page","id":123,"kind":"post-type","metadata":{"bindings":{"url":{"source":"core/entity","args":{"key":"url", "from": "id"}}}}} /-->

However, this still has a reliance on the id attribute of the block, which could be a problem if some blocks use the id for other things. I think we could simplify further like so:

<!-- wp:navigation-link {"label":"test","type":"page","kind":"post-type","metadata":{"bindings":{"url":{"source":"core/entity","args":{"key":"url", "id":123 }}}}} /-->

Then of course we might want to bind the label as well as the url, so we might do something like:

<!-- wp:navigation-link {"type":"page","kind":"post-type","metadata":{"bindings":{"url":{"source":"core/entity","args":{"key":"url", "id":123 }}, "label":{"source":"core/entity","args":{"key":"post_name", "id":123 }} }}} /-->

But now this also contains redundancy, so what about:

<!-- wp:navigation-link {"type":"page","kind":"post-type","metadata":{"bindings":{"source":"core/entity", "id": 123, "mapping":{"url":"url", "label", "post_name" }}}} /-->

Just some thoughts :)
cc @cbravobernal @ockham

@getdave
Copy link
Contributor Author

getdave commented Oct 8, 2025

I agree with Ben. The implicit contract with the block attributes as shown in this PR is not a good design decision.

We should make it explicit whilst trying to avoid redundancy in the markup.

@cbravobernal
Copy link
Contributor

We have been discussing the possibility of mapping all bindable attributes of a block within the same source here:
#71002

@getdave
Copy link
Contributor Author

getdave commented Oct 9, 2025

@cbravobernal @scruffian I have updated this PR to hard code an exception for Nav blocks to resolve from attributes. I have explained why I think this is a good stop gap approach in the PR description.

I think this is the best compromise to allow the feature to ship in 6.9 without redundancy or lock in.

We still need to resolve the problem of Invalid Entity in the Block Bindings sidebar which I believe @cbravobernal you are looking into?

@cbravobernal
Copy link
Contributor

@cbravobernal @scruffian I have updated this PR to hard code an exception for Nav blocks to resolve from attributes. I have explained why I think this is a good stop gap approach in the PR description.

I think this is the best compromise to allow the feature to ship in 6.9 without redundancy or lock in.

We still need to resolve the problem of Invalid Entity in the Block Bindings sidebar which I believe @cbravobernal you are looking into?

In order to fix that, you just need to add this check on post-data.js, line 148

if (
			selectedBlock?.name !== 'core/post-date' &&
			selectedBlock?.name !== 'core/navigation-link'
		) {

@cbravobernal
Copy link
Contributor

I though about adding a property to each attribute to decide the UI Mode, similar to the source.

Something like this, which could be readOnly or hidden or default.

		"url": {
			"type": "string",
			"editorUI": {
				"mode": "readOnly"
			}
		},

And then read that in the hook and act according.

read_only.patch

return true;
},
getFieldsList( { select, context } ) {
getFieldsList( { select, context, clientId } ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

getFieldsList will be deprecated in #72166 and it only works in Gutenberg and for post-meta in Core, which is hardcoded in

// Only open this API in Gutenberg and for `core/post-meta` for the moment.

Copy link
Contributor

Choose a reason for hiding this comment

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

I have some reservations about adding clientId as an argument to getFieldsList 😬 . While previously undocumented, it has been available, but clientId wasn't passed. This is still the case e.g. here:

const fieldsListResult = getFieldsList( {
select,
context,

Can we infer it via select( 'core/block-editor' ).getSelectedBlock() (as we do in editorUI) instead? (Or can that yield a different result? 🤔)

@talldan
Copy link
Contributor

talldan commented Oct 13, 2025

I think I share similar concerns to Ben. The solution here is implicit (there's no API), and because of that I can't think of a way that you'll migrate to a proper solution in the future. I think the temporary code will become permanent because you might always have some navigation links in post content that are configured this way. It'd be good to see possible future migration strategies mentioned as part of the PR.

IMO, it might be better to go for it and implement a simple API. Here's an idea, what if you had a metadata.bindingsContext attribute that when present overrides the block context properties that the binding source usually uses:

bindingsContext: {
    'core/post-data': {
        postType: 'post',
        id: 123,
    }
}

Or it could map to the attribute keys that contain the type and id.

@ockham
Copy link
Contributor

ockham commented Oct 13, 2025

Or it could map to the attribute keys that contain the type and id.

Makes me wonder if we could use providesContext here 🤔

@ockham
Copy link
Contributor

ockham commented Oct 13, 2025

Alternatively, out of Ben's suggestions, I think I prefer this format:

<!-- wp:navigation-link {"type":"page","kind":"post-type","metadata":{"bindings":{"url":{"source":"core/entity","args":{"key":"url", "id":123 }}, "label":{"source":"core/entity","args":{"key":"post_name", "id":123 }} }}} /-->

I would stop there, at least for 6.9. Sorting out the redundancy is a separate problem, and a non-trivial one at that. As @cbravobernal has pointed out, we've faced this before with a post's featured image (to which we might want to bind multiple attributes of an Image or Cover block, such as url, alt, and title) and haven't yet found a conclusive solution. However, it's something that we should be able to handle later via a block migration.

@getdave
Copy link
Contributor Author

getdave commented Oct 13, 2025

It seems to me the most expedient solution for 6.9 is to have a conditional for the Navigation block to pull data from attributes (I've updated this PR to do this).

The binding would have a key only which would be link (or url).

Then in future we could migrate to a more considered API. I would be concerned about rushing some API in for 6.9 only to find it doesn't serve our purposes.

Alternatively, out of #72165 (comment), I think I prefer this format:

This is fine. The main change about this is that the block itself no longer stores a reference to the entity (i.e. the id attribute is deprecated). I'm trying to think whether there are any downsides to that approach that we need to consider.

@ockham
Copy link
Contributor

ockham commented Oct 13, 2025

Overall, I think I agree with @getdave that the hardcoded check is a fine solution for 6.9. Most importantly, it removes the core/entity data source, which would've introduced duplication (and potential confusion) with core/post-data and core/terms-data; that's what matters the most to me. (The hardcoded check has much less potential for abuse.)

Additionally, the present solution doesn't require a block migration, whereas any less implicit API will. Based on experience with adding block bindings support to the Post Date block -- those can take a while to tweak and get right. IMO, it's perfectly fine to start work on that only post-6.9.

@talldan
Copy link
Contributor

talldan commented Oct 13, 2025

Makes me wonder if we could use providesContext here 🤔

I think we did discuss it in the original PR (or maybe I just thought it and never typed it 😄 ), but navigation-submenu has inner blocks, so it'd be unusual to provide context to them that doesn't serve any purpose.

Alternatively, out of #72165 (comment), I think I prefer this format:

I guess that way you can support a single block binding different attributes to different entities, but it'll mean some changes to getPostDataFields, because that assumes each field comes from the same entity.

@talldan
Copy link
Contributor

talldan commented Oct 13, 2025

Then in future we could migrate to a more considered API. I would be concerned about rushing some API in for 6.9 only to find it doesn't serve our purposes.

Overall, I think I agree with @getdave that the hardcoded check is a fine solution for 6.9.

I don't really mind if you ship the PR, but I'm curious how you would ever be able to remove the temporary code. Maybe you've thought of something I haven't, I'd love to know. 😄

@ockham
Copy link
Contributor

ockham commented Oct 13, 2025

No, you’re right — we wouldn’t be able to remove the hardcoded check. I don't love that, but it's a tradeoff I'd be willing to make.

@ockham
Copy link
Contributor

ockham commented Oct 13, 2025

Maybe one thing that give me pause is that the block markup -- as of this PR -- doesn't have any bindings metadata at all, which is normally the easiest way of telling that a block has attributes that are connected to a block bindings source 🤔

<!-- wp:navigation-link {"label":"Sample Page","type":"page","id":2,"url":"http://localhost:8888/?page_id=2","kind":"post-type"} /-->                       
<!-- wp:navigation-link {"label":"Test Page","type":"page","id":519,"url":"http://localhost:8888/?page_id=519","kind":"post-type"} /--> 

Edit: Disregard, those menu items were created from trunk 🤦‍♂️ Newly created Nav Links look like this:

 <!-- wp:navigation-link {"label":"New Page","type":"page","id":528,"url":"http://localhost:8888/?page_id=528","kind":"post-type","metadata":{"bindings":{"url":{"source":"core/post-data","args":{"key":"link"}}}}} /-->

@ockham
Copy link
Contributor

ockham commented Oct 13, 2025

Testing this isn't quite easy AFAICS since the menu isn't directly editable in the Code Editor.

So I've tried testing it by setting my Permalinks structure to "Day and name" (anything other than "Plain" will do) and creating a page called "New page" (which gets the slug new-page assigned automatically).
I then created a post with a navigation menu to which I added a Navigation Link to that page. I published and viewed the page to verify that the link pointed to the correct destination ✅

That Navigation Link is serialized as

<!-- wp:navigation-link {"label":"New Page","type":"page","id":528,"url":"http://localhost:8888/new-page/","kind":"post-type","metadata":{"bindings":{"url":{"source":"core/post-data","args":{"key":"link"}}}}} /-->    |

(as can be seen by running npm run wp-env run cli wp post get 4, where 4 is the ID of the Nav Menu)

I then changed the page slug to different-name and reloaded the post on the frontend. However, it still pointed to http://localhost:8888/new-page/, which -- due to the changed slug -- is now giving me a 404 ❌ 🤔

@getdave getdave force-pushed the update/remove-redundant-entity-binding-source branch from 0b5c1e1 to 92e7bfd Compare October 17, 2025 08:35
@youknowriad
Copy link
Contributor

When a navigation block (core/navigation-link or core/navigation-submenu) is detected, the binding sources read entity identifiers from block attributes instead of block context

Why do we hard code the block instead of having the actual attributes to read from in the "binding configuration" instead?

@ockham
Copy link
Contributor

ockham commented Oct 17, 2025

Why do we hard code the block instead of having the actual attributes to read from in the "binding configuration" instead?

This has been discussed at various times during the development of this PR.

The main reason is that sources like core/post-data have so far used block context to get postId and postType information. With the Navigation Link and Submenu blocks, we have a use case where that info needs to be provided explicitly at block level. We do not yet have an established syntax in the binding configuration to provide this (and to override the info coming from context). IMO, designing a syntax (and override system) will require some care and experimentation -- it's nothing we can rush before 6.9.

What's paramount to me OTOH is to remove the core/entity block bindings source which has large overlap with the existing core/post-data source. We're basically choosing a tradeoff of retaining a few lines of code in the source implementation vs. including a whole redundant block bindings source, which has the potential of confusing extenders.

If this tradeoff is acceptable, I'd love if we could defer the discussion of a "better" solution -- i.e. a syntax and override system -- to after 6.9, so we can focus on fixing the remaining bugs in this PR (if any), retesting it, and landing it 🙌

@getdave
Copy link
Contributor Author

getdave commented Oct 17, 2025

Today is the deadline for landing code in Gutenberg that will make the release.

As a result, it might be best if we ship this PR and then followup on the (very valid) architectural discussion/concerns.

Why? Because missing today's deadline will result in us having to make exceptions with release leads. If necessary, we can easily remove the feature from the release if required during the Beta / RC period.

@youknowriad
Copy link
Contributor

The main reason is that sources like core/post-data have so far used block context to get postId and postType information. With the Navigation Link and Submenu blocks, we have a use case where that info needs to be provided explicitly at block level. We do not yet have an established syntax in the binding configuration to provide this (and to override the info coming from context). IMO, designing a syntax (and override system) will require some care and experimentation -- it's nothing we can rush before 6.9.

But this will mean a breaking change later for navigation blocks when we introduce this syntax. I don't really feel this syntax need to be something very advanced. Each "source" can make use of its own config option, if there's no "attributes" defined, you fallback to context, otherwise you use the attributes?

@getdave getdave merged commit 72314cf into trunk Oct 17, 2025
69 checks passed
@getdave getdave deleted the update/remove-redundant-entity-binding-source branch October 17, 2025 10:03
@ockham
Copy link
Contributor

ockham commented Oct 17, 2025

But this will mean a breaking change later for navigation blocks when we introduce this syntax. I don't really feel this syntax need to be something very advanced. Each "source" can make use of its own config option 

But this is a problem that might affect other sources and blocks as well, so the solution should be standardized IMO. Giving the freedom to each source to define its own way of accepting arguments that are otherwise fetched from context seems kind of bad, since it will lead to inconsistencies, no?

 if there's no "attributes" defined, you fallback to context, otherwise you use the attributes?

The present solution is kind of doing this — except it’s using actual attributes (rather than “attributes” from metadata), see below.


I forgot to mention that the Nav Link and Submenu blocks prior to this PR already included id and type attributes — they just weren’t used to update the link upon render (instead, the url attribute was used):

<!-- wp:navigation-link {"label":"Sample Page","type":"page","id":2,"url":"http://localhost:8888/?page_id=2","kind":"post-type"} /-->

What this PR does is it adds block bindings metadata like this:

<!-- wp:navigation-link {"label":"Sample Page","type":"page","id":2,"url":"http://localhost:8888/?page_id=2","kind":"post-type”,"metadata":{"bindings":{"url":{"source":"core/post-data","args":{"key":"link"}}}}} /-->

If those additional metadata are present, block bindings will look up the URL based on the id and type attributes and use it when rendering.

Note that it’s also still possible for the user to manually edit the URL in the editor (if they want to set it to a different destination), upon which the metadata will be removed. IMO, this is a fairly elegant example of an enhancement to an existing block that doesn’t require block deprecations or migrations.

@youknowriad
Copy link
Contributor

But this is a problem that might affect other sources and blocks as well, so the solution should be standardized IMO. Giving the freedom to each source to define its own way of accepting arguments that are otherwise fetched from context seems kind of bad, since it will lead to inconsistencies, no?

I don't think this is bad. Each block has its own attributes that are different from other blocks, the same can be true for block binding sources.

sethrubenstein added a commit to pewresearch/gutenberg that referenced this pull request Oct 23, 2025
* Fix dataviews scroll and footer stickiness (#72150)

* Fix dataviews scroll and footer stickiness

* Add back colors to admin-ui-page

* use more specific property

* header padding

* Enable text labels in admin ui header actions

* reintroduce padding prop as default false

* Breadcrumbs: Php improvements (#72155)

Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: westonruter <[email protected]>

* Changelog automation: change "Block Commenting" to "Notes" (#72192)

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: jeffpaul <[email protected]>
Co-authored-by: Mamaduka <[email protected]>

* Block Comments: Try the alt method for transferring focus to sidebar (#72158)


Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: adamsilverstein <[email protected]>
Co-authored-by: theminaldiwan <[email protected]>

* Block Comments: Try alternative method for spotlight (#72194)


Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* Block support: add allowedBlocks support for more blocks (#72191)

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: tellthemachines <[email protected]>

* Build v2: Improve script modules dependency handling (#72188)

* Navigation Link: Fix custom links creating empty bindings and severed links retaining bindings (#72162)

* Navigation Link: Fix custom links creating empty block bindings

When manually inserting a Custom Link variation of the Navigation Link block,
empty block bindings were being created. This occurred because the binding
logic only checked for the presence of an 'id' attribute without verifying
whether the link was actually an entity link vs a custom link.

This commit refactors the binding logic to be based on the final computed
state from updateAttributes rather than the input values, preventing the
mismatch and ensuring custom links never create bindings.

Changes:
- Refactor updateAttributes to return metadata about final state
- Update onChange handlers to use returned isEntityLink flag
- Add comprehensive test coverage for return value metadata
- Ensure binding decisions align with computed attributes

Fixes the bug where Custom Link variations would incorrectly create bindings
even though they have kind: 'custom' and should remain unbound.

* Fix: Use isEntityLink metadata for binding decisions in Navigation blocks

- Updated Navigation Link and Navigation Submenu edit components to use isEntityLink metadata from updateAttributes
- Fixed menu-inspector-controls to use useEntityBinding hook for consistency
- Ensures bindings are only created for entity links (posts, pages, taxonomies)
- Prevents empty bindings from being created for custom links
- Fixes bug where severing entity links would incorrectly retain bindings


Co-authored-by: getdave <[email protected]>
Co-authored-by: scruffian <[email protected]>

* Add Additional CSS Classes setting to Inline Text Link UI (#67560)

* PoC adding the additional field to inline links only

* Output the class attribute correctly in HTML

* Ensure class is part of link format active attributes

* Ensure full width inputs

* Implement Toggleable control for CSS classes

* Simplify settings render property validation

- Remove complex try-catch blocks and null/undefined checks
- Simplify to just check typeof setting.render === 'function'
- Remove redundant test for invalid render properties
- Normalize test names to imperative style
- Remove error handling test to let errors bubble up naturally

The logic is now cleaner:
- If render is not provided → checkbox
- If render is provided and valid → use it
- If render is provided but invalid → null (filtered out)

* Fix layout

* Add test coverage for CSS component

* Imorove a11y and conveage

* Add very basic sanitization of the value

* Avoid custom CSS and use components for spacing

* Revert all changes to styles

Unlinked contributors: Membele, BiDbMAK, sarahmonster, prasadgupte, smerriman, kticka, leadclown, ScotsScripts, ekazda, svedish, frogdesk, michaelsoriano, Chillifish, DougMelvin, burnuser, mdmoreau, logiclink.

Co-authored-by: getdave <[email protected]>
Co-authored-by: mikachan <[email protected]>
Co-authored-by: scruffian <[email protected]>
Co-authored-by: richtabor <[email protected]>
Co-authored-by: jasmussen <[email protected]>
Co-authored-by: jameskoster <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: youknowriad <[email protected]>
Co-authored-by: DamirPecnik <[email protected]>
Co-authored-by: driviera <[email protected]>
Co-authored-by: paaljoachim <[email protected]>
Co-authored-by: andrewserong <[email protected]>
Co-authored-by: glendaviesnz <[email protected]>
Co-authored-by: talldan <[email protected]>
Co-authored-by: karmatosed <[email protected]>
Co-authored-by: nextgenthemes <[email protected]>

* Accordion: Remove headingLevel from Reset All Attributes (#72186)

Co-authored-by: shimotmk <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* Pages: reuse embedded info for authors (#72200)

Co-authored-by: oandregal <[email protected]>
Co-authored-by: jorgefilipecosta <[email protected]>

* Accordion Item block: add layout support (#72176)

* FIXED THE CHANGES AS ASKED

* markdown updated

Co-authored-by: sidharthpandita1 <[email protected]>
Co-authored-by: hanneslsm <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: shimotmk <[email protected]>

* Fix navigation link URL binding resolution on frontend (#72169)

* Add manual URL binding resolution to navigation blocks

* Fix PHPCS formatting issues in navigation blocks

- Fix alignment of equals signs in binding resolution code
- All files now pass PHPCS standards


Co-authored-by: getdave <[email protected]>
Co-authored-by: scruffian <[email protected]>

* Fix Nav Block Link UI regression for blocks with id but no binding (#72171)

- Make handleEntities conditional on binding presence in LinkUI
- Existing links with id but no binding remain editable
- New links with id and binding get locked entity UI
- Prevents regression for existing WordPress sites
- Adds E2E test to verify fix

Co-authored-by: getdave <[email protected]>
Co-authored-by: scruffian <[email protected]>

* Fix block card back arrow in inserter preview (#72199)

Co-authored-by: talldan <[email protected]>
Co-authored-by: getdave <[email protected]>

* Add keyboard shortcut toggle block visibility (#72172)

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: ramonjd <[email protected]>
Co-authored-by: jasmussen <[email protected]>

* Notes: Hide block settings menu items for mulit-selection (#72206)


Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* Resolving Comments hide reserved space for comments (#72210)


Co-authored-by: karthick-murugan <[email protected]>
Co-authored-by: Mamaduka <[email protected]>

* Accordion Panel Block: Add layout support (#72211)

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: shimotmk <[email protected]>
Co-authored-by: mikachan <[email protected]>

* Add fitText field to block.json schema (#72198)

* Add fitText field to block.json schema

Adds fitText block support definition to enable proper validation
and autocomplete for the fitText feature added in #71904.

Fixes #72190

* Move fitText to supports.typography.fitText location

Addresses review feedback to place fitText under typography
supports rather than as a top-level support property.

Co-authored-by: aditya241104 <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* Terms Query: Move variations from `Term template` (#72197)

Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: mikachan <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: cr0ybot <[email protected]>

* CheckboxControl, RadioControl, ToggleControl: Ensure focus on click (#72115)

* CheckboxControl, RadioControl: Ensure focus on click

* Add changelog

* Also fix in `ToggleControl`

Co-authored-by: mirka <[email protected]>
Co-authored-by: aduth <[email protected]>
Co-authored-by: oandregal <[email protected]>

* Pages: use embedded info for feature media (#72213)

Co-authored-by: oandregal <[email protected]>
Co-authored-by: Mamaduka <[email protected]>

* Don't applySelection change for off-canvas text length changes (#72221)

The attempt to keep track of caret position via applyRange was stealing focus back to the canvas when those changes were coming from an off-canvas input (navigation link block text changes from inspector sidebar input). In these cases, it's not an expected behavior to keep the selection location, as the text length is changing intentionally off canvas. In these cases, it's better to not keep track of that focus.

Making `RichText`'s `applyFromProps()` `domOnly` if the `text.length` changes and if focus is outside the canvas prevents focus from being stolen from the sidebar.

* Block Comments: Improve focus management for comment interactions (#71814)

* Focus comments Input field

* Feedback changes

* Feedback changes

* Feedback changes

* Feedback changes

* Implement utils functionality

* Index file conflict issue

* Js Lint issues

* JS Linting issues

* Removing focus changes

* Style changes

Co-authored-by: karthick-murugan <[email protected]>
Co-authored-by: roseg43 <[email protected]>
Co-authored-by: joedolson <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: jeffpaul <[email protected]>

* Fix PHP tests (#72236)

Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: talldan <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* Term Description: Fix front end context (#72238)

* Fix term description context

* Fix error

Co-authored-by: mikachan <[email protected]>
Co-authored-by: ntsekouras <[email protected]>

* Remove old pattern overrides back compat code and update tests (#72231)

Co-authored-by: talldan <[email protected]>
Co-authored-by: ramonjd <[email protected]>

* Build V2: Support JSX and JSON (#72202)

Co-authored-by: youknowriad <[email protected]>
Co-authored-by: talldan <[email protected]>

* Add Term Name block (#72129)

* Add initial block

* Add tagName attribute

* Fix phpcs

* Update packages/block-library/src/term-name/block.json

Co-authored-by: Aki Hamano <[email protected]>

* Add border-box

* Remove term from isLink render logic

* Update HTML element selector

* Switch to HeadingLevelDropdown

* Remove border radius and margin controls

* Use pseudo link

* Allow block to be used outside of terms query

* Remove apply_filters

* Rename tagName to level

* Add apply_filters back

* Add new icon

* Remove fill from svg

* Add term title keyword

* Remove experimental flag

* Fix spacing

* Remove apply_filters

* Add test fixture

* Add style import

* Update svg

---------

Co-authored-by: Aki Hamano <[email protected]>
Co-authored-by: mikachan <[email protected]>
Co-authored-by: cr0ybot <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: jasmussen <[email protected]>
Co-authored-by: jorgefilipecosta <[email protected]>
Co-authored-by: kmanijak <[email protected]>

* Bump the github-actions group across 1 directory with 3 updates (#72108)

Bumps the github-actions group with 3 updates in the /.github/workflows directory: [actions/cache](https://github.com/actions/cache), [actions/stale](https://github.com/actions/stale) and [shivammathur/setup-php](https://github.com/shivammathur/setup-php).


Updates `actions/cache` from 4.2.4 to 4.3.0
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/0400d5f644dc74513175e3cd8d07132dd4860809...0057852bfaa89a56745cba8c7296529d2fc39830)

Updates `actions/stale` from 10.0.0 to 10.1.0
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/3a9db7e6a41a89f618792c92c0e97cc736e1b13f...5f858e3efba33a5ca4407a664cc011ad407f2008)

Updates `shivammathur/setup-php` from 2.35.4 to 2.35.5
- [Release notes](https://github.com/shivammathur/setup-php/releases)
- [Commits](https://github.com/shivammathur/setup-php/compare/ec406be512d7077f68eed36e63f4d91bc006edc4...bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 4.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: actions/stale
  dependency-version: 10.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: shivammathur/setup-php
  dependency-version: 2.35.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: desrosj <[email protected]>

* Fix entity binding not cleared when unsyncing and entering custom URL in Nav block (#72212)

* LinkControl: Fix entity binding not cleared when unsyncing and entering custom URL

When a user clicks the 'Unsync' button on an entity link and then types
a custom URL (not selecting from suggestions), the entity binding was not
being properly cleared. This was because handleUnlink() only destructured
the id, kind, and type properties but didn't explicitly set them to undefined.

When handleSubmit() spread the values, the original entity properties from
the value prop persisted through the spread, causing the severing logic in
update-attributes.js to fail.

This commit fixes the issue by explicitly setting id, kind, and type to
undefined in handleUnlink(), ensuring they override the original values
when spread in handleSubmit().

Also adds comprehensive test coverage for this specific scenario.

* Consistently reset all values to undefined

Co-authored-by: getdave <[email protected]>
Co-authored-by: scruffian <[email protected]>

* Block Comments: Add focus on Comment deletion (#71974)

* Focus comments on deletion

* Implement utility functions

* Remove few comments

* Remove ref

* Feedback changes

Co-authored-by: karthick-murugan <[email protected]>
Co-authored-by: joedolson <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: adamsilverstein <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: jeffpaul <[email protected]>

* Build V2: Supports packages with styles (#72242)

* Time to Read: Add word count icon (#72240)

* Add word count icon

* Move time to read icon to icon lib

* Update changelog

Co-authored-by: mikachan <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: jasmussen <[email protected]>
Co-authored-by: fcoveram <[email protected]>

* Fix the undefined type problem with api docgen for typescript files (#72228)

* Add Navigation block toolbar buttons to Template Part editor (#72008)

* Add content role to Navigation Link and Submenu label attributes

This change makes navigation menu item labels editable in Write Mode by adding role: 'content' to the label attribute for both core/navigation-link and core/navigation-submenu blocks.

This allows users to:
- Edit menu item text/labels in Write Mode
- Maintain the content-focused editing experience
- Keep layout and styling controls disabled in Write Mode

Part of the Navigation Block Write Mode improvements.

* Remove unwanted comments

* Refactor: Move Edit Navigation button to editor hook

Refactors the "Edit Navigation" button for Template Parts from hardcoded logic in the block-library component to a reusable editor hook following the same pattern as navigation-link-view-button.

Changes:
- Created template-part-navigation-button hook in editor package
- Removed navigation-specific logic from Template Part edit component
- Added flashBlock with 500ms duration for visual feedback
- Hook automatically opens block inspector when button is clicked

This removes the interfaceStore dependency from block-library and follows established patterns for extending block toolbar functionality.

* Improve naming

* Add divider

* Address review comments

* optimize perf

* Don't show edit navigation button if navigation block is in disabled editing mode

---------

Co-authored-by: getdave <[email protected]>
Co-authored-by: jeryj <[email protected]>
Co-authored-by: jasmussen <[email protected]>
Co-authored-by: scruffian <[email protected]>
Co-authored-by: youknowriad <[email protected]>
Co-authored-by: SaxonF <[email protected]>
Co-authored-by: draganescu <[email protected]>
Co-authored-by: talldan <[email protected]>
Co-authored-by: karmatosed <[email protected]>
Co-authored-by: mtias <[email protected]>

* Fix: Prevent submenu hover in contentOnly mode (#72007)

- Add useBlockEditingMode hook to detect contentOnly mode
- Force openSubmenusOnClick to true when not in default editing mode
- This prevents submenus from opening on hover in contentOnly mode
- Cherry-picked from PR #71137

Fixes submenu hover behavior in Write Mode for Navigation blocks.

Co-authored-by: getdave <[email protected]>
Co-authored-by: jeryj <[email protected]>

* Refactor sync provider into a `createSyncManager` factory function (#72183)

* Refactor SyncProvider into createSyncManager factory function

* Add @wordpress/hooks to @wordpress/sync dependencies

* Expose createSyncManager and constants under private API

* Revert private-api usage

* DataForm: do not add empty option to select by default (#72241)

Co-authored-by: sidharthpandita1 <[email protected]>
Co-authored-by: oandregal <[email protected]>
Co-authored-by: mirka <[email protected]>

* Fix: Underline text decoration propagates to badge fields (#72097)

Co-authored-by: jorgefilipecosta <[email protected]>
Co-authored-by: mirka <[email protected]>

* Move Yjs providers into subfolder (#72224)

* Move providers into subfolder

* Fix docblock type references

* Build v2: Migrate another batch of packages to v2 pipeline (#72251)

Co-authored-by: youknowriad <[email protected]>

* Block Editor: Hide Navigation block children from Content sidebar in contentOnly mode (#72237)

* Block Editor: Hide Navigation block children from Content sidebar in contentOnly mode

* Improve perf for removing navigation block descendent client ids in content only sidebar

---------

Co-authored-by: Jerry Jones <[email protected]>
Co-authored-by: getdave <[email protected]>
Co-authored-by: jeryj <[email protected]>

* Components: Fix color scale functions (#72255)

Co-authored-by: mirka <[email protected]>
Co-authored-by: aduth <[email protected]>

* Build v2: Fix scss watching (#72257)

* Build v2: Fix scss watching

* Remove redundant `compileStyles` call

Co-authored-by: mirka <[email protected]>
Co-authored-by: youknowriad <[email protected]>

* Notes: Remove unnecessary horizontal scrollbar (#72250)

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: adamsilverstein <[email protected]>
Co-authored-by: shail-mehta <[email protected]>

* Details Block: remove accordion keyword to avoid confusion with Accordion block (#71746)

Co-authored-by: nani-samireddy <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: Soean <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: joedolson <[email protected]>
Co-authored-by: mikachan <[email protected]>

* Ensure meta boxes are not hidden when legacy (#72220)

Unlinked contributors: krishaamer.

Co-authored-by: stokesman <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: bph <[email protected]>
Co-authored-by: danieliser <[email protected]>

* Accordion heading:remove toggle icon typography (#72227)

* fix accordion-heading
remove-toggle-icon-typography

* Update packages/block-library/src/accordion-heading/block.json

Co-authored-by: Aki Hamano <[email protected]>

---------

Co-authored-by: shimotmk <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: sidharthpandita1 <[email protected]>
Co-authored-by: levinbaria <[email protected]>

* Add Term Count block (#72218)

* term count block based on term name block work by @mikachan

Co-authored by: mikachan <[email protected]>

* register term count block

* remove tagName attribute, count alone doesn't make sense as a heading

* remove parens inspector controls in favor of block controls, add icons

* refactor based on query-total

* remove vestigial tag name

* remove alignment features and vestigial link styles

* refactor to simplify

Co-authored by: t-hamano <[email protected]>

* refactor for range of bracket types

* sentence case

Co-authored-by: Aki Hamano <[email protected]>

* sentence case

* tweak description

* remove unnecessary component

* cleanup

* add icons to BRACKET_TYPES

* import term count block styles

* remove experimental flag

* remove redundant svg attributes

* emove unused file

* add fixtures

* fix file extension

* try term count icon

---------

Co-authored-by: cr0ybot <[email protected]>
Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: mikachan <[email protected]>
Co-authored-by: kmanijak <[email protected]>

* Notes: Add more e2e tests for keyboard navigation (#72271)

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: Mamaduka <[email protected]>

* Remove write/navigation mode experiment, tool and selectors. (#72193)

Co-authored-by: tellthemachines <[email protected]>
Co-authored-by: ramonjd <[email protected]>
Co-authored-by: talldan <[email protected]>

* Notes: Add skip link button to back to block (#72270)

* Notes: Add skip link button to back to block

* Place back-to-block button at the end of the thread

* Use useBlockElement instead of useBlockElementRef

* Explicitly focus block when comment is deleted

* Remove unnecessary style

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: roseg43 <[email protected]>
Co-authored-by: jeffpaul <[email protected]>

* Fix changelog example to match standard format (#72164)

Co-authored-by: DAreRodz <[email protected]>
Co-authored-by: gziolo <[email protected]>
Co-authored-by: sirreal <[email protected]>

* Notes/Block Comments: Use arguments from the schema for creation (#72205)


Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* Terms Query: Remove block bindings (#72275)

Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: kjnanda <[email protected]>

* Pages: disable filter for discussion field (#72201)

* Notes: Add privacy info text (#72276)

* Add Privacy info text

* Remove separate component

* Design changes

Unlinked contributors: IamPriyabrato04.

Co-authored-by: karthick-murugan <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: jasmussen <[email protected]>
Co-authored-by: karmatosed <[email protected]>
Co-authored-by: hanneslsm <[email protected]>

* rename "hierarchical" to "showNested" (#72273)

Co-authored-by: cr0ybot <[email protected]>
Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* Build V2: Fix emotion transpiling (#72280)

* Fix: don’t allow unlocking accordion item and panel blocks (#72290)

Co-authored-by: fabiankaegy <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* Build V2: Migrate more packages including block-editor (#72259)

Co-authored-by: youknowriad <[email protected]>

* Terms Query: Use `perPage` attribute to fetch only required terms (#72291)

Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: cr0ybot <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* Terms Query: Use `templateSlug` from context (#72295)

Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: Mamaduka <[email protected]>

* Switch to using sass-embedded for build-v2 (#72258)

* Update Terms Query block variation names and icons (#72298)


Co-authored-by: cr0ybot <[email protected]>
Co-authored-by: ntsekouras <[email protected]>

* Terms Query block: remove duplicate server-rendered wrapper (#72296)


Co-authored-by: cr0ybot <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: ntsekouras <[email protected]>

* Build: Cross-package style dependencies should use built files and not src (#72293)

Co-authored-by: youknowriad <[email protected]>

* Notes: Floating comments aligned with blocks that avoid overlapping (#72216)

* Wrap non pinned comment boards in Popover

* Find the related block by id

* Use relatedBlockElement to anchor Popover

* Move filteredThreads logic outside CommentPopover

* Fine tune popover

* linter fixes

* Cleanup after merge

* remove use of useEntityBlockEditor

* When calling useBlockElement use existing comment.blockClientId

* Simplify CommentPopover

* Try: hide floating comments when sidebar active

* Tighten alignment

* adjust slotfill class

* increase minimum editor width required in order to show floating comments

* step 1. restore placement in sidebar

* fix alignment

* cleanup

* cleanup

* Fine tune positioning

* Styles cleanup

* Improve doc blocks

* Cleanup

* remove unused new comment state for now

* remove unused active comment state

* Improve doc blocks 2

* pretier

* run npm install

* move height, offsetRefs and other helpers into CommentBoardWrapper

* fix linter warnings

* Revert "move height, offsetRefs and other helpers into CommentBoardWrapper"

This reverts commit 63a3286a0604df5c7362988fc32434ee2b50fe9c.

* Fix scrollbar in floating panel mode

* fix calling of updateHeight

* Update packages/editor/src/components/collab-sidebar/index.js

Co-authored-by: Aki Hamano <[email protected]>

* remove unused style

* Avoid using div in selector

* Correct multiple comment board issue

* correct react warnings

* try: fix overlapping part 1

* try:working

* cleanup

* Add inline docs

* update packages/block-library/src/accordion-item/block.json from trunk

* inline docs

* restore blockCommentId placement

* Reflow comment positions when comment or reply is edited

* debounce comment change handling

* move debounce to onChange handler

* reflow comments on create, edit and delete

* revert formatting change on CommentBoard

* prettier

* rename commentUpdated to reflowComments since thats what it does

* try/align-comments-with-blocks-fix-overlapping

* restore missing setSelectedThread

* refactor with useFloatingSidebar hook and single structure

* cleanup

* dockblock update

* remove setter from useEffect

* only show privacy notice in pinned sidebar

* combine useSelect calls

* prettier

---------

Co-authored-by: adamsilverstein <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* Block Comments: Capture resolution history & display in thread (#71563)

* Collab Sidebar: Add resolution history support for block comments in REST API

* feat: style comment resolution messages to look the same as regular comments

* fix: adjust formatting of auth_callback function in block comments

* refactor: update action values for resolution history to use 'resolve' and 'reopen'

* fix: comments ending with period

* feat: also tracked comment re-open actions

* refactor: move updating resolution history to helper function

* fix: sorting logic

* fix: show input for resolved threads

* refactor: yoda checks

* Revert "refactor: yoda checks"

This reverts commit 47c723a5240300c0f450d5478443cdbc934babb2.

* fix: remove unnecessary fragment from ResolutionMessage component

* fix: adjust sorting logic to prioritize resolutions over replies for identical timestamps to account for quick-reopens

* refactor: remove extra meta comment field from REST API

* fix: reset comment meta TS

* refactor: remove updateResolutionHistory function and its calls from comment resolve/reopen logic

* fix: remove createUnifiedTimeline method

* fix: reset comments.js

* feat: re-add ResolutionMessage component

* feat: (PR #71819) add support for allowing empty comments in block comments functionality

* feat: handle resolution messages with new comment type

* fix: newline at end in block-comments-test.php

* trial: multiple queries

* refactor: update comment type strings for block comments status

* fix: update avatar source fallback to use logical OR

* fix: include block comment resolutions by default with query

* feat: add bypass for REST API validation and disable duplicate detection for resolution comments

* fix: include quick reply comment in resolution comment content

* refactor: update block comments tests to use data providers

* fix: PHP formatting

* refactor: comment resolution logic in onEditComment

* Update packages/editor/src/components/collab-sidebar/comments.js

Co-authored-by: Adam Silverstein <[email protected]>

* Update lib/experimental/block-comments.php

Co-authored-by: Adam Silverstein <[email protected]>

* Update lib/experimental/block-comments.php

Co-authored-by: Adam Silverstein <[email protected]>

* fix: code comments

Co-authored-by: Aki Hamano <[email protected]>

* fix: allow editing for reopen comments

* fix: only render more actions menu if they are available

* fix: redundant logic in Thread

* feat: add controller methods from REST_Comments_Controller

* feat: modified create_item for block comments

* feat: modify check_is_comment_content_allowed for block comments

* feat: modify get_items to include resolution types in comment query

* fix: add gutenberg text domain for translations

* fix: remove ported hooks

* fix: revert class-gutenberg-rest-comment-controller.php

* fix: use metadata instead of separate types

* fix: add new comment for resolution actions + allow empty & duplicate comments

* fix: automated formatting

* fix: merge create_item method with meta check

* feat: add update_item method

* feat: add check_is_comment_content_allowed method for checking empty content

* fix: allow duplicate block comment resolution messages conditionally

* fix: linter formatting

* Update lib/experimental/block-comments.php

Co-authored-by: Aki Hamano <[email protected]>

* fix: remove redundant metadata validation

* fix: remove redundant update_item method

* refactor: merge rest_pre_insert_comment filter into create_item

* fix: remove meta definition from controller

* fix: remove redundant metadata handling for block comment status

* fix: including meta necessary for check_is_comment_content_allowed

* fix: remove redundant constant & check for valid block comment statuses

* fix: revert comment for get_item_schema

* Update lib/experimental/class-gutenberg-rest-comment-controller.php

Co-authored-by: Aki Hamano <[email protected]>

* Update lib/experimental/class-gutenberg-rest-comment-controller.php

Co-authored-by: Aki Hamano <[email protected]>

* Update packages/editor/src/components/collab-sidebar/comments.js

Co-authored-by: Aki Hamano <[email protected]>

* fix: remove block-comments-test.php

* fix: revert empty comment check in controller

* fix: comment type check for empty block comments

---------

Co-authored-by: yashjawale <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: adamsilverstein <[email protected]>
Co-authored-by: jeffpaul <[email protected]>
Co-authored-by: priethor <[email protected]>
Co-authored-by: dream-encode <[email protected]>

* use linked term names in variations (#72307)


Co-authored-by: cr0ybot <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: ntsekouras <[email protected]>

* Perf: Avoid busting the memo cache for `useDebounce` options (#72279)

* Avoid busting the memo cache for delayedBlockVisibilityUpdates

* Fix useDebounce instead

* Move delayedBlockVisibility debounce options out of the component

----

Co-authored-by: talldan <[email protected]>
Co-authored-by: aaronrobertshaw <[email protected]>

* Notes: Rename comment type (#72310)


Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* Note: Fix the error when creating a new note (#72312)


Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* Notes: Tweak thead style (#72308)

* Notes: Tweak thead style

* Remove redundant id prop

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: Mamaduka <[email protected]>

* Remove redundant max percentage from download progress (#72282)

wp-env shows output such as "Downloading WordPress - 50/100%", and the 100 is redundant since "50%" means the same since 100% is an implied maximum, and is clearer and more concise

Co-authored-by: mathiscode <[email protected]>
Co-authored-by: talldan <[email protected]>

* Packages Build: Fix watch mode for style files (#72315)

Co-authored-by: youknowriad <[email protected]>

* Notes: improve REST API checks for resolution notes (#72316)

* Notes: improve REST API checks for resolution notes

* Improve auth_callback check

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: Mamaduka <[email protected]>

* Notes: Audit and update translation strings (#72311)


Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: Shekhar0109 <[email protected]>
Co-authored-by: jeffpaul <[email protected]>

* PHP-only blocks: add documentation (#72068)

Co-authored-by: priethor <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* Details block: Add name attribute in editor (#71054)


Co-authored-by: Soean <[email protected]>
Co-authored-by: Mamaduka <[email protected]>

* Build v2: Migrate DataViews and Admin UI (#72319)

Co-authored-by: youknowriad <[email protected]>

* Icons: Bundle generated source code (#72299)

* Icons: Bundle generated source code

As of #71878, Icons are defined as SVG files under `src/library/`, and
an accompanying `build` script will produce their corresponding TSX
files and an index at `src/library/index.ts`.

However, this generated source code was not included in the published
package. This pull request seeks to include `src/library/*.ts[x]` in
`@wordpress/icons`, for the benefit of its consumers, who thereby no
longer need to generate that code themselves.

It does so by adding an empty `.npmignore` file, which overrides
`.gitignore`. As a reminder, we deliberately Git-ignore the generated
source code because we don't want the duplication of SVG and TSX files,
nor the possible synchronisation issues that come with it.

@see https://docs.npmjs.com/cli/v11/commands/npm-publish#files-included-in-package

* Update changelog

Co-authored-by: mcsf <[email protected]>
Co-authored-by: youknowriad <[email protected]>

* Build V2: Migrate more packages (#72324)

Co-authored-by: youknowriad <[email protected]>

* Allow Post Content when "Force Page Reload" is disable in the Query Loop (#72160)

* Add `supports.interactivity.clientNavigation`

* Update `useUnsupportedBlocks`

* Update enhanced pagination modal

* Update enhanced pagination control

* Remove `Post Content` in Query Loop

* Fix other unit test

* Remove unit test

* Update changelog

* Change modal notice

* Add unit tests

* Template activation: improve back compat (#72223)

Co-authored-by: ellatrix <[email protected]>
Co-authored-by: mcsf <[email protected]>
Co-authored-by: priethor <[email protected]>
Co-authored-by: costasovo <[email protected]>
Co-authored-by: jkmassel <[email protected]>

* Notes: Allow creating duplicate comments for all notes (#72320)

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: adamsilverstein <[email protected]>
Co-authored-by: karthick-murugan <[email protected]>
Co-authored-by: ellatrix <[email protected]>

* Field types: move element validation to `isValid.elements` (#72325)

* Build v2: Migrate more packages including editor (#72328)

* Workflows: Performance: Fix RegExp for wpVersion option (#72327)

Follow-up of #32244 (4½ years later!)

The original regular expression was missing a backslash to match a
literal period (\.), and thus it could match any character.

In practice, this should never matter because of WordPress's versioning
conventions. However, if we ever reach a x.100 minor release, the CI
performance tests would fail. ;)

Co-authored-by: mcsf <[email protected]>
Co-authored-by: youknowriad <[email protected]>

* Improve CRDT "merge logic" for post entities (#72262)

* Move post type syncConfig to const

This is purely to help avoid future conflicts when we conditionally
set syncConfig based on post-type supports

* Pass current record to syncConfig functions

* Improve CRDT utils with better merge logic

* Add tests for crdt and crdt-blocks

* Update resolver unit test

* Remove unnecessary mocks and improve types of tests

* Get type record in resolver and pass through to CRDT utils

* Remove persisted record argument from updateCRDTDoc

* Remove lib0 as dependency

* Revert "Get type record in resolver and pass through to CRDT utils"

This reverts commit ea050e1051636fa881349ae057d8a28255408983.

* Inspect initial record for available fields

* Simplify allowed sync properties to enforced allow list

---------

Co-authored-by: ingeniumed <[email protected]>

* Bump plugin version to 21.8.1

* Update Changelog for 21.8.1

* DataForm: reorganize validation tests (#72330)

* Block Bindings: Refactor UI, improve consistency, add more info about source status. (#72253)

Co-authored-by: cbravobernal <[email protected]>
Co-authored-by: ockham <[email protected]>

* Time to Read: Don't use `wp_word_count()` function (#72091)

* Time to Read: Don't use wp_word_count() function

* Update PHP docblock

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: dmsnell <[email protected]>

* Badge: Fix styles (#72302)

* Badge: Fix styles

* Append changelog

Co-authored-by: mirka <[email protected]>
Co-authored-by: juanfra <[email protected]>

* iAPI: Add official support for unique IDs (#72161)

* Implement unique IDs for Interactivity API directives

* test: Add comprehensive edge cases for unique IDs regex parsing

* Improve unit tests

* Get rid of contants and replace regexp with function

* Move test and add invalid chars back

* More refactoring

* Rename

* Destructure state to eliminate redundant store accesses

* Simplify context merging and avoid repeated initializations

* Reset data-wp-context

* Add support for multiple default entries to context

* Fix all warns in directives

* Add context e2e tests

* Add bind tests

* Add failing class e2e test

* Fix test

* Add failing each e2e test

* Fix test

* Fix router and each

* Minor fix to test

* Add init e2e test

* Add on e2e test

* Add on-document e2e test

* Add on-window e2e test

* Add run e2e test

* Add styles e2e test

* Add text e2e test

* Add watch e2e tests

* Remove unique-id tests

* Mini refactor parseDirectiveName

* Remove await page.pause();

* Fix split limits

* Use warn in warn functions

* Fix directive comments and some warns

* Add failing test

* Fix test

* Add changelog

---------

Co-authored-by: samueljseay <[email protected]>
Co-authored-by: luisherranz <[email protected]>
Co-authored-by: DAreRodz <[email protected]>
Co-authored-by: Sahil1617 <[email protected]>

* Notes: Move focus to the parent thread when a reply was deleted (#72341)


Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* Editor: Don't use deprecated '__experimentalGetDefaultTemplateType' selector (#72338)


Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: ntsekouras <[email protected]>

* Drag and drop: direct drag: move block instead of drag chip (#67470)

* Notes: Avoid losing sidebar reference (#72342)


Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: juanfra <[email protected]>

* Notes: Graduate from experiments (#72344)


Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: fabiankaegy <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: roseg43 <[email protected]>
Co-authored-by: jeffpaul <[email protected]>

* Breadcrumbs: Do not allow empty separator (#72347)

Unlinked contributors: harshbhonsle.

Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: hanneslsm <[email protected]>
Co-authored-by: Utsav-Ladani <[email protected]>
Co-authored-by: kjnanda <[email protected]>

* Build v2: Migrate block library (#72333)

Co-authored-by: youknowriad <[email protected]>

* Build v2: Fix block-editor default colors (#72349)

Co-authored-by: youknowriad <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* Build v2: Migrate edit-* packages to the new build script (#72354)

Co-authored-by: youknowriad <[email protected]>

* Revert "Template activation: redirect theme templates urls to wp_registered_template (#72003)" (#72356)

This reverts commit a45fd836871ae605d558f980f14e5f9f48831ceb.

Co-authored-by: ellatrix <[email protected]>
Co-authored-by: Mamaduka <[email protected]>

* Notes: Don't change 'type' schema (#72357)


Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* DataForm: refactor RelativeDateControl to use DataFormControl props (#72361)

* Standardise DataForm typography (#72284)

Co-authored-by: jameskoster <[email protected]>
Co-authored-by: dinhtungdu <[email protected]>

* Add Link UI tests for entity-bound navigation links (#72209)


Co-authored-by: getdave <[email protected]>
Co-authored-by: jeryj <[email protected]>
Co-authored-by: ockham <[email protected]>

* Fix transpilation warnings (#72359)

Co-authored-by: Utsav-Ladani <[email protected]>
Co-authored-by: talldan <[email protected]>

* Categories block: Improve and harden JavaScript used when displayed as dropdown (#72118)

* Modernize and improve robustness of Categories dropdown JS

* Add sourceURL for JS in build_dropdown_script_block_core_categories()

* Use value property instead of options

Co-authored-by: westonruter <[email protected]>
Co-authored-by: ramonjd <[email protected]>

* Improve code formatting

Co-authored-by: Ramon <[email protected]>

---------

Co-authored-by: Ramon <[email protected]>

* DataViews and DataViews Picker: ensure title overflows correctly in Grid view (#72339)

Co-authored-by: ramonjd <[email protected]>
Co-authored-by: tellthemachines <[email protected]>
Co-authored-by: talldan <[email protected]>

* Terms Query: Update `inherit` control and functionality (#72313)

Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: cr0ybot <[email protected]>
Co-authored-by: ellatrix <[email protected]>
Co-authored-by: Aljullu <[email protected]>

* Term Name: Decode HTML entities (#72375)

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: ntsekouras <[email protected]>

* Notes: Fix commentId `cleanEmptyObject` attributes (#72369)

Co-authored-by: shimotmk <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* BlockRenameModal: Fix Rename `cleanEmptyObject` attributes (#72371)

* Fix Rename `cleanEmptyObject` attributes

* fix test

* Terms Query: Add `include` specific terms support (#72286)

Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: cr0ybot <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* Icons: Add `prepare` script to generate source; don't bundle (#72365)

Alternative to (and revert of) #72299 (e82f6687e6)

As of #71878 (8dff7def7d), Icons are defined as SVG files under
`src/library/`, and an accompanying `build` script will produce their
corresponding TSX files and an index at `src/library/index.ts`.

This patch reverts the addition of `.npmignore` in #72299. With this
revert, we return to the guarantee that any generated source code WILL
NOT be included in the published NPM package.

Instead, this patch adds a `prepare` script for @wordpress/icons to
trigger the code generation. This script is part of several NPM life
cycles, including installation (`install`, `ci`) and packing (`publish`,
`pack`), and runs in the background:

https://docs.npmjs.com/cli/v11/using-npm/scripts#life-cycle-scripts

This change is motivated by the fact that Gutenberg's workflow for
releasing NPM packages involves calling `npm version` (via Lerna) on a
fresh repository clone. Since `npm version` involves creating new
commits, the clone needs to be prepared to run pre-commit hooks.
Concretely, linting will fail if import paths to the icon library cannot
be resolved.

A more localised fix would have been to explicitly invoke a build of the
icons package during the package-release workflow (after `ci` and before
`version`), but with this approach based on `prepare` we guarantee the
availability of the generation code in (probably) all situations. In
particular, it eliminates the need to bundle the generated code in the
package (as previously mentioned).

Co-authored-by: mcsf <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* Bump plugin version to 21.8.2

* Block Bindings: Move bindable attributes to privateContext. (#72351)

* Move bindable attributes to privateContext

* Warning due to empty array

* Update Changelog for 21.8.2

* Build V2: Fix DataViews export file (#72387)

* Block Transforms: In metadata transform, remove check for block bindings support (#72389)

Co-authored-by: ockham <[email protected]>
Co-authored-by: cbravobernal <[email protected]>

* Update `modalHeader` to support dynamic modal header text based on selected item (#72384)

* Update ActionModal to support dynamic modal header text based on selected items

* fix story

* add changelog

* fix changelog

* Update packages/dataviews/CHANGELOG.md

Co-authored-by: André <[email protected]>

---------

Co-authored-by: André <[email protected]>

* Terms Query: Stabilize the block (#72380)

Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: cr0ybot <[email protected]>
Co-authored-by: tyxla <[email protected]>

* Build V2: Cleanup v1 build scripts (#72358)

* Terms Query: Small PHP code quality changes (#72385)

Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: priethor <[email protected]>

* Try: Fix flaky router styles e2e tests (#72329)

* Try: Fix flaky router styles e2e tests

* Add a hydration check before each test

---------

Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: DAreRodz <[email protected]>
Co-authored-by: luisherranz <[email protected]>

* Breadcrumbs: Make experimental (#72234)

Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: tyxla <[email protected]>

* Create block: update DocBlock with exposed variables for render.php templates (#72086)

Co-authored-by: benoitchantre <[email protected]>
Co-authored-by: gziolo <[email protected]>

* Notes: Update button labels (#72352)


Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: adamsilverstein <[email protected]>
Co-authored-by: jeffpaul <[email protected]>
Co-authored-by: kjnanda <[email protected]>

* DataForm: introduce `validity` prop (#71412)

Co-authored-by: oandregal <[email protected]>
Co-authored-by: youknowriad <[email protected]>
Co-authored-by: mirka <[email protected]>
Co-authored-by: jorgefilipecosta <[email protected]>

* iAPI: Handle all `getServerState` and `getServerContext` sync scenarios (#72381)

* Add failing test for non-changing props

* Add failing test for props that only exist in some pages

* Add failing test for non-changing props (context)

* Add failing test for props that only exist in some pages (context)

* Fix existing tests (state)

* Fix getServerState tests

* Remove deepImmutable in favor of deepReadOnly

* Export deepReadOnly in the private APIs

* Simplify signal logic

* Add failing test for resetting state on pages without state

* Fix reset state test

* Add proper types for getServerState

* Trigger invalidations in the router

* Add additional context test for resetting context

* Add tests for getServerContext types

* Fix the context tests

* Add changelog

* Don't execute type tests

* Remove `readOnly` option from proxifyState

* Fix PHP lint

* Rename types tests to types

* Use `Record<string, unknown>` type for non-generic in getServerState

* Use `Record<string, unknown>` type for non-generic in getServerContext

* Update changelog

Co-authored-by: luisherranz <[email protected]>
Co-authored-by: DAreRodz <[email protected]>

* HTML API: Refactor layout image container. (#72264)

For classic themes, image blocks need to create a `DIV` wrapper which
contains alignment classes from the inner `FIGURE`. This has been
processed using PCRE matching.

With this change the HTML API is used instead of PCRE functions to
provide more semantic transformation, clearer intent, and eliminate
possible parsing issues.

Co-authored-by: Glen Davies <[email protected]>
Co-authored-by: tellthemachines <[email protected]>
Github-PR: 72264
Github-PR-URL: https://github.com/WordPress/gutenberg/pull/72264
Core-Backport-PR: wordpress/wordpress-develop#10218
Core-Backport-PR-URL: https://github.com/WordPress/wordpress-develop/pull/10218

* Notes: Add More Menu Item (#72377)

* Notes: Update snackbar text (#72409)

* Notes: Update snackbar text

* Update e2e test

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: adamsilverstein <[email protected]>

* iAPI: fix unexpected browser warning for withSyncEvent() wrapper (#70325)

* iAPI: fix unexpected browser warning for withSyncEvent() wrapper

* improve sync function handling

Unlinked contributors: ethanscorey, bhattaganesh.

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: felixarntz <[email protected]>
Co-authored-by: Rishit30G <[email protected]>
Co-authored-by: aaronjorbin <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: luisherranz <[email protected]>

* Fix: Change ordering of multiple `data-wp-context` directives in iAPI processing (#72395)

* Toggle override in context `deepMerge`

* Change context text

* Reverse entries array instead of overriding `deepMerge`

* Reverse on array creation

* Add changelog

---------

Co-authored-by: luisherranz <[email protected]>

* Release Documentation: Add quick reference guide (#72388)

Co-authored-by: priethor <[email protected]>
Co-authored-by: cbravobernal <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* Fit-Text: Resize immediately, but limit max size when block is selected (#72397)

Co-authored-by: jorgefilipecosta <[email protected]>
Co-authored-by: mcsf <[email protected]>

* Notes: Change metadata key (#72411)

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: Mamaduka <[email protected]>

* bindableAttributes is undefined, as we removed the array (#72401)

* Breadcrumbs: Add `post with terms` breadcrumbs support (#72124)

Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: mcsf <[email protected]>
Co-authored-by: justintadlock <[email protected]>
Co-authored-by: ellatrix <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: jasmussen <[email protected]>

* Paragraph and Heading Block: Remove stretchy text variation (#72408)

* Paragraph and Heading Block: Remove stretchy text variation

* Remove heading/variation.js

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: tyxla <[email protected]>
Co-authored-by: fcoveram <[email protected]>

* Notes: When thread active push previous floating comments up (#72309)


Co-authored-by: adamsilverstein <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: jarekmorawski <[email protected]>
Co-authored-by: annezazu <[email protected]>

* Block Bindings: Move support for Navigation blocks url attribute to correct place (#72418)

Fix block bindings support for the Navigation Link and Navigation Submenu blocks' `url` attribute.

Co-authored-by: ockham <[email protected]>
Co-authored-by: getdave <[email protected]>

* Remove core/entity binding in favour of post and term data bindings. Apply to Nav blocks. (#72165)

* Block bindings: prefer attributes over context; add link; remove core/entity\n\n- Post Data (PHP): attribute-first id resolution; add 'link' key\n- Term Data (PHP): attribute-first id/taxonomy; map tag→post_tag; keep 'link'\n- Editor bindings (JS): post-data/term-data use attributes; post-data adds link\n- Navigation Link: choose source by kind (post-data vs term-data), use key 'link'\n- Remove core/entity binding and its registrations (PHP/JS)\n- Update lib/load.php and bindings/api.js accordingly

* Add clear comments for backwards compat

* Use correct sources

* Don't use setter for navigation bindings

* Clean up Nav block conditionals

* Tone down backward compat comments

* Reduce comment verbosity in PHP

* Use correct error handling

* Avoid dding clientId arg

* Fix Submenu using wrong binding

* Fix https://github.com/WordPress/gutenberg/pull/72165\#pullrequestreview-3339486543

* Tweak comments

* Remove count from term count string

* Improve consistency of use-entity-binding

* Handle all binding types when clearing url

* Add backport changelog

* Fix bug with sidebar Link field not clearing

* Match tests to new implementation

* await error notice in link control test

* Fix faulty entity binding clearing logic

* Tweak entity binding tests again

---------

Co-authored-by: getdave [email protected]
Co-authored-by: ockham [email protected]
Co-authored-by: jeryj [email protected]
Co-authored-by: cbravobernal [email protected]
Co-authored-by: scruffian [email protected]

* Notes: Remove 'isDefaultEmptyBlock' condition (#72427)


Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: jameskoster <[email protected]>
Co-authored-by: annezazu <[email protected]>

* Add missing type export (#72428)

* Notes: Show orphaned notes in archive sidebar (#72420)

* Notes: Show orhan notes in archive sidebar

* Combine orphaned comments without considering their status

* Use "orphaned" instead of "orphan"

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: Mamaduka <[email protected]>

* Terms Query: Fix display all terms in editor (#72419)

Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: tyxla <[email protected]>

* Notes: Relocate privacy info text (#72421)


Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: juanfra <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: hanneslsm <[email protected]>
Co-authored-by: annezazu <[email protected]>

* Build v2: Move the php files copying to the v2 script and make the config generic per package (#72396)

* iAPI Router: Selectively preload interactivity script modules (#72340)

* In iAPI router selectively load only modules that we instruct to load via an options attribute.

* Always add loadOnClientNavigation for core blocks in Gutenberg which are registered in client-assets.php

* Fix formatting

* Patch WP_Script_Modules to add the filter we intend to backport to core.

* Move script module logic to compat

* Move 6.9-compat script-modules file outside of `WP_REST_Controller`-related compat files

* Manually register script modules for navigation tests

* Add core backport changelog entry

---------

Co-authored-by: samueljseay <[email protected]>
Co-authored-by: luisherranz <[email protected]>
Co-authored-by: DAreRodz <[email protected]>

* Block Bindings: Remove spurious attributes from supported-by-6.8 list (#72442)

Co-authored-by: ockham <[email protected]>
Co-authored-by: getdave <[email protected]>

* Notes: Fix logic for opening feature sidebar areas (#72431)


Co-authored-by: karthick-murugan <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: t-hamano <[email protected]>

* iAPI: Skip directive execution for "lazy" derived state props (#71125)

* Try returning a Symbol from `evaluate()`

* Handle only unresolved props when they are getters

* Fix the way getters are identified

* Fix derivedStatePropsAccessed initialization

* Add e2e tests for bind and class directives

* Move derived state props to the same store

* Fix derived state closures

* Add code for wp-each tests

* Change implementation to throw on missing getters

* Add tests for getters that depend on missing getters

* Reimplement each-child to keep its content until ready

* Add e2e tests for each-child

* Add tests for wp-style and wp-text

* Remove PENDING_GETTER evaluation from directives that don't need it

* Replace `derivedStatePropsAccessed` with `derivedStateClosures`

Co-authored-by: DAreRodz <[email protected]>
Co-authored-by: samueljseay <[email protected]>
Co-authored-by: luisherranz <[email protected]>

* iAPI: Fix `wp-each` item contexts for objects with same key (#70424)

* Add failing tests

* Try caching contexts per index

* Add method to remove book from derived state

* Create item context based on item keys

* Document new functions

* Set the item prop value in the directive callback

* Fix eack-key for objects

Co-authored-by: DAreRodz <[email protected]>
Co-authored-by: samueljseay <[email protected]>

* Block Transforms: use new getTransformedAttributes() function (#72196)

* Block Transforms: use new getTransformedAttributes() function

* Fix

* Remove unnecessary code

* Remove old file

* Use anchor instead of id

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: ntsekouras <[email protected]>

* Fix Page List to Navigation Link conversion with entity bindings (#72287)

* Fix Page List to Navigation Link conversion with entity bindings

- Extract buildNavigationLinkEntityBinding function from useEntityBinding hook
- Export function from navigation-link/shared for reuse
- Update Page List conversion to add entity binding metadata
- Update tests to verify binding structure is included
- Use hardcoded test expectations with shared variable for maintainability

Fixes #72245

* Refactor to accommodate changes from trunk

* Fix expected binding in tests and rename for clarity

* Improve invalid binding kind

Co-authored-by: getdave <[email protected]>
Co-authored-by: scruffian <[email protected]>
Co-authored-by: ockham <[email protected]>

* Wait for transpilation of all JS files before compiling styles (#72435)

Co-authored-by: Utsav-Ladani <[email protected]>

* Build V2: Adhoc script to build vendors and remove webpack (#72441)

Co-authored-by: youknowriad <[email protected]>

* Template activation: fix theme field for old REST API endpoint (#72366)

Co-authored-by: ellatrix <[email protected]>
Co-authored-by: jkmassel <[email protected]>

* Add math block and rich text format (#72182)

Unlinked contributors: EldarAgalarov.

Co-authored-by: ellatrix <[email protected]>
Co-authored-by: alshakero <[email protected]>
Co-authored-by: youknowriad <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: jasmussen <[email protected]>
Co-authored-by: mtias <[email protected]>
Co-authored-by: kathrynwp <[email protected]>
Co-authored-by: dmsnell <[email protected]>
Co-authored-by: adamsilverstein <[email protected]>
Co-authored-by: bgoewert <[email protected]>

* Template activation: duplicate modal on static template click, remove auto-drafting (#72285)

Co-authored-by: ellatrix <[email protected]>
Co-authored-by: priethor <[email protected]>
Co-authored-by: mcsf <[email protected]>

* Build v2: Cleanup and simplify build and dev scripts (#72448)

Co-authored-by: youknowriad <[email protected]>

* Field API: support async loading elements (#72254)

Co-authored-by: oandregal <[email protected]>
Co-authored-by: jorgefilipecosta <[email protected]>
Co-authored-by: dinhtungdu <[email protected]>

* Icons: Make tracked file checker work in more environments (#72337)

* Eslint: Ignore `build-wp` (#72404)

Co-authored-by: mirka <[email protected]>
Co-authored-by: youknowriad <[email protected]>

* Build v2: Fix watch of nested dependenc…
termDataValues = context.termData;
dataFields = createDataFields(
termDataValues,
termDataValues?.term_id
Copy link
Contributor

@ockham ockham Nov 19, 2025

Choose a reason for hiding this comment

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

@getdave A bit late, but as I'm working on refactoring the core/term-data source, I was wondering where to find the shape of termData context; especially about its term_id member.

The closest thing I've found is this mapping in the Term Template block:

const blockContexts = useMemo(
() =>
terms?.map( ( term ) => ( {
taxonomy,
termId: term.id,
classList: `term-${ term.id }`,
termData: term,
} ) ),
[ terms, taxonomy ]
);

However, even there, term_id seems to be used only outside of termData, and it's set to termData.id. So I'm wondering if termData.term_id actually ever existst? (Or if it should really be termData.id?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't actually create term data so I've not got much better insight than you here. I think term_id is exposed via REST as id. The DB column {{type}}_id is common in WordPress.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would have thought maintaining consistency with what REST exposes is best. term_id is the column name so the prefix seems unnecessary.

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

Labels

[Block] Navigation Link Affects the Navigation Link Block [Block] Navigation Affects the Navigation Block [Block] Submenu Affects the Submenu Block - for submenus in navigation [Feature] Block bindings [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Eliminate Entity Block Binding Source Redundancy

8 participants