Skip to content

Admin UI: Include Page component documentation in MCP component manifest - #86615

Merged
aduth merged 4 commits into
trunkfrom
add/page-component-mcp-docs
Nov 13, 2026
Merged

aduth merged 4 commits into
trunkfrom
add/page-component-mcp-docs

Conversation

@aduth

@aduth aduth commented Nov 10, 2026

Copy link
Copy Markdown
Member

What?

Improves documentation for the Page component in @wordpress/admin-ui and makes it available in the component manifest used by the Design System MCP server.

Why?

  • Anecdotal feedback suggests that AI agents are still reaching for the Tabs component when implementing page navigation. This is despite there being guidance against this practice. But because AI agents don't have a clearly documented alternative, this is the best it can work with.
  • New design system patterns like what @jameskoster is proposing in Storybook: Add Settings Page design system patterns #86451 specifically call out the Page component as what should be used to build settings pages, but AI agents currently have no access to documentation about the component using the MCP server.

How?

  • Adds missing documentation for the Page component and its props, describing what it is and how it should be used.
  • Fixes inaccurate MCP server description content claiming that design system components only come from @wordpress/components and @wordpress/ui despite this already being untrue, since the MCP server already documents components from @wordpress/dataviews. New language uses inclusive phrasing "such as".
  • Updates Tabs Best Practices guidance to replace outdated "We may provide a dedicated component for tabs-like links" with the actual current guidance. We may still provide a dedicated component for this purpose in @wordpress/ui, but we should at least be clear that there is an option available today to create navigation through Page.

Testing Instructions

Verify updated content for accuracy.

Using the Storybook Preview link in the PR meta comment of this pull request, you should be able to navigate to the Storybook's /manifests/components.json path and see that it includes documentation for Page and its props now.

Use of AI Tools

Researched and implemented in coordination with Claude Code + Opus 5.5.

@aduth
aduth requested a review from jasmussen November 10, 2026 16:59
@aduth
aduth requested a review from a team as a code owner November 10, 2026 16:59
@aduth aduth added [Type] Developer Documentation Documentation for developers Design System Issues related to the system of combining components according to best practices. [Package] Admin UI /packages/admin-ui labels Nov 10, 2026
@github-actions github-actions Bot added [Package] UI /packages/ui [Package] Design System MCP /packages/design-system-mcp labels Nov 10, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground Preview in Storybook

🎉 Props

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: aduth <aduth@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>

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


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

📦 Bundle size

Size Change: 0 B

Total Size: 8.65 MB

e8639b9 Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 1a6e591 trunk % Change
timeToFirstByte 58.9 ms +4.67% -3.4% 55.7 ms +8.89% -2.6% 5.75%
largestContentfulPaint 92 ms +8.7% -4.35% 92 ms +2.17% -4.35% 0%
lcpMinusTtfb 31.3 ms +24.6% -7.03% 34.4 ms +11.77% -12.79% -9.01%
wpBeforeTemplate 31.09 ms +6.82% -3.47% 29.69 ms +11.62% -2.56% 4.72%
wpTemplate 23.53 ms +3.14% -2.59% 22.26 ms +4.54% -4.58% 5.71%
wpTotal 54.74 ms +3.8% -3.32% 51.83 ms +9.57% -2.72% 5.61%
wpMemoryUsage 7.75 MB +0% -0% 7.71 MB +0% -0% 0.45%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric 1a6e591 trunk % Change
timeToFirstByte 49.15 ms +6.61% -3.05% 49.85 ms +4.81% -4.71% -1.4%
largestContentfulPaint 88 ms +4.55% -2.27% 84 ms +4.76% -0% 4.76%
lcpMinusTtfb 38.35 ms +5.22% -4.69% 35.6 ms +4.21% -3.37% 7.72%
wpBeforeTemplate 27.66 ms +3.51% -1.19% 27.15 ms +12.78% -1.4% 1.88%
wpTemplate 17.85 ms +9.52% -4.2% 17.85 ms +2.91% -4.43% 0%
wpTotal 45.54 ms +7.44% -2.46% 46.26 ms +5.51% -4.78% -1.56%
wpMemoryUsage 6.44 MB +0% -0% 6.40 MB +0% -0% 0.56%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric 1a6e591 trunk % Change
mediaProcessingJpeg 409.56 ms +1.15% -1.55% 406.41 ms +1.09% -0.62% 0.78%
mediaProcessingAvif 6195.37 ms +0.17% -0.17% 6168.14 ms +0.25% -0.22% 0.44%
mediaProcessingJpegToAvif 4268.69 ms +0.29% -0.12% 4240.14 ms +0.37% -0.36% 0.67%

media-upload

Metric 1a6e591 trunk % Change
jpegUploadProcessing 2021.96 ms +1.84% -1.09% 1982.49 ms +1.64% -22.94% 1.99%
pngUploadProcessing 295.31 ms +2.3% -1.78% 276.61 ms +7.07% -2.87% 6.76%
largeJpegUploadProcessing 1964.77 ms +0.99% -22.72% 1986.46 ms +1.2% -21.87% -1.09%
multipleImageUploadProcessing 2103.43 ms +0.92% -1.04% 2091.89 ms +1.18% -1.79% 0.55%

post-editor

Metric 1a6e591 trunk % Change
serverResponse 467.17 ms +3.98% -6.97% 496.56 ms +0.33% -2.04% -5.92%
firstPaint 409.93 ms +8.48% -3.31% 412.26 ms +5.75% -4.72% -0.57%
domContentLoaded 823.77 ms +4.14% -2.04% 830.49 ms +2.46% -0.97% -0.81%
loaded 824.82 ms +4.13% -2.01% 831.64 ms +2.47% -0.99% -0.82%
firstContentfulPaint 475.6 ms +6.38% -5.11% 474.02 ms +1.25% -1.43% 0.33%
firstBlock 2193.61 ms +3.36% -2.86% 2219.8 ms +1.75% -0.68% -1.18%
type 17.28 ms +12.09% -7.29% 17.76 ms +4.62% -4.79% -2.7%
typeWithoutInspector 16.69 ms +4.85% -5.33% 18 ms +3.78% -3.89% -7.28%
typeWithTopToolbar 24.5 ms +4.12% -10.45% 22.39 ms +9.87% -4.96% 9.42%
typeContainer 8.3 ms +10.6% -16.75% 8.55 ms +3.86% -9.36% -2.92%
focus 121.87 ms +4.37% -7.3% 117.34 ms +10.24% -3.59% 3.86%
firstFocus 248.85 ms +0% -0% 272.24 ms +0% -0% -8.59%
selectAll 399 ms +4.08% -1.15% 427.45 ms +6.1% -1.88% -6.66%
undo 28.4 ms +13.35% -6.94% 34.81 ms +5.2% -7.18% -18.41%
listViewOpen 75.26 ms +10.87% -3.95% 74.79 ms +11.26% -3.58% 0.63%
inserterOpen 42.83 ms +13.1% -9.39% 44.47 ms +4.92% -10.01% -3.69%
inserterHover 11.41 ms +11.48% -6.4% 12.04 ms +9.63% -8.22% -5.23%
inserterSearch 8.24 ms +10.19% -10.07% 8.42 ms +7.6% -2.61% -2.14%
loadPatterns 633.32 ms +2.47% -3.56% 691.03 ms +3.73% -2.44% -8.35%
wpTotal 457.53 ms +3.79% -7.11% 486.59 ms +0.37% -2.14% -5.97%
wpMemoryUsage 14.81 MB +0% -0% 14.77 MB +0% -0% 0.25%
wpDbQueries 55 +0% -0% 55 +0% -0% 0%

site-editor

Metric 1a6e591 trunk % Change
serverResponse 240.83 ms +6.3% -6.36% 251.02 ms +0.83% -11.93% -4.06%
firstPaint 299.29 ms +6.2% -5.88% 268.67 ms +18.2% -6.2% 11.4%
domContentLoaded 531.94 ms +2.56% -1.94% 535.02 ms +3.9% -3.42% -0.58%
loaded 532.73 ms +2.53% -1.93% 535.94 ms +3.86% -3.46% -0.6%
firstContentfulPaint 304.7 ms +12.38% -2.97% 314.41 ms +1% -6.08% -3.09%
firstBlock 1604.36 ms +1.01% -0.27% 1625.1 ms +2.5% -2.28% -1.28%
type 13.74 ms +8.95% -2.4% 12.67 ms +4.18% -11.52% 8.45%
navigate 81.54 ms +3.53% -3.5% 81.96 ms +2.61% -3.92% -0.51%
loadPatterns 967.5 ms +3.29% -3.77% 921.77 ms +3.21% -5.57% 4.96%
loadPages 921.72 ms +2.35% -1.27% 904.43 ms +2.66% -0.56% 1.91%
wpTotal 234.6 ms +6.5% -6.48% 244.81 ms +0.78% -12.21% -4.17%
wpMemoryUsage 12.82 MB +0% -0% 12.79 MB +0% -0% 0.25%
wpDbQueries 45 +0% -0% 45 +0% -0% 0%

e8639b9 Run

🏁 Flaky tests

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.

Actions are reachable via RIGHT/LEFT arrow keys (Site Editor v2) in /test/e2e/specs/site-editor/dataviews-list-layout-keyboard.spec.js, passed after 1 failed attempt.
Error: expect(locator).toBeFocused() failed

Locator:  getByRole('row', { name: 'Page One View Actions' }).getByLabel('Actions')
Expected: focused
Received: inactive
Timeout:  5000ms

Call log:
  - Expect "toBeFocused" getByRole('row', { name: 'Page One View Actions' }).getByLabel('Actions') with timeout 5000ms
  - waiting for getByRole('row', { name: 'Page One View Actions' }).getByLabel('Actions')
    14 × locator resolved to <button type="button" tabindex="-1" aria-haspopup="menu" aria-label="Actions" aria-expanded="false" id="view-list-0-12-dropdown" class="components-button is-small has-icon">…</button>
       - unexpected value "inactive"

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/dataviews-list-layout-keyboard.spec.js:181:5
does not select blocks in the canvas preview when editing from the sidebar (Site Editor v2) in /test/e2e/specs/site-editor/navigation-sidebar-list-view.spec.js, passed after 1 failed attempt.
Error: expect(locator).toBeFocused() failed

Locator: getByRole('combobox', { name: 'Search or type URL' })
Expected: focused
Timeout: 5000ms
Error: element(s) not found

Call log:
  - Expect "toBeFocused" getByRole('combobox', { name: 'Search or type URL' }) with timeout 5000ms
  - waiting for getByRole('combobox', { name: 'Search or type URL' })

    at LinkControl.useLinkControlSearch (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/navigation-sidebar-list-view.spec.js:416:47)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/navigation-sidebar-list-view.spec.js:179:21
keeps the default tab when a tab is added before it in /test/e2e/specs/editor/blocks/tabs.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

Expected: 2
Received: 0

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/tabs.spec.js:319:60
should apply a named font size using the font size buttons in /test/e2e/specs/editor/various/font-size-picker.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 2
+ Received  + 2

- <!-- wp:paragraph {"fontSize":"large"} -->
+ <!-- wp:paragraph {"fontSize":"medium"} -->
- <p class="has-large-font-size">Paragraph to be made "large"</p>
+ <p class="has-medium-font-size">Paragraph to be made "large"</p>
  <!-- /wp:paragraph -->

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/font-size-picker.spec.js:153:6
should reset a named font size using input field in /test/e2e/specs/editor/various/font-size-picker.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 2
+ Received  + 2

- <!-- wp:paragraph {"fontSize":"small"} -->
+ <!-- wp:paragraph {"fontSize":"tiny"} -->
- <p class="has-small-font-size">Paragraph with font size reset using input field</p>
+ <p class="has-tiny-font-size">Paragraph with font size reset using input field</p>
  <!-- /wp:paragraph -->

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/font-size-picker.spec.js:216:6
should reset a named font size using the tools panel menu in /test/e2e/specs/editor/various/font-size-picker.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 2
+ Received  + 2

- <!-- wp:paragraph {"fontSize":"medium"} -->
+ <!-- wp:paragraph {"fontSize":"small"} -->
- <p class="has-medium-font-size">Paragraph with font size reset using tools panel menu</p>
+ <p class="has-small-font-size">Paragraph with font size reset using tools panel menu</p>
  <!-- /wp:paragraph -->

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/font-size-picker.spec.js:178:6

e8639b9 Run

For these reasons, even if the `Tabs` component is fully extensible, we don't recommend using `Tabs` with links, and we don't currently provide any related Storybook example.

We may provide a dedicated component for tabs-like links in the future based on the feedback received.
To switch between sections of an admin screen that each have their own URL, use the `navigation` prop of [`Page`](?path=/docs/admin-ui-page--docs) from `@wordpress/admin-ui` instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for this!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks for this!

❤️

For what it's worth, the original comment isn't totally invalid. We may still want a dedicated UI component for this. What was implemented for Page was intentionally limited for Page use-cases until this matured a bit more. But our documentation should be more helpful to point people to the options that exist today.

@jasmussen

Copy link
Copy Markdown
Contributor

I'll defer to Marco on actual approval, but thanks for working on this. The inclusion of the term "tabs" is useful, SEO wise, because while this horizontal row of navigation items isn't tabs in the strict technical sense, it is likely people will still search for that word and need guidance towards the right componentry.

@aduth

aduth commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

The inclusion of the term "tabs" is useful, SEO wise, because while this horizontal row of navigation items isn't tabs in the strict technical sense, it is likely people will still search for that word and need guidance towards the right componentry.

That's a good call-out. The pull request in its current state doesn't actually use the word "tabs" when describing the page navigation. Do you have any suggestions on how to incorporate this into the current proposed text?

A standard layout for admin screens. It includes a header with support for a title or breadcrumbs, badges, actions such as a Save button, and links to the sections of the screen. The page content shows below the header.

Maybe something like "links to the sections of the screen (presented in a tabs-like layout)". It's a fine line between "SEO"-like optimization for how this would be described by people in the real world, vs. it not actually being tabs 😅 .

@ciampo ciampo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"links to the sections of the screen (presented in a tabs-like layout)".

This could work, let's give it a try 🚀

Separately, should I pick up #80446 ? It may inherently help to have the actual Tabs alternative at the @wordpress/ui level?

@jasmussen

Copy link
Copy Markdown
Contributor

Maybe something like "links to the sections of the screen (presented in a tabs-like layout)". It's a fine line between "SEO"-like optimization for how this would be described by people in the real world, vs. it not actually being tabs 😅 .

Yes it's something like this that I was thinking. And there are lots of clever ways you can include the "keyword" without even being shady about it. It could be something like:

Note, navigation although it can look like tab-based navigation, is not tabs. Tabs are used for immediate roving-focus panels, not for page navigation. If you need tabs, there's a separate component for that.

The above is too verbose, quickly put together, and purely an example. But the point is, it includes the keywords while still being useful.

@aduth

aduth commented Nov 12, 2026

Copy link
Copy Markdown
Member Author

Separately, should I pick up #80446 ? It may inherently help to have the actual Tabs alternative at the @wordpress/ui level?

It could be good insofar that people are starting to use these abstractions, and they may be overly limited by what the Page component currently supports. That could be improved through the UI primitive, but could also be improved through Page itself if we want to continue exploring it at the higher-level abstraction.

Were there particular blockers or concerns around the implementation of #80446, or was it more about prioritization?

@aduth

aduth commented Nov 12, 2026

Copy link
Copy Markdown
Member Author

I pushed a few small language refinements in f07b9b7 and cda8fcc, to incorporate this "tab-style" qualifier, and to make the usage guidelines a bit more clear.

Currently, usage guidelines aren't incorporated into what AIs see through the MCP server, but this is something we should plan to incorporate (needs a dedicated issue, but @simison pushed an exploration in #85203).

I waffled whether to include a note that there may be a separate UI primitive component added to support this that we could reference in the Tabs usage guidelines, but opted to omit it. Once we have a component we should plan to mention it there.

@ciampo

ciampo commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Were there particular blockers or concerns around the implementation of #80446, or was it more about prioritization?

Prioritisation - we decided to pause work in order to give Menu and other 7.2 tasks precedence.

The other blocker is a lack of design spec. I'll follow-up in the PR.

@aduth
aduth force-pushed the add/page-component-mcp-docs branch from cda8fcc to e8639b9 Compare November 13, 2026 14:48
@github-actions
github-actions Bot requested a review from ciampo November 13, 2026 14:49
@aduth
aduth enabled auto-merge (squash) November 13, 2026 14:58
@aduth
aduth merged commit 2936317 into trunk Nov 13, 2026
85 checks passed
@aduth
aduth deleted the add/page-component-mcp-docs branch November 13, 2026 15:08
@github-actions github-actions Bot added this to the Gutenberg 24.5 milestone Nov 13, 2026

@ciampo ciampo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two small follow-ups for the published examples.

component: Page,
id: 'admin-ui-page',
title: 'Design System/Admin UI/Page',
tags: [ 'manifest' ],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The breadcrumb snippets omit the router context supplied by withRouter, so they fail when copied into an app without that context. Could we document that prerequisite in their story descriptions, or exclude those stories from the manifest for now?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is indirectly addressed through #86982, which will remove the router dependency from Breadcrumbs altogether. We could choose an interim fix, though I'd like to push #86982 sooner than later.

component: Page,
id: 'admin-ui-page',
title: 'Design System/Admin UI/Page',
tags: [ 'manifest' ],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The breadcrumb and headerless examples have neither title nor ariaLabel, so their page regions have no accessible name. Could we add explicit ariaLabel values to those story args?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The breadcrumb and headerless examples have neither title nor ariaLabel, so their page regions have no accessible name. Could we add explicit ariaLabel values to those story args?

This is also something where I'd like to move away from this being a Page-level concern (see #77628 (comment) and #86701 (comment)), but I think a solution there is still abstract and the stories here are quite contradictory with our documented recommendations. For example, the ariaLabel description already says it should be provided in the case of breadcrumbs (the description was added in this pull request), so we should be at least consistent there.

@aduth

aduth commented Nov 23, 2026

Copy link
Copy Markdown
Member Author

@ciampo Thanks for the feedback and sorry for the delay in addressing them; I'll plan to open some pull requests tomorrow for this.

Vedant-Gandhi pushed a commit to Vedant-Gandhi/gutenberg that referenced this pull request Nov 30, 2026
…est (WordPress#86615)

* Admin UI: Include Page component documentation in MCP component manifest

* Admin UI: Update Page story to use publicly-accessible types

* Add "tab-style" qualifier for describing links in Page header

* Refine language around Tabs best practices

Co-authored-by: aduth <aduth@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Design System Issues related to the system of combining components according to best practices. [Package] Admin UI /packages/admin-ui [Package] Design System MCP /packages/design-system-mcp [Package] UI /packages/ui [Type] Developer Documentation Documentation for developers

Projects

Status: 💫 Done

Development

Successfully merging this pull request may close these issues.

3 participants