Skip to content

Conversation

@ockham
Copy link
Contributor

@ockham ockham commented Oct 27, 2025

What?

Introduce a new format field for use in attribute definitions (e.g. in block.json), and use it to filter block bindings source items based on format compatibility with bound attribute.

Fixes #72446. Reverts #72712.

Why?

To remove incompatible source items from the block bindings UI for a given block bindings source.

For example, when we show the available items from the core/post-data list for the Date block's datetime attribute, we only want to show the date and modified source items, but not link (which is an url and thus incompatible with a datetime field).

How?

By introducing a format field in attribute definitions, and adding block bindings code to peruse it.

Testing Instructions

  • In the editor, insert a Date block.
  • In the block inspector, open the "Attributes" panel.
  • Click on the datetime attribute to expand the dropdown menu. It should contain the "Post Data" source.
  • Verify that there are two items available from that source: Post Date and Modified Date.

Screenshots or screencast

Before After
image image

TODO

  • Add unit test coverage (to packages/editor/src/bindings/test/post-data.js (?)).

@ockham ockham self-assigned this Oct 27, 2025
@ockham ockham added [Block] Post Date Affects the Post Date Block [Block] Navigation Link Affects the Navigation Link Block [Block] Submenu Affects the Submenu Block - for submenus in navigation [Feature] Block bindings labels Oct 27, 2025
@ockham
Copy link
Contributor Author

ockham commented Oct 27, 2025

Discussion

I'd like to discuss if this could still be considered for WP 6.9. I realize that introducing an addition to block.json so late in the cycle could be controversial. However:

  • "Format" is a fairly established concept, and one that we might've introduced sooner or later anyway for more granular "typing" of attributes. (Maybe there could be some connection to the new Fields API and components?)
  • Special attention needs to be paid when choosing what kinds of formats to allow. However, some standardization exists for those; we can take inspiration from other places in WP -- e.g. this.

@ockham ockham added the [Type] Bug An existing feature does not function as intended label Oct 27, 2025
@github-actions
Copy link

github-actions bot commented Oct 27, 2025

Size Change: +23 B (0%)

Total Size: 2.58 MB

Filename Size Change
build/scripts/block-editor/index.min.js 314 kB -11 B (0%)
build/scripts/block-library/index.min.js 278 kB +17 B (+0.01%)
build/scripts/editor/index.min.js 284 kB +17 B (+0.01%)
ℹ️ View Unchanged
Filename Size
build/modules/a11y/index.min.js 355 B
build/modules/abilities/index.min.js 42.3 kB
build/modules/block-editor/utils/fit-text-frontend.min.js 549 B
build/modules/block-library/accordion/view.min.js 779 B
build/modules/block-library/file/view.min.js 346 B
build/modules/block-library/form/view.min.js 528 B
build/modules/block-library/image/view.min.js 1.95 kB
build/modules/block-library/navigation/view.min.js 1.03 kB
build/modules/block-library/query/view.min.js 518 B
build/modules/block-library/search/view.min.js 498 B
build/modules/block-library/tabs/view.min.js 859 B
build/modules/boot/index.min.js 103 kB
build/modules/core-abilities/index.min.js 890 B
build/modules/edit-site-init/index.min.js 2.14 kB
build/modules/interactivity-router/full-page.min.js 451 B
build/modules/interactivity-router/index.min.js 11.5 kB
build/modules/interactivity/index.min.js 14.9 kB
build/modules/latex-to-mathml/index.min.js 56.5 kB
build/modules/latex-to-mathml/loader.min.js 131 B
build/modules/lazy-editor/index.min.js 18.8 kB
build/modules/route/index.min.js 24.6 kB
build/modules/workflow/index.min.js 36.8 kB
build/scripts/a11y/index.min.js 1.06 kB
build/scripts/annotations/index.min.js 2.38 kB
build/scripts/api-fetch/index.min.js 2.83 kB
build/scripts/autop/index.min.js 2.18 kB
build/scripts/blob/index.min.js 631 B
build/scripts/block-directory/index.min.js 8.03 kB
build/scripts/block-serialization-default-parser/index.min.js 1.16 kB
build/scripts/block-serialization-spec-parser/index.min.js 3.08 kB
build/scripts/blocks/index.min.js 56.4 kB
build/scripts/commands/index.min.js 19.9 kB
build/scripts/components/index.min.js 273 kB
build/scripts/compose/index.min.js 13.9 kB
build/scripts/core-commands/index.min.js 4.13 kB
build/scripts/core-data/index.min.js 86.7 kB
build/scripts/customize-widgets/index.min.js 12.3 kB
build/scripts/data-controls/index.min.js 793 B
build/scripts/data/index.min.js 9.62 kB
build/scripts/date/index.min.js 23.6 kB
build/scripts/deprecated/index.min.js 752 B
build/scripts/dom-ready/index.min.js 476 B
build/scripts/dom/index.min.js 4.91 kB
build/scripts/edit-post/index.min.js 16.3 kB
build/scripts/edit-site/index.min.js 234 kB
build/scripts/edit-widgets/index.min.js 20 kB
build/scripts/element/index.min.js 5.19 kB
build/scripts/escape-html/index.min.js 586 B
build/scripts/format-library/index.min.js 10.8 kB
build/scripts/hooks/index.min.js 1.83 kB
build/scripts/html-entities/index.min.js 494 B
build/scripts/i18n/index.min.js 2.46 kB
build/scripts/is-shallow-equal/index.min.js 568 B
build/scripts/keyboard-shortcuts/index.min.js 1.57 kB
build/scripts/keycodes/index.min.js 1.53 kB
build/scripts/list-reusable-blocks/index.min.js 2.44 kB
build/scripts/media-utils/index.min.js 69.5 kB
build/scripts/notices/index.min.js 1.11 kB
build/scripts/nux/index.min.js 1.88 kB
build/scripts/patterns/index.min.js 7.87 kB
build/scripts/plugins/index.min.js 2.14 kB
build/scripts/preferences-persistence/index.min.js 2.15 kB
build/scripts/preferences/index.min.js 3.31 kB
build/scripts/primitives/index.min.js 1.01 kB
build/scripts/priority-queue/index.min.js 1.61 kB
build/scripts/private-apis/index.min.js 1.07 kB
build/scripts/react-i18n/index.min.js 832 B
build/scripts/react-refresh-entry/index.min.js 9.44 kB
build/scripts/react-refresh-runtime/index.min.js 3.59 kB
build/scripts/redux-routine/index.min.js 3.36 kB
build/scripts/reusable-blocks/index.min.js 2.93 kB
build/scripts/rich-text/index.min.js 12.9 kB
build/scripts/router/index.min.js 5.96 kB
build/scripts/server-side-render/index.min.js 1.91 kB
build/scripts/shortcode/index.min.js 1.58 kB
build/scripts/style-engine/index.min.js 2.33 kB
build/scripts/theme/index.min.js 20.8 kB
build/scripts/token-list/index.min.js 739 B
build/scripts/undo-manager/index.min.js 917 B
build/scripts/url/index.min.js 3.98 kB
build/scripts/vendors/react-dom.min.js 43 kB
build/scripts/vendors/react-jsx-runtime.min.js 691 B
build/scripts/vendors/react.min.js 4.27 kB
build/scripts/viewport/index.min.js 1.22 kB
build/scripts/warning/index.min.js 454 B
build/scripts/widgets/index.min.js 7.81 kB
build/scripts/wordcount/index.min.js 1.04 kB
build/styles/block-directory/style-rtl.css 1.05 kB
build/styles/block-directory/style.css 1.05 kB
build/styles/block-editor/content-rtl.css 4.8 kB
build/styles/block-editor/content.css 4.79 kB
build/styles/block-editor/default-editor-styles-rtl.css 224 B
build/styles/block-editor/default-editor-styles.css 224 B
build/styles/block-editor/style-rtl.css 16.4 kB
build/styles/block-editor/style.css 16.4 kB
build/styles/block-library/accordion-heading/style-rtl.css 325 B
build/styles/block-library/accordion-heading/style.css 325 B
build/styles/block-library/accordion-item/style-rtl.css 180 B
build/styles/block-library/accordion-item/style.css 180 B
build/styles/block-library/accordion-panel/style-rtl.css 99 B
build/styles/block-library/accordion-panel/style.css 99 B
build/styles/block-library/accordion/style-rtl.css 62 B
build/styles/block-library/accordion/style.css 62 B
build/styles/block-library/archives/editor-rtl.css 61 B
build/styles/block-library/archives/editor.css 61 B
build/styles/block-library/archives/style-rtl.css 90 B
build/styles/block-library/archives/style.css 90 B
build/styles/block-library/audio/editor-rtl.css 149 B
build/styles/block-library/audio/editor.css 151 B
build/styles/block-library/audio/style-rtl.css 132 B
build/styles/block-library/audio/style.css 132 B
build/styles/block-library/audio/theme-rtl.css 134 B
build/styles/block-library/audio/theme.css 134 B
build/styles/block-library/avatar/editor-rtl.css 115 B
build/styles/block-library/avatar/editor.css 115 B
build/styles/block-library/avatar/style-rtl.css 104 B
build/styles/block-library/avatar/style.css 104 B
build/styles/block-library/breadcrumbs/style-rtl.css 203 B
build/styles/block-library/breadcrumbs/style.css 203 B
build/styles/block-library/button/editor-rtl.css 265 B
build/styles/block-library/button/editor.css 265 B
build/styles/block-library/button/style-rtl.css 554 B
build/styles/block-library/button/style.css 554 B
build/styles/block-library/buttons/editor-rtl.css 291 B
build/styles/block-library/buttons/editor.css 291 B
build/styles/block-library/buttons/style-rtl.css 349 B
build/styles/block-library/buttons/style.css 349 B
build/styles/block-library/calendar/style-rtl.css 239 B
build/styles/block-library/calendar/style.css 239 B
build/styles/block-library/categories/editor-rtl.css 132 B
build/styles/block-library/categories/editor.css 131 B
build/styles/block-library/categories/style-rtl.css 152 B
build/styles/block-library/categories/style.css 152 B
build/styles/block-library/classic-rtl.css 321 B
build/styles/block-library/classic.css 321 B
build/styles/block-library/code/editor-rtl.css 53 B
build/styles/block-library/code/editor.css 53 B
build/styles/block-library/code/style-rtl.css 139 B
build/styles/block-library/code/style.css 139 B
build/styles/block-library/code/theme-rtl.css 122 B
build/styles/block-library/code/theme.css 122 B
build/styles/block-library/columns/editor-rtl.css 108 B
build/styles/block-library/columns/editor.css 108 B
build/styles/block-library/columns/style-rtl.css 421 B
build/styles/block-library/columns/style.css 421 B
build/styles/block-library/comment-author-avatar/editor-rtl.css 124 B
build/styles/block-library/comment-author-avatar/editor.css 124 B
build/styles/block-library/comment-author-name/style-rtl.css 72 B
build/styles/block-library/comment-author-name/style.css 72 B
build/styles/block-library/comment-content/style-rtl.css 120 B
build/styles/block-library/comment-content/style.css 120 B
build/styles/block-library/comment-date/style-rtl.css 65 B
build/styles/block-library/comment-date/style.css 65 B
build/styles/block-library/comment-edit-link/style-rtl.css 70 B
build/styles/block-library/comment-edit-link/style.css 70 B
build/styles/block-library/comment-reply-link/style-rtl.css 71 B
build/styles/block-library/comment-reply-link/style.css 71 B
build/styles/block-library/comment-template/style-rtl.css 191 B
build/styles/block-library/comment-template/style.css 191 B
build/styles/block-library/comments-pagination-numbers/editor-rtl.css 122 B
build/styles/block-library/comments-pagination-numbers/editor.css 121 B
build/styles/block-library/comments-pagination/editor-rtl.css 168 B
build/styles/block-library/comments-pagination/editor.css 168 B
build/styles/block-library/comments-pagination/style-rtl.css 201 B
build/styles/block-library/comments-pagination/style.css 201 B
build/styles/block-library/comments-title/editor-rtl.css 75 B
build/styles/block-library/comments-title/editor.css 75 B
build/styles/block-library/comments/editor-rtl.css 842 B
build/styles/block-library/comments/editor.css 842 B
build/styles/block-library/comments/style-rtl.css 637 B
build/styles/block-library/comments/style.css 637 B
build/styles/block-library/common-rtl.css 1.11 kB
build/styles/block-library/common.css 1.11 kB
build/styles/block-library/cover/editor-rtl.css 631 B
build/styles/block-library/cover/editor.css 631 B
build/styles/block-library/cover/style-rtl.css 1.82 kB
build/styles/block-library/cover/style.css 1.81 kB
build/styles/block-library/details/editor-rtl.css 65 B
build/styles/block-library/details/editor.css 65 B
build/styles/block-library/details/style-rtl.css 86 B
build/styles/block-library/details/style.css 86 B
build/styles/block-library/editor-elements-rtl.css 75 B
build/styles/block-library/editor-elements.css 75 B
build/styles/block-library/editor-rtl.css 11.8 kB
build/styles/block-library/editor.css 11.8 kB
build/styles/block-library/elements-rtl.css 54 B
build/styles/block-library/elements.css 54 B
build/styles/block-library/embed/editor-rtl.css 331 B
build/styles/block-library/embed/editor.css 331 B
build/styles/block-library/embed/style-rtl.css 448 B
build/styles/block-library/embed/style.css 448 B
build/styles/block-library/embed/theme-rtl.css 133 B
build/styles/block-library/embed/theme.css 133 B
build/styles/block-library/file/editor-rtl.css 324 B
build/styles/block-library/file/editor.css 324 B
build/styles/block-library/file/style-rtl.css 278 B
build/styles/block-library/file/style.css 278 B
build/styles/block-library/footnotes/style-rtl.css 198 B
build/styles/block-library/footnotes/style.css 197 B
build/styles/block-library/form-input/editor-rtl.css 229 B
build/styles/block-library/form-input/editor.css 229 B
build/styles/block-library/form-input/style-rtl.css 366 B
build/styles/block-library/form-input/style.css 366 B
build/styles/block-library/form-submission-notification/editor-rtl.css 344 B
build/styles/block-library/form-submission-notification/editor.css 341 B
build/styles/block-library/form-submit-button/style-rtl.css 69 B
build/styles/block-library/form-submit-button/style.css 69 B
build/styles/block-library/freeform/editor-rtl.css 2.59 kB
build/styles/block-library/freeform/editor.css 2.59 kB
build/styles/block-library/gallery/editor-rtl.css 615 B
build/styles/block-library/gallery/editor.css 616 B
build/styles/block-library/gallery/style-rtl.css 1.84 kB
build/styles/block-library/gallery/style.css 1.84 kB
build/styles/block-library/gallery/theme-rtl.css 108 B
build/styles/block-library/gallery/theme.css 108 B
build/styles/block-library/group/editor-rtl.css 335 B
build/styles/block-library/group/editor.css 335 B
build/styles/block-library/group/style-rtl.css 103 B
build/styles/block-library/group/style.css 103 B
build/styles/block-library/group/theme-rtl.css 79 B
build/styles/block-library/group/theme.css 79 B
build/styles/block-library/heading/style-rtl.css 205 B
build/styles/block-library/heading/style.css 205 B
build/styles/block-library/html/editor-rtl.css 419 B
build/styles/block-library/html/editor.css 419 B
build/styles/block-library/image/editor-rtl.css 763 B
build/styles/block-library/image/editor.css 763 B
build/styles/block-library/image/style-rtl.css 1.6 kB
build/styles/block-library/image/style.css 1.59 kB
build/styles/block-library/image/theme-rtl.css 137 B
build/styles/block-library/image/theme.css 137 B
build/styles/block-library/latest-comments/style-rtl.css 355 B
build/styles/block-library/latest-comments/style.css 354 B
build/styles/block-library/latest-posts/editor-rtl.css 139 B
build/styles/block-library/latest-posts/editor.css 138 B
build/styles/block-library/latest-posts/style-rtl.css 520 B
build/styles/block-library/latest-posts/style.css 520 B
build/styles/block-library/list/style-rtl.css 107 B
build/styles/block-library/list/style.css 107 B
build/styles/block-library/loginout/style-rtl.css 61 B
build/styles/block-library/loginout/style.css 61 B
build/styles/block-library/math/editor-rtl.css 105 B
build/styles/block-library/math/editor.css 105 B
build/styles/block-library/math/style-rtl.css 61 B
build/styles/block-library/math/style.css 61 B
build/styles/block-library/media-text/editor-rtl.css 321 B
build/styles/block-library/media-text/editor.css 320 B
build/styles/block-library/media-text/style-rtl.css 543 B
build/styles/block-library/media-text/style.css 542 B
build/styles/block-library/more/editor-rtl.css 393 B
build/styles/block-library/more/editor.css 393 B
build/styles/block-library/navigation-link/editor-rtl.css 645 B
build/styles/block-library/navigation-link/editor.css 647 B
build/styles/block-library/navigation-link/style-rtl.css 190 B
build/styles/block-library/navigation-link/style.css 188 B
build/styles/block-library/navigation-submenu/editor-rtl.css 295 B
build/styles/block-library/navigation-submenu/editor.css 294 B
build/styles/block-library/navigation/editor-rtl.css 2.25 kB
build/styles/block-library/navigation/editor.css 2.26 kB
build/styles/block-library/navigation/style-rtl.css 2.27 kB
build/styles/block-library/navigation/style.css 2.25 kB
build/styles/block-library/nextpage/editor-rtl.css 392 B
build/styles/block-library/nextpage/editor.css 392 B
build/styles/block-library/page-list/editor-rtl.css 356 B
build/styles/block-library/page-list/editor.css 356 B
build/styles/block-library/page-list/style-rtl.css 192 B
build/styles/block-library/page-list/style.css 192 B
build/styles/block-library/paragraph/editor-rtl.css 251 B
build/styles/block-library/paragraph/editor.css 251 B
build/styles/block-library/paragraph/style-rtl.css 341 B
build/styles/block-library/paragraph/style.css 340 B
build/styles/block-library/post-author-biography/style-rtl.css 74 B
build/styles/block-library/post-author-biography/style.css 74 B
build/styles/block-library/post-author-name/style-rtl.css 69 B
build/styles/block-library/post-author-name/style.css 69 B
build/styles/block-library/post-author/style-rtl.css 188 B
build/styles/block-library/post-author/style.css 189 B
build/styles/block-library/post-comments-count/style-rtl.css 72 B
build/styles/block-library/post-comments-count/style.css 72 B
build/styles/block-library/post-comments-form/editor-rtl.css 96 B
build/styles/block-library/post-comments-form/editor.css 96 B
build/styles/block-library/post-comments-form/style-rtl.css 525 B
build/styles/block-library/post-comments-form/style.css 525 B
build/styles/block-library/post-comments-link/style-rtl.css 71 B
build/styles/block-library/post-comments-link/style.css 71 B
build/styles/block-library/post-content/style-rtl.css 61 B
build/styles/block-library/post-content/style.css 61 B
build/styles/block-library/post-date/style-rtl.css 62 B
build/styles/block-library/post-date/style.css 62 B
build/styles/block-library/post-excerpt/editor-rtl.css 71 B
build/styles/block-library/post-excerpt/editor.css 71 B
build/styles/block-library/post-excerpt/style-rtl.css 155 B
build/styles/block-library/post-excerpt/style.css 155 B
build/styles/block-library/post-featured-image/editor-rtl.css 719 B
build/styles/block-library/post-featured-image/editor.css 717 B
build/styles/block-library/post-featured-image/style-rtl.css 347 B
build/styles/block-library/post-featured-image/style.css 347 B
build/styles/block-library/post-navigation-link/style-rtl.css 215 B
build/styles/block-library/post-navigation-link/style.css 214 B
build/styles/block-library/post-template/style-rtl.css 414 B
build/styles/block-library/post-template/style.css 414 B
build/styles/block-library/post-terms/style-rtl.css 96 B
build/styles/block-library/post-terms/style.css 96 B
build/styles/block-library/post-time-to-read/style-rtl.css 70 B
build/styles/block-library/post-time-to-read/style.css 70 B
build/styles/block-library/post-title/style-rtl.css 162 B
build/styles/block-library/post-title/style.css 162 B
build/styles/block-library/preformatted/style-rtl.css 125 B
build/styles/block-library/preformatted/style.css 125 B
build/styles/block-library/pullquote/editor-rtl.css 133 B
build/styles/block-library/pullquote/editor.css 133 B
build/styles/block-library/pullquote/style-rtl.css 365 B
build/styles/block-library/pullquote/style.css 365 B
build/styles/block-library/pullquote/theme-rtl.css 176 B
build/styles/block-library/pullquote/theme.css 176 B
build/styles/block-library/query-pagination-numbers/editor-rtl.css 121 B
build/styles/block-library/query-pagination-numbers/editor.css 118 B
build/styles/block-library/query-pagination/editor-rtl.css 154 B
build/styles/block-library/query-pagination/editor.css 154 B
build/styles/block-library/query-pagination/style-rtl.css 237 B
build/styles/block-library/query-pagination/style.css 237 B
build/styles/block-library/query-title/style-rtl.css 64 B
build/styles/block-library/query-title/style.css 64 B
build/styles/block-library/query-total/style-rtl.css 64 B
build/styles/block-library/query-total/style.css 64 B
build/styles/block-library/query/editor-rtl.css 438 B
build/styles/block-library/query/editor.css 438 B
build/styles/block-library/quote/style-rtl.css 238 B
build/styles/block-library/quote/style.css 238 B
build/styles/block-library/quote/theme-rtl.css 233 B
build/styles/block-library/quote/theme.css 236 B
build/styles/block-library/read-more/style-rtl.css 131 B
build/styles/block-library/read-more/style.css 131 B
build/styles/block-library/reset-rtl.css 472 B
build/styles/block-library/reset.css 472 B
build/styles/block-library/rss/editor-rtl.css 126 B
build/styles/block-library/rss/editor.css 126 B
build/styles/block-library/rss/style-rtl.css 284 B
build/styles/block-library/rss/style.css 283 B
build/styles/block-library/search/editor-rtl.css 199 B
build/styles/block-library/search/editor.css 199 B
build/styles/block-library/search/style-rtl.css 665 B
build/styles/block-library/search/style.css 666 B
build/styles/block-library/search/theme-rtl.css 113 B
build/styles/block-library/search/theme.css 113 B
build/styles/block-library/separator/editor-rtl.css 100 B
build/styles/block-library/separator/editor.css 100 B
build/styles/block-library/separator/style-rtl.css 248 B
build/styles/block-library/separator/style.css 248 B
build/styles/block-library/separator/theme-rtl.css 195 B
build/styles/block-library/separator/theme.css 195 B
build/styles/block-library/shortcode/editor-rtl.css 286 B
build/styles/block-library/shortcode/editor.css 286 B
build/styles/block-library/site-logo/editor-rtl.css 773 B
build/styles/block-library/site-logo/editor.css 770 B
build/styles/block-library/site-logo/style-rtl.css 218 B
build/styles/block-library/site-logo/style.css 218 B
build/styles/block-library/site-tagline/editor-rtl.css 87 B
build/styles/block-library/site-tagline/editor.css 87 B
build/styles/block-library/site-tagline/style-rtl.css 65 B
build/styles/block-library/site-tagline/style.css 65 B
build/styles/block-library/site-title/editor-rtl.css 85 B
build/styles/block-library/site-title/editor.css 85 B
build/styles/block-library/site-title/style-rtl.css 143 B
build/styles/block-library/site-title/style.css 143 B
build/styles/block-library/social-link/editor-rtl.css 314 B
build/styles/block-library/social-link/editor.css 314 B
build/styles/block-library/social-links/editor-rtl.css 339 B
build/styles/block-library/social-links/editor.css 338 B
build/styles/block-library/social-links/style-rtl.css 1.51 kB
build/styles/block-library/social-links/style.css 1.51 kB
build/styles/block-library/spacer/editor-rtl.css 346 B
build/styles/block-library/spacer/editor.css 346 B
build/styles/block-library/spacer/style-rtl.css 48 B
build/styles/block-library/spacer/style.css 48 B
build/styles/block-library/style-rtl.css 16.5 kB
build/styles/block-library/style.css 16.5 kB
build/styles/block-library/tab/style-rtl.css 202 B
build/styles/block-library/tab/style.css 202 B
build/styles/block-library/table-of-contents/style-rtl.css 83 B
build/styles/block-library/table-of-contents/style.css 83 B
build/styles/block-library/table/editor-rtl.css 394 B
build/styles/block-library/table/editor.css 394 B
build/styles/block-library/table/style-rtl.css 641 B
build/styles/block-library/table/style.css 640 B
build/styles/block-library/table/theme-rtl.css 152 B
build/styles/block-library/table/theme.css 152 B
build/styles/block-library/tabs/editor-rtl.css 236 B
build/styles/block-library/tabs/editor.css 236 B
build/styles/block-library/tabs/style-rtl.css 983 B
build/styles/block-library/tabs/style.css 983 B
build/styles/block-library/tag-cloud/editor-rtl.css 92 B
build/styles/block-library/tag-cloud/editor.css 92 B
build/styles/block-library/tag-cloud/style-rtl.css 248 B
build/styles/block-library/tag-cloud/style.css 248 B
build/styles/block-library/template-part/editor-rtl.css 368 B
build/styles/block-library/template-part/editor.css 368 B
build/styles/block-library/template-part/theme-rtl.css 113 B
build/styles/block-library/template-part/theme.css 113 B
build/styles/block-library/term-count/style-rtl.css 63 B
build/styles/block-library/term-count/style.css 63 B
build/styles/block-library/term-description/style-rtl.css 126 B
build/styles/block-library/term-description/style.css 126 B
build/styles/block-library/term-name/style-rtl.css 62 B
build/styles/block-library/term-name/style.css 62 B
build/styles/block-library/term-template/editor-rtl.css 225 B
build/styles/block-library/term-template/editor.css 225 B
build/styles/block-library/term-template/style-rtl.css 114 B
build/styles/block-library/term-template/style.css 114 B
build/styles/block-library/text-columns/editor-rtl.css 95 B
build/styles/block-library/text-columns/editor.css 95 B
build/styles/block-library/text-columns/style-rtl.css 165 B
build/styles/block-library/text-columns/style.css 165 B
build/styles/block-library/theme-rtl.css 715 B
build/styles/block-library/theme.css 719 B
build/styles/block-library/verse/style-rtl.css 123 B
build/styles/block-library/verse/style.css 123 B
build/styles/block-library/video/editor-rtl.css 415 B
build/styles/block-library/video/editor.css 416 B
build/styles/block-library/video/style-rtl.css 202 B
build/styles/block-library/video/style.css 202 B
build/styles/block-library/video/theme-rtl.css 134 B
build/styles/block-library/video/theme.css 134 B
build/styles/commands/style-rtl.css 1.72 kB
build/styles/commands/style.css 1.72 kB
build/styles/components/style-rtl.css 14 kB
build/styles/components/style.css 14 kB
build/styles/customize-widgets/style-rtl.css 1.44 kB
build/styles/customize-widgets/style.css 1.44 kB
build/styles/edit-post/classic-rtl.css 426 B
build/styles/edit-post/classic.css 427 B
build/styles/edit-post/style-rtl.css 3.38 kB
build/styles/edit-post/style.css 3.38 kB
build/styles/edit-site/style-rtl.css 15.9 kB
build/styles/edit-site/style.css 15.9 kB
build/styles/edit-widgets/style-rtl.css 4.62 kB
build/styles/edit-widgets/style.css 4.62 kB
build/styles/editor/style-rtl.css 18.6 kB
build/styles/editor/style.css 18.6 kB
build/styles/format-library/style-rtl.css 326 B
build/styles/format-library/style.css 326 B
build/styles/list-reusable-blocks/style-rtl.css 1.02 kB
build/styles/list-reusable-blocks/style.css 1.02 kB
build/styles/media-utils/style-rtl.css 400 B
build/styles/media-utils/style.css 400 B
build/styles/nux/style-rtl.css 622 B
build/styles/nux/style.css 618 B
build/styles/patterns/style-rtl.css 611 B
build/styles/patterns/style.css 611 B
build/styles/preferences/style-rtl.css 415 B
build/styles/preferences/style.css 415 B
build/styles/reusable-blocks/style-rtl.css 275 B
build/styles/reusable-blocks/style.css 275 B
build/styles/widgets/style-rtl.css 1.17 kB
build/styles/widgets/style.css 1.18 kB

compressed-size-action

@gziolo
Copy link
Member

gziolo commented Oct 27, 2025

I see you found the reference docs for REST API schema. format is part of JSON schema spec, so there is no risk adopting the list that comes from v4 and WP REST API supports.

It’s exactly what I had envisioned and also aligns with what @chriszarate shared in his feedback.

I would love to see this exact bug fix included in WordPress 6.9 as it’s the most elegant fix possible and at the same time perfectly scalable solution for the future. Newer versions of JSON schema spec added more possible options, but even what we have in place covers the most important string values that have expected structure: date, email, url, color.

If necessary, in the future we could mix it with other concepts from the schema like patterns, and build validation in UI on top of it.

@ockham ockham marked this pull request as ready for review October 27, 2025 15:58
@github-actions
Copy link

github-actions bot commented Oct 27, 2025

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

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

Co-authored-by: ockham <[email protected]>
Co-authored-by: gziolo <[email protected]>
Co-authored-by: youknowriad <[email protected]>
Co-authored-by: oandregal <[email protected]>
Co-authored-by: cbravobernal <[email protected]>
Co-authored-by: fabiankaegy <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: hanneslsm <[email protected]>

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

@ockham
Copy link
Contributor Author

ockham commented Oct 27, 2025

Thanks a lot @gziolo! Really appreciate your feedback ❤️

I'll open this PR for wider review, including by Editor Tech Leads for 6.9 and other interested parties.

Y'all -- would you be okay with getting this into 6.9? I realize it's late in the cycle, but see @gziolo's points:

format is part of JSON schema spec, so there is no risk adopting the list that comes from v4 and WP REST API supports.

It’s exactly what I had envisioned and also aligns with what @chriszarate shared in his feedback.

I would love to see this exact bug fix included in WordPress 6.9 as it’s the most elegant fix possible and at the same time perfectly scalable solution for the future. Newer versions of JSON schema spec added more possible options, but even what we have in place covers the most important string values that have expected structure: date, email, url, color.

@ockham ockham added the Backport to WP 6.9 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Oct 27, 2025
@ockham ockham requested a review from youknowriad October 27, 2025 16:04
@github-actions
Copy link

github-actions bot commented Oct 27, 2025

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

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

@cbravobernal
Copy link
Contributor

cbravobernal commented Oct 27, 2025

It's by far the cleanest way to solve incompatibilities when your attribute type is a string, but stills requires a format.
This way you can prevent to bind urls on datetimes, for example, same for email, phone number, and several other cases.

It's somewhat risky to edit block schema in a Beta, but is not the first time it happens, for the Interactivity API we did the same for block supports.

@fabiankaegy
Copy link
Member

I like this a lot! Solves several similar headaches I've had before trying to infer the format of a string in block extensions.

@youknowriad
Copy link
Contributor

The attributes are (or should be) the exact same things as the "fields" API in dataviews. I know we're also looking at introducing "format" for dataviews. So let's make sure this is the exact same API in both before moving forward. cc @oandregal

@ockham ockham moved this from 🔎 Needs Review to 🦵 Punted to 7.0 in WordPress 6.9 Editor Tasks Nov 10, 2025
@ockham
Copy link
Contributor Author

ockham commented Nov 10, 2025

  • The REST API and the Ability API use it to declare the shape of the data they work with.
    • Both use the JSON Schema Draft 04 (published in 2013). This schema has several limitations, including not being able to declare date vs datetime.

The 2019-09 version seems to support those, though: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-validation-02#rfc.section.7.3.1

@ockham
Copy link
Contributor Author

ockham commented Nov 10, 2025

  • The REST API and the Ability API use it to declare the shape of the data they work with.

    • Both use the JSON Schema Draft 04 (published in 2013). This schema has several limitations, including not being able to declare date vs datetime.

The 2019-09 version seems to support those, though: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-validation-02#rfc.section.7.3.1

Ah, I only just realized that there are two parts of the JSON Schema spec: Core and Validation. So the date and date-time formats are apparently defined in the Validation part of the 2019-09 version.

  • I haven't done a full compliant analysis, but in a quick look I've detected core has gaps with respect to the schema (lacking not, allOf validation keywords)

2019-09 Core has those keywords: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-02#logic

@ockham
Copy link
Contributor Author

ockham commented Nov 10, 2025

  • It seems difficult to change the schema for backward-compatible reasons (see), though I understand this is nuanced.

Reading that comment, it seems to me that the suggested change was rejected to avoid a collision with a future migration to a newer JSON Schema version, no?

@oandregal
Copy link
Member

oandregal commented Nov 10, 2025

(@ockham sorry I'm "hijacking" this PR to share my ongoing research — happy to post elsewhere).

Investigated this a bit more by comparing JSON Schema (the version in use in REST API and the latest), the current status of the Field API & Block Attributes, and the HTML standard.

The Field API needs to declare both data and UI. It sits in between a standard for data (JSON Schema) and a standard for UI (HTML). This explains why JSON Schema doesn't address rendering issues (format for date, locale for number, etc.), that the Field API and HTML need to handle.

JSON Schema Draft 04 JSON Schema 2020-12 (type > format) Block attributes (type) Field API (type) HTML (input type) Notes
array array array array   Field API: string arrays for now, may want to support better types (PR).
object object object     Field API: may want to support this (PR).
null null null      
integer integer integer integer number + step Field API: need "formats" to render values (PR).
number number number number number Field API: need "formats" to render values (PR).
boolean boolean boolean boolean checkbox  
string string string text text  
string > date-time string > date-time   datetime datetime-local Field API: need "formats" to render values (PR).
string > email string > email   email email  
string > uri string > uri   url url  
string > ipv6 string > ipv6        
string > ipv4 string > ipv4        
string > hostname string > hostname        
  string > tel   telephone tel Field API: need "formats" to render values (PR).
  string > date   date date Field API: need "formats" to render values (PR).
  string > time     time  
  string > duration        
  string > uuid        
  string > uri-template        
  string > uri-reference        
  string > relative-json-pointer        
  string > regex        
  string > json-pointer        
  string > iri-reference        
  string > iri        
  string > idn-hostname        
  string > idn-email        
    richtext      
      password password  
      color color  
      media    
        file  
        image  
        month  
        week  
        range  
        radio   Field API: support via Edit: 'radio'.
        search  
        hidden  
        submit  
        reset  
        button  

@youknowriad
Copy link
Contributor

@oandregal There's a lot of JSON Schema rendered tools which are the exact same level of abstraction as our Field API / DataViews, it might be good to check these for reference.

@oandregal
Copy link
Member

Comparison of JSON Schema properties and Field API ones. I'll look at validation separately.

JSON Schema Field API Mapping
$id While similar to id, the purpose is different: $id points to a schema.
id
type + format type ⚠️ {type:"string", format:"date-time"} => {type:"datetime"}.
title label
header React component.
description description
examples placeholder ⚠️ Array → single string.
enum elements Enum is mostly used as a list of strings ["a","b"], but it could also be objects, like elements is now: [{value:"a",label:"A"}, {value:"b",label:"B"}].
const An enum with a single item.
getElements
default Default value. Handled by getValue in Field API.
getValue
setValue
render
Edit
sort
filterBy
isVisible
enableSorting
enableGlobalSearch
enableHiding
readOnly readOnly
writeOnly
deprecated

@oandregal
Copy link
Member

Here's validation:

  • Consumers of the Field API can actually implement any kind of validation via the isValid.custom (sync or async). We'd still want to expand the existing rules, so consumers don't have to write functions and the field is serializable. See some rules we've identified at Field API: Validation #71500 (but many of the ones in the table below are good candidates as well).
  • JSON Schema only supports required for object types. This is because it's tailored to declare the whole data structure, not a single field.
Applies to JSON Schema Field API HTML Attribute Notes
Null type: null      
Boolean type: boolean type: boolean <input type="checkbox">  
Object type: object      
Array type: array type: array    
Number type: number type: number <input type="number">  
Integer type type: integer type: integer <input type="number" step="1">  
String type: string type: string    
Email type: string, format: email type: email <input type="email">  
URL type: string, format: uri type: url <input type="url">  
Date type: string, format: date type: date <input type="date">  
Datetime type: string, format: date-time type: datetime <input type="datetime-local">  
Time type: string, format: time   <input type="time">  
Telephone type: string, format: tel type: 'telephone' <input type="tel">  
Color ⚠️ type: 'color' <input type="color">  
Password ⚠️ type: 'password' <input type="password">  
All enum: ["draft", "published"] elements: [{value: "draft", label: "Draft"}, ...] + isValid.elements: true   isValid.elements is only relevant for the array control (ValidatedFormTokenField)
All const: "draft"      
All ⚠️ isValid.required <input required> ⚠️ JSON Schema only supports it for object (see below). HTML does not support required for color. Field API for any field.
Number/Integer minimum: 0   <input type="number" min="0">  
Number/Integer maximum: 100   <input type="number" max="100">  
Number/Integer exclusiveMinimum: 0      
Number/Integer exclusiveMaximum: 100      
Number/Integer multipleOf: 0.01   <input type="number" step="0.01">  
String minLength: 5   <input minlength="5">  
String maxLength: 100   <input maxlength="100">  
String pattern: "^[a-z]+$"   <input pattern="^[a-z]+$">  
Array minItems: 1      
Array maxItems: 10      
Array minContains: 1      
Array maxContains: 10      
Array uniqueItems: true      
Object required isValid.required: true <input required> ⚠️ JSON Schema only supports it for object-level. Field API and HTML for any field.
Object maxProperties      
Object minProperties      
Object dependentRequired      
Custom   isValid.custom   Sync/Async. Free-form validation.
Date/Time     <input type="date" min="2020-01-01">  
Date/Time     <input type="date" max="2030-12-31">  

@oandregal
Copy link
Member

This is what I've taken a look at and reported here:

After this research, here's what I think:

  • We still need something separate for display formats, the JSON Schema doesn't provide anything I could find. I've prepared a PR for the Field API at Field API: add format to date field type #72999, and I'll get it ready for landing soon. We could name the property displayFormat, to leave formats open. @ockham I wonder if display formats is also something that block bindings/block types would benefit from.
  • It's doable to make the Field API look like the JSON Schema:
    • If we want to do it with the existing REST API's version (Draft 04) it takes a lot of basic custom stuff.
    • If we align with the last one (2020-12), we need to:
      • rename label to title
      • rename elements to enum (and getElements to getEnum)
      • examples is an array, but our placeholder is a string. I'd consider this separate things and would keep placeholder.
      • move all inValid.* rules to top-level
      • we need to support required for every field type
      • type becomes split between type and format: it is less ergonomic, and we'll need to support our own format keys for things the schema does not support (e.g., color or password).
  • Whether or not the Field API is aligned to look more like JSON Schema, we may want to add schemas for it, ala theme.json or block.json so field authors can benefit from editor validation, etc..

The only advantage of migration is that things look the same. But

  • Tooling: we cannot reuse the existing custom tooling from core. And for validation we also want to support a free-form custom sync/async validation function, so I'm not sure if switching to use external libraries for this would be worth the effort.
  • Humans and LLMs. The Field API has extensive types, and it's well documented, so I don't think renaming/moving properties would bring much value.

There are other aspects to look at: block bindings / block types cc @ockham, the media roles experiment by @ntsekouras, etc. so I'll let other folks share their thoughts.

@oandregal oandregal mentioned this pull request Nov 11, 2025
4 tasks
@ntsekouras
Copy link
Contributor

ntsekouras commented Nov 12, 2025

That's very helpful research @oandregal! 💯

After reading all these, I'm not sure we can end up eventually using format like core does in fields API, because it would mean tons of extra code to support the things we want for that API, by also having the limitations of an old JSON Schema for back compat. Unless I've misunderstood that we cannot upgrade the JSON Schema version and that might change plans.

Maybe the format for block attributes in this PR is fine and could be helpful for some cases, but of course not all. What would be our plan for format in block attributes, if we add it in this PR for date-time?

Regarding my media roles experiment, it seems it's also a different thing from JSON format and types. In general it tries to add semantic info in some attributes, which I cannot see how they fit in these format+type approaches. Sure, we could have some kind of convention that for example a mediaAlt prop should always be type:string and use that info for whatever we'd need.

@gziolo
Copy link
Member

gziolo commented Nov 12, 2025

Unless I've misunderstood that we cannot upgrade the JSON Schema version and that might change plans.

JSON Schema is versioned by design. You do it by providing:

"$schema": "http://json-schema.org/draft-04/schema#",

That's the version that WordPress supports on the server at the moment. Using a different, more up-to-date version can be (and probably should be) supported. The detection mechanism is based on $schema value provided. It only requires additional handling added in PHP to enable whatever JSON schema version is needed. That would benefit REST API and Abilities API, too.

}
]
},
"format": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the path we went with in dataviews @oandregal

It seems like this PR might be diverging, and I'd prefer if we converge as discussed before.

Copy link
Member

Choose a reason for hiding this comment

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

This change uses format as described in the JSON Schema — a way to provide more types instead of actually provide the display format of the value. The Field API provides more types for type and uses format for display format, which is what we've started doing for content-only controls at #73374

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 see these comments, so I posted my comment outside of this thread.)

The Field API provides more types for type

Yes, this is a crucial difference to block attributes, where type is currently limited:

"enum": [
"null",
"boolean",
"object",
"array",
"string",
"rich-text",
"integer",
"number"
]

@youknowriad When you're saying you'd like things to converge, would you prefer if we extend the list of allowed block attribute types (to match the Fields API) and change existing block type definitions accordingly? E.g. "type":"uri" for url attributes in Button/Image/Navigation Link?

Copy link
Contributor

Choose a reason for hiding this comment

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

would you prefer if we extend the list of allowed block attribute types (to match the Fields API) and change existing block type definitions accordingly?

That would be my preference yes. That said, this also means making the "Field API" stable which is not the case yet. So this is a decision that need to be intentional.

Basically, when we do this, breaking changes in terms of types in the dataviews package won't be possible anymore. cc @oandregal

Copy link
Member

Choose a reason for hiding this comment

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

So the constraint would be freezing the types (e.g., date, datetime, integer, etc.), but we'd still be able to iterate on the rest of the Field API.

By looking at the type comparison across the standards (JSON Schema, Field API, HTML), I'm confident most of them will stay with us. For example, date, datetime, etc. exists across all systems — I don't expect those to go away. Then, there are some others (e.g., media, password, or color) that would benefit from more experimentation.

What if we started small, with a subset of them (e.g., date & datetime) and grow as required? What would be the types you'd anticipate needing for block bindings @ockham

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@oandregal Gotcha, thank you for elaborating!

I’ve thought about this some more. To continue the train of thought about display formats (“YY-MM-DD” etc), I’m more and more convinced that for block attributes, display formats are very unlikely to ever be part of the type. Instead, they’re most likely to be kept separately. E.g. the Date block already has a format attribute that’s exactly for that. I think that this separation could be typical for how display formats would be handled by blocks: The actual data is stored in one attribute (datetime) that is display format agnostic; the display format can be set individually for each block instance via a UI control, and the setting is stored in a separate display format attribute:

<!-- wp:post-date {"datetime":"2025-12-03T17:48:48.089Z","format":"M j, Y"} /-->

renders

Dec 3, 2025

In terms of convergence, the best we can do is probably align the non-display-format parts of type/format definitions for the Fields API and block attributes.

My concern with extending type to allow more granular types such as datetime or url (as demonstrated in #73624) is that it might have some side effects, especially when changing existing block attribute types. (There’s already some unit test errors as we seem to check against an allowlist of types for some block definitions related REST API endpoint.) I can continue that experiment to see if there are any showstoppers in Core. I can’t currently say if there might be 3rd-party code that relies, say, on an Image block’s href attribute to be a string rather than a url. What I don’t like about this strategy is that I don’t see a fallback plan if this turns out to be a no-go. Would we then simply never be able to add more granular type information to block attributes? (This is more a question for @youknowriad.) OTOH, using format in block attribute definitions for those formats/granular types would allow us to eschew those backwards-compatibility problems.

Copy link
Contributor Author

@ockham ockham Dec 3, 2025

Choose a reason for hiding this comment

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

I'd like to dig deeper into this idea. Have you seen the experiment to use DataForm in content-only blocks? There's a lot of stuff there that's related to displaying the data and the UI for editing it. Would that not be relevant for block bindings?

Block Bindings are less about manual editing in the editor (block inspector) and more about connecting a given block attribute to a data source, e.g. connecting a Date block to a post’s publish date, or an Image block's url to a given post meta field. The UI currently looks like this:

image

By its nature, it's a bit more abstract than content-only editing (as editing those values -- which are provided by the aforementioned data sources -- isn't the main concern here).

Data items provided by data sources are typed, however -- filtering them by matching type for a given block attribute is the use case this PR is about. (For example, in the above screenshot, we'd probably only want the url_custom_field to show up for the url attribute.) Maybe DataViews could at some point come in handy for previewing data source items in this menu; currently, we're simply showing strings (e.g. Value of the custom field or #url-custom-field in the above screenshot). (Would it be possible use DataViews to show better previews?)

(Much like with block attributes, I think that the type/format of a data source item won't involve a display format.)

Copy link
Contributor

Choose a reason for hiding this comment

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

The actual data is stored in one attribute (datetime) that is display format agnostic; the display format can be set individually for each block instance via a UI control, and the setting is stored in a separate display format attribute:

This is a good point but for me it doesn't neglect the need for blocks to say, I have a block that has an attribute that is for type "datetime" and I want to render an inspector control automatically in the UI (so DataForm) for that attribute with a given format.

Now, what you say is also a valid use case for both "blocks" and regular forms. Maybe you have a form where you want to first pick a "format" and then pick the "date" or something.

So basically we need to evolve the Fields API to support it but it doesn't neflect that we need to merge block attributes with Field API.

@oandregal I'm curious how you think we can evolve the fields API to support this. For me it does mean that "date" and "datetime" are probably the same field type. I'm curious if there's any reason that's forcing us to consider these two things as separate field types. If there is, then the solution is for blocks that need to switch between the two is to have two separate attributes and the one used is defined by a third "format" attribute.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here's an update on the experiment with extending block attribute types: #73624 (comment)

Copy link
Member

@oandregal oandregal Dec 11, 2025

Choose a reason for hiding this comment

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

I'm curious how you think we can evolve the fields API to support this. For me it does mean that "date" and "datetime" are probably the same field type. I'm curious if there's any reason that's forcing us to consider these two things as separate field types. If there is, then the solution is for blocks that need to switch between the two is to have two separate attributes and the one used is defined by a third "format" attribute.

The fact that you can use the display format to convert a datetime to a date is not what defines a type. Fields define a variety of functions (Edit, sort, etc.) and there's enough variety in these two types to support both. All standards that I've checked (JSON Schema + HTML) define them date and datetime as separate types (each with its own mechanism).

@ockham
Copy link
Contributor Author

ockham commented Nov 25, 2025

I’ve rebased this PR and would like to request reviews.

Note that in the meantime, format has been introduced for the Fields API (in #72999). However, conversely to the format concept found in this PR, it is more of a display format that allows specifying how e.g. a given date is formatted when rendered:

{
	id: 'publishDate',
	type: 'date',
	label: 'Publish Date',
	format: {
		date: 'F j, Y',
		weekStartsOn: 'monday',
	},
}

This is a different problem from what this PR is concerned with, where “format” is perhaps best described as a more granular data type. For example, the url attribute that’s found in many blocks (e.g. Button, Image, Navigation Link) currently has ”type”: “string”, as has the Date block’s datetime. We’d like to add a format field to state the the former is a URL, and the latter is a datetime etc.

@ockham ockham force-pushed the add/attribute-format-definition-for-block-bindings branch from ddc3d37 to e600b8e Compare December 10, 2025 15:21
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] Post Date Affects the Post Date Block [Block] Submenu Affects the Submenu Block - for submenus in navigation [Feature] Block bindings [Type] Bug An existing feature does not function as intended

Projects

Status: 🦵 Punted to 7.0

Development

Successfully merging this pull request may close these issues.

Post Date: Bindings UI show non date compatible strings.

9 participants