Skip to content

Admin UI: Improve Page Storybook examples to be realistic and follow patterns - #87369

Merged
aduth merged 5 commits into
trunkfrom
update/page-stories-manifest-examples
Dec 1, 2026
Merged

aduth merged 5 commits into
trunkfrom
update/page-stories-manifest-examples

Conversation

@aduth

@aduth aduth commented Nov 24, 2026

Copy link
Copy Markdown
Member

What?

Makes a handful of improvements to the Page component stories to make them more complete and usable:

  • Following @ciampo's suggestion at Admin UI: Include Page component documentation in MCP component manifest #86615 (comment), adds additional clarification to breadcrumbs prop documentation that it is expected to be used within a @wordpress/route router. This may change later in Admin UI: Update Page breadcrumbs to receive configuration array #86982, though is true today.
  • Following @ciampo's suggestion at Admin UI: Include Page component documentation in MCP component manifest #86615 (comment), adds missing ariaLabel in examples where we'd expect a label to be provided: with breadcrumbs and headerless.
  • Updates examples to be more realistic to how someone would build using these pages, e.g. "Settings > Privacy" instead of "Root breadcrumb > Level 1 breadcrumb", and normalizes examples around generic settings pages (rather than a mix of settings + "store" examples).
  • Updates examples to follow new Settings Page pattern:
    • Replaces multiple action buttons with single action, following guidance "One “Save changes” button per page, in the Page header actions".
    • Adds unique region names for navigable sections, following guidance "The region takes its name from title, so give it an ariaLabel whenever the title doesn't identify the page: on a subpage whose breadcrumbs replace the title, name it after the page, such as “Card payments”."
    • Replace FullHeader example to avoid mixing breadcrumbs and section navigation, following guidance "The subpage drops the section navigation"

Why?

So that package consumers will be more successful in implementing this component successfully following established patterns. The Storybook examples are included in both the live Storybook site and also (as of #86615) the Design System's MCP server.

Testing Instructions

  1. Go to the Storybook preview for the branch, using either the Storybook preview link in the "PR meta" comment below in this pull request, or by running npm run storybook:dev locally
  2. In the Storybook site, go to Design System > Admin UI > Page
  3. Observe the updated examples

Screenshots or screencast

This is just one example, of the many that were updated:

Before After
image image

Use of AI Tools

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

@aduth
aduth requested review from ciampo, jameskoster and simison and a balanced review from Copilot November 24, 2026 20:32

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions github-actions Bot added the [Package] Admin UI /packages/admin-ui label Nov 24, 2026
@github-actions

github-actions Bot commented Nov 24, 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: jameskoster <jameskoster@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.73 MB

8e18754 Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 08383c2 trunk % Change
timeToFirstByte 45.5 ms +5.6% -3.74% 45.75 ms +10.6% -6.34% -0.55%
largestContentfulPaint 72 ms +5.56% -5.56% 74 ms +8.11% -5.41% -2.7%
lcpMinusTtfb 24.25 ms +28.45% -1.24% 26.65 ms +13.88% -17.82% -9.01%
wpBeforeTemplate 23.65 ms +6.72% -2.45% 23.51 ms +19.35% -1.45% 0.6%
wpTemplate 17.87 ms +4.7% -2.24% 18.51 ms +2% -10.21% -3.46%
wpTotal 41.81 ms +6.48% -3.09% 42.11 ms +11.54% -6.22% -0.71%
wpMemoryUsage 7.75 MB +0% -0% 7.72 MB +0% -0% 0.45%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric 08383c2 trunk % Change
timeToFirstByte 37.05 ms +3.91% -3.78% 36.55 ms +7.93% -1.64% 1.37%
largestContentfulPaint 64 ms +6.25% -0% 66 ms +3.03% -3.03% -3.03%
lcpMinusTtfb 28.4 ms +2.46% -3.87% 28.3 ms +6.54% -3% 0.35%
wpBeforeTemplate 20.25 ms +4.54% -1.48% 20.31 ms +5.61% -1.03% -0.3%
wpTemplate 13.32 ms +4.95% -4.2% 13.24 ms +1.89% -2.11% 0.6%
wpTotal 34.11 ms +4.66% -3.49% 33.81 ms +6.45% -2.01% 0.89%
wpMemoryUsage 6.44 MB +0% -0% 6.41 MB +0% -0% 0.56%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric 08383c2 trunk % Change
mediaProcessingJpeg 323.94 ms +1.32% -0.35% 328.85 ms +0.36% -0.96% -1.49%
mediaProcessingAvif 4881.72 ms +1.1% -0.78% 4872.32 ms +0.25% -0.44% 0.19%
mediaProcessingJpegToAvif 3395.17 ms +0.48% -0.3% 3393.87 ms +0.39% -0.41% 0.04%

media-upload

Metric 08383c2 trunk % Change
jpegUploadProcessing 1466.58 ms +1.11% -0.72% 1464.86 ms +0.21% -0.52% 0.12%
pngUploadProcessing 242.85 ms +9.68% -9.2% 254.12 ms +9.34% -3.08% -4.43%
largeJpegUploadProcessing 1449.15 ms +0.08% -0.6% 1448.46 ms +0.39% -0.98% 0.05%
multipleImageUploadProcessing 1519.15 ms +3.27% -0.63% 1507.14 ms +1.31% -0.53% 0.8%

post-editor

Metric 08383c2 trunk % Change
serverResponse 457.38 ms +7.96% -5.15% 487.09 ms +1.85% -2.43% -6.1%
firstPaint 449.7 ms +5.32% -14.1% 386.31 ms +6.8% -1.11% 16.41%
domContentLoaded 815.08 ms +2.09% -1.32% 812.15 ms +3.94% -0.43% 0.36%
loaded 816.16 ms +2.06% -1.3% 813.13 ms +3.97% -0.43% 0.37%
firstContentfulPaint 449.74 ms +5.31% -1.44% 457.4 ms +1.35% -1.02% -1.67%
firstBlock 2218.12 ms +7.63% -0.73% 2210.53 ms +2.48% -0.61% 0.34%
type 18.46 ms +11.76% -17.82% 18.08 ms +8.13% -8.02% 2.1%
typeWithoutInspector 16.99 ms +2.12% -2.35% 18.1 ms +10.88% -11.27% -6.13%
typeWithTopToolbar 22.95 ms +6.32% -4.58% 23.91 ms +7.82% -4.27% -4.02%
typeContainer 8.4 ms +17.02% -13.45% 9.12 ms +17.87% -10.09% -7.89%
focus 110.45 ms +10.32% -5.51% 106.77 ms +3.08% -2.99% 3.45%
firstFocus 288.74 ms +0% -0% 270.89 ms +0% -0% 6.59%
selectAll 424.73 ms +1.94% -4.67% 382.15 ms +2.4% -0.34% 11.14%
undo 29.68 ms +8.15% -5.59% 29.08 ms +8.8% -3.61% 2.06%
listViewOpen 37.37 ms +20.18% -5.46% 40.05 ms +4.82% -11.99% -6.69%
inserterOpen 39.23 ms +11.98% -9.61% 39.89 ms +5.01% -8.12% -1.65%
inserterHover 11.04 ms +6.97% -8.79% 11.05 ms +8.24% -10.95% -0.09%
inserterSearch 8.29 ms +13.87% -10.13% 7.66 ms +15.4% -3.92% 8.22%
loadPatterns 648.26 ms +5.28% -6.94% 653.11 ms +8.57% -3.68% -0.74%
wpTotal 447.77 ms +8.08% -5.23% 477.48 ms +1.85% -2.51% -6.22%
wpMemoryUsage 14.80 MB +0% -0% 14.76 MB +0% -0% 0.25%
wpDbQueries 55 +0% -0% 55 +0% -0% 0%

site-editor

Metric 08383c2 trunk % Change
serverResponse 471.71 ms +0.81% -6.23% 465.56 ms +2.55% -7.79% 1.32%
firstPaint 458.73 ms +2.91% -17.75% 442.04 ms +4.94% -12.22% 3.78%
domContentLoaded 852.62 ms +2.58% -3.68% 834.95 ms +2.34% -1.21% 2.12%
loaded 853.51 ms +2.61% -3.68% 835.94 ms +2.37% -1.2% 2.1%
firstContentfulPaint 470.29 ms +1.29% -3.84% 460.37 ms +2.22% -2.28% 2.15%
firstBlock 2636.47 ms +4.94% -1.22% 2617.02 ms +0.76% -1.12% 0.74%
type 18.83 ms +2.71% -10.57% 18.65 ms +3% -10.99% 0.97%
navigate 120.13 ms +5.62% -3.9% 113.76 ms +5.34% -0.66% 5.6%
loadPatterns 1438.1 ms +15.61% -8.11% 1621.64 ms +3.62% -16.92% -11.32%
loadPages 942.85 ms +4.22% -0.81% 980.22 ms +2.56% -1.41% -3.81%
wpTotal 462.29 ms +0.79% -6.39% 455.87 ms +2.67% -7.87% 1.41%
wpMemoryUsage 12.84 MB +0% -0% 12.80 MB +0% -0% 0.29%
wpDbQueries 45 +0% -0% 45 +0% -0% 0%

8e18754 Run

@aduth aduth added the [Type] Developer Documentation Documentation for developers label Nov 24, 2026
@jameskoster

Copy link
Copy Markdown
Contributor

Seems reasonable to me :)

@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.

LGTM 🚀

The breadcrumb and headerless examples now have named regions in Storybook. Switching settings sections with the keyboard updates the region name too 🎉

Comment thread packages/admin-ui/CHANGELOG.md Resolved
Comment thread packages/admin-ui/src/page/index.tsx Resolved
Comment on lines +271 to +272
* The header of a settings subpage. The breadcrumbs lead back to the parent
* page, the badge shows the status of the page, and "Save changes" saves it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd keep just the first sentence here. Following “Settings” leaves the preview on Privacy, and the save button has no handler.

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.

I'd keep just the first sentence here. Following “Settings” leaves the preview on Privacy, and the save button has no handler.

Simplified in 8e18754.

@aduth
aduth force-pushed the update/page-stories-manifest-examples branch from 317acd0 to 8e18754 Compare December 1, 2026 19:21
@aduth
aduth enabled auto-merge (squash) December 1, 2026 19:22
@aduth
aduth merged commit acd4e9f into trunk Dec 1, 2026
96 checks passed
@aduth
aduth deleted the update/page-stories-manifest-examples branch December 1, 2026 19:41
@github-actions github-actions Bot added this to the Gutenberg 24.6 milestone Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Admin UI /packages/admin-ui [Type] Developer Documentation Documentation for developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants