View Config: add reference docs - #81149
Conversation
There was a problem hiding this comment.
Pull request overview
Adds centralized reference documentation for the View Configuration API.
Changes:
- Documents configuration properties, filters, and mutation methods.
- Registers the reference in documentation navigation.
- Removes duplicated guidance from the filters guide.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
docs/toc.json |
Adds the reference to the table of contents. |
docs/manifest.json |
Registers the published documentation page. |
docs/reference-guides/view-config-reference.md |
Introduces the API reference and examples. |
docs/how-to-guides/curating-the-editor-experience/filters-and-hooks.md |
Removes duplicated View Configuration documentation. |
Suppressed comments (2)
docs/reference-guides/view-config-reference.md:55
activityis listed as a supported layout immediately above and in the REST schema, but its configuration entry is absent from this table.
| list | View overrides applied when the list layout is selected. | `object` |
docs/reference-guides/view-config-reference.md:129
- This purported list omits the supported
descriptionfield anddetailslayout, both of which are accepted by the REST schema (class-gutenberg-rest-view-config-controller-7-1.php:739-750,768-777).
| label | Label displayed for the field, overriding the field's own. | `string` |
| layout | How the field is rendered: `type` is one of `regular`, `panel`, `card`, or `row`, and `labelPosition` is one of `side`, `top`, or `none`. | `{ type, labelPosition }` |
| children | Fields combined under this entry, following the same shape as `fields`. | `[ string \| object ]` |
| | perPage | Number of records per page. | `integer` | | ||
| | layout | Configuration specific to the selected layout type. See [`default_layouts`](#default_layouts). | `object` | |
There was a problem hiding this comment.
My goal with this PR is to bootstrap a place to document this, it doesn't aim to be comprehensive at this stage. I'll follow up by investigating how this document can be maintained up to date automatically based on the REST endpoint schema (and that point, we do want to be comprehensive).
f5a3559 to
cdde271
Compare
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
@t-hamano I've tagged this to backport based on the latest conversations. I'll backport manually if the process fails. Even though it's new documentation (plus a link in existing docs), I assume it's something we want to have in the 7.1 branch for local documentation purposes (the handbook is built based on |
|
I just cherry-picked this PR to the wp/7.1 branch to get it included in the next release: 69969a0 |
This updates the pinned commit hash of the Gutenberg repository from `fd715a6833679d098d9fee84b642f8f1bc27341b` to `f05e40e91c54f29c449b1f33d0db89f5166812d9`. A full list of changes included in this commit can be found on GitHub: WordPress/gutenberg@fd715a6...f05e40e - Writing flow: forward delete an empty paragraph without breaking apart the next block (WordPress/gutenberg#80813) - Upload Media: Fail the item when the /finalize request fails (WordPress/gutenberg#80725) - Fix template `modified` and `date` return value for file templates (WordPress/gutenberg#80733) - Boot: Adjust specificity of the image reset styles so components can size their own images (WordPress/gutenberg#80845) - Quote: Ensure paragraph placeholder appears after deleting nested blocks (WordPress/gutenberg#77151) - Block editor: make the Group action wrap blocks with a group transform (WordPress/gutenberg#80891) - Copy: preserve the block when its entire text is selected (WordPress/gutenberg#80994) - Add opt-out for block style state controls (WordPress/gutenberg#80956) (WordPress/gutenberg#81004) - Tabs: Support Home and End keys for keyboard navigation (WordPress/gutenberg#80912) - Rename blockStatesEnabled setting to blockStatesEditingEnabled (WordPress/gutenberg#81058) - [WP 7.1] Background: Fix the legacy gradient UI where a gradient cannot be selected (WordPress/gutenberg#81059) - Views: honor developer-defined view config overrides (WordPress/gutenberg#80832) - Playlist: Add track icon (WordPress/gutenberg#81078) - Remove the CODEOWNERS file from wp/7.1. (WordPress/gutenberg#81104) - Notes: Email users mentioned in a note (WordPress/gutenberg#79606) - Backport 81068 80744 80642 (WordPress/gutenberg#81135) - Site Editor: Add E2E coverage for view config extensibility (WordPress/gutenberg#80577) - change from WordPress/gutenberg#81068 (WordPress/gutenberg#81140) - Link Control: Restore the preview title underline (WordPress/gutenberg#81083) - Button: Suppress UA focus ring when focused and pressed (WordPress/gutenberg#81113) - View config: add reference docs (WordPress/gutenberg#81149) - Editor: Fix document tools button focus ring (WordPress/gutenberg#81115) - Interface: Increase footer breadcrumb height to prevent focus ring clipping (WordPress/gutenberg#81156) - Post editor: Add ThemeProvider for admin color schemes (WordPress/gutenberg#81112) - Pass Playlist controls to track blocks (WordPress/gutenberg#81158) - Theme: Omit color properties when neither provided nor inherited (WordPress/gutenberg#80600) (WordPress/gutenberg#81172) - Media: Improve the HEIC upload error and keep any upload errors up until dismissed (WordPress/gutenberg#81130) - Video: Hide settings for the GIF variation (WordPress/gutenberg#81142) - Video: clarify the Video variation description (WordPress/gutenberg#81181) - Button: turn on the width setting by default in theme.json (WordPress/gutenberg#81196) - Edit Widgets: Fix header toolbar button focus ring (WordPress/gutenberg#81176) - Build: Wrap script bundles in an IIFE to contain 'use strict' (WordPress/gutenberg#79792) - Customizer widgets: Add ThemeProvider for admin color schemes (WordPress/gutenberg#81174) - Fix: Tabs block: Start with empty tab labels with placeholders (WordPress/gutenberg#81197) - PanelColorSettings: Restore the missing space below the panel header (WordPress/gutenberg#81155) - Visual revisions: add shareable urls (WordPress/gutenberg#81205) - Notes: fix the mention notification email composition (WordPress/gutenberg#81187) - Fix ESLint warnings for 'navigateRegionsProps' spread (WordPress/gutenberg#81208) - Widgets editor: Add ThemeProvider for admin color schemes (WordPress/gutenberg#81173) - Remove the editableRoot opt-in from the paragraph block (WordPress/gutenberg#81184) - Media Attached to: Fix issue with the popover unexpectedly flipping, tweak wording (WordPress/gutenberg#81206) - Ensure device preview is always accurate when window is zoomed in (WordPress/gutenberg#81215) Props wildworks. See #65529. git-svn-id: https://develop.svn.wordpress.org/trunk@63026 602fd350-edb4-49c9-b593-d223f7449a82
This updates the pinned commit hash of the Gutenberg repository from `fd715a6833679d098d9fee84b642f8f1bc27341b` to `f05e40e91c54f29c449b1f33d0db89f5166812d9`. A full list of changes included in this commit can be found on GitHub: WordPress/gutenberg@fd715a6...f05e40e - Writing flow: forward delete an empty paragraph without breaking apart the next block (WordPress/gutenberg#80813) - Upload Media: Fail the item when the /finalize request fails (WordPress/gutenberg#80725) - Fix template `modified` and `date` return value for file templates (WordPress/gutenberg#80733) - Boot: Adjust specificity of the image reset styles so components can size their own images (WordPress/gutenberg#80845) - Quote: Ensure paragraph placeholder appears after deleting nested blocks (WordPress/gutenberg#77151) - Block editor: make the Group action wrap blocks with a group transform (WordPress/gutenberg#80891) - Copy: preserve the block when its entire text is selected (WordPress/gutenberg#80994) - Add opt-out for block style state controls (WordPress/gutenberg#80956) (WordPress/gutenberg#81004) - Tabs: Support Home and End keys for keyboard navigation (WordPress/gutenberg#80912) - Rename blockStatesEnabled setting to blockStatesEditingEnabled (WordPress/gutenberg#81058) - [WP 7.1] Background: Fix the legacy gradient UI where a gradient cannot be selected (WordPress/gutenberg#81059) - Views: honor developer-defined view config overrides (WordPress/gutenberg#80832) - Playlist: Add track icon (WordPress/gutenberg#81078) - Remove the CODEOWNERS file from wp/7.1. (WordPress/gutenberg#81104) - Notes: Email users mentioned in a note (WordPress/gutenberg#79606) - Backport 81068 80744 80642 (WordPress/gutenberg#81135) - Site Editor: Add E2E coverage for view config extensibility (WordPress/gutenberg#80577) - change from WordPress/gutenberg#81068 (WordPress/gutenberg#81140) - Link Control: Restore the preview title underline (WordPress/gutenberg#81083) - Button: Suppress UA focus ring when focused and pressed (WordPress/gutenberg#81113) - View config: add reference docs (WordPress/gutenberg#81149) - Editor: Fix document tools button focus ring (WordPress/gutenberg#81115) - Interface: Increase footer breadcrumb height to prevent focus ring clipping (WordPress/gutenberg#81156) - Post editor: Add ThemeProvider for admin color schemes (WordPress/gutenberg#81112) - Pass Playlist controls to track blocks (WordPress/gutenberg#81158) - Theme: Omit color properties when neither provided nor inherited (WordPress/gutenberg#80600) (WordPress/gutenberg#81172) - Media: Improve the HEIC upload error and keep any upload errors up until dismissed (WordPress/gutenberg#81130) - Video: Hide settings for the GIF variation (WordPress/gutenberg#81142) - Video: clarify the Video variation description (WordPress/gutenberg#81181) - Button: turn on the width setting by default in theme.json (WordPress/gutenberg#81196) - Edit Widgets: Fix header toolbar button focus ring (WordPress/gutenberg#81176) - Build: Wrap script bundles in an IIFE to contain 'use strict' (WordPress/gutenberg#79792) - Customizer widgets: Add ThemeProvider for admin color schemes (WordPress/gutenberg#81174) - Fix: Tabs block: Start with empty tab labels with placeholders (WordPress/gutenberg#81197) - PanelColorSettings: Restore the missing space below the panel header (WordPress/gutenberg#81155) - Visual revisions: add shareable urls (WordPress/gutenberg#81205) - Notes: fix the mention notification email composition (WordPress/gutenberg#81187) - Fix ESLint warnings for 'navigateRegionsProps' spread (WordPress/gutenberg#81208) - Widgets editor: Add ThemeProvider for admin color schemes (WordPress/gutenberg#81173) - Remove the editableRoot opt-in from the paragraph block (WordPress/gutenberg#81184) - Media Attached to: Fix issue with the popover unexpectedly flipping, tweak wording (WordPress/gutenberg#81206) - Ensure device preview is always accurate when window is zoomed in (WordPress/gutenberg#81215) Props wildworks. See #65529. Built from https://develop.svn.wordpress.org/trunk@63026 git-svn-id: http://core.svn.wordpress.org/trunk@62245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This updates the pinned commit hash of the Gutenberg repository from `fd715a6833679d098d9fee84b642f8f1bc27341b` to `f05e40e91c54f29c449b1f33d0db89f5166812d9`. A full list of changes included in this commit can be found on GitHub: WordPress/gutenberg@fd715a6...f05e40e - Writing flow: forward delete an empty paragraph without breaking apart the next block (WordPress/gutenberg#80813) - Upload Media: Fail the item when the /finalize request fails (WordPress/gutenberg#80725) - Fix template `modified` and `date` return value for file templates (WordPress/gutenberg#80733) - Boot: Adjust specificity of the image reset styles so components can size their own images (WordPress/gutenberg#80845) - Quote: Ensure paragraph placeholder appears after deleting nested blocks (WordPress/gutenberg#77151) - Block editor: make the Group action wrap blocks with a group transform (WordPress/gutenberg#80891) - Copy: preserve the block when its entire text is selected (WordPress/gutenberg#80994) - Add opt-out for block style state controls (WordPress/gutenberg#80956) (WordPress/gutenberg#81004) - Tabs: Support Home and End keys for keyboard navigation (WordPress/gutenberg#80912) - Rename blockStatesEnabled setting to blockStatesEditingEnabled (WordPress/gutenberg#81058) - [WP 7.1] Background: Fix the legacy gradient UI where a gradient cannot be selected (WordPress/gutenberg#81059) - Views: honor developer-defined view config overrides (WordPress/gutenberg#80832) - Playlist: Add track icon (WordPress/gutenberg#81078) - Remove the CODEOWNERS file from wp/7.1. (WordPress/gutenberg#81104) - Notes: Email users mentioned in a note (WordPress/gutenberg#79606) - Backport 81068 80744 80642 (WordPress/gutenberg#81135) - Site Editor: Add E2E coverage for view config extensibility (WordPress/gutenberg#80577) - change from WordPress/gutenberg#81068 (WordPress/gutenberg#81140) - Link Control: Restore the preview title underline (WordPress/gutenberg#81083) - Button: Suppress UA focus ring when focused and pressed (WordPress/gutenberg#81113) - View config: add reference docs (WordPress/gutenberg#81149) - Editor: Fix document tools button focus ring (WordPress/gutenberg#81115) - Interface: Increase footer breadcrumb height to prevent focus ring clipping (WordPress/gutenberg#81156) - Post editor: Add ThemeProvider for admin color schemes (WordPress/gutenberg#81112) - Pass Playlist controls to track blocks (WordPress/gutenberg#81158) - Theme: Omit color properties when neither provided nor inherited (WordPress/gutenberg#80600) (WordPress/gutenberg#81172) - Media: Improve the HEIC upload error and keep any upload errors up until dismissed (WordPress/gutenberg#81130) - Video: Hide settings for the GIF variation (WordPress/gutenberg#81142) - Video: clarify the Video variation description (WordPress/gutenberg#81181) - Button: turn on the width setting by default in theme.json (WordPress/gutenberg#81196) - Edit Widgets: Fix header toolbar button focus ring (WordPress/gutenberg#81176) - Build: Wrap script bundles in an IIFE to contain 'use strict' (WordPress/gutenberg#79792) - Customizer widgets: Add ThemeProvider for admin color schemes (WordPress/gutenberg#81174) - Fix: Tabs block: Start with empty tab labels with placeholders (WordPress/gutenberg#81197) - PanelColorSettings: Restore the missing space below the panel header (WordPress/gutenberg#81155) - Visual revisions: add shareable urls (WordPress/gutenberg#81205) - Notes: fix the mention notification email composition (WordPress/gutenberg#81187) - Fix ESLint warnings for 'navigateRegionsProps' spread (WordPress/gutenberg#81208) - Widgets editor: Add ThemeProvider for admin color schemes (WordPress/gutenberg#81173) - Remove the editableRoot opt-in from the paragraph block (WordPress/gutenberg#81184) - Media Attached to: Fix issue with the popover unexpectedly flipping, tweak wording (WordPress/gutenberg#81206) - Ensure device preview is always accurate when window is zoomed in (WordPress/gutenberg#81215) Props wildworks. See #65529. git-svn-id: https://develop.svn.wordpress.org/trunk@63026 602fd350-edb4-49c9-b593-d223f7449a82
What?
Updates the documentation for the view config API.
Why?
To have a single place of reference.
How?
Creates a reference doc for the view config API, similar to the
theme.jsonone.Testing Instructions