Skip to content

Storybook: Show button text labels in docs - #81702

Open
macayu17 wants to merge 2 commits into
WordPress:trunkfrom
macayu17:feat/storybook-button-text-labels
Open

macayu17 wants to merge 2 commits into
WordPress:trunkfrom
macayu17:feat/storybook-button-text-labels

Conversation

@macayu17

Copy link
Copy Markdown
Contributor

What?

Closes #81660

Render each Storybook Docs story a second time with the “Show button text labels” preference enabled.

Why?

This preference is easy to miss when reviewing components. Showing both states in the docs makes label-related layout issues easier to spot.

How?

Add a docs-only decorator that renders the regular story, then renders it again in a separate preferences registry with showIconLabels enabled.

Testing Instructions

  1. Run npm run storybook:build.
  2. Run npm run --workspace @wordpress/storybook test:smoke.
  3. Open Components → Containers → Tabs → Docs.
  4. Confirm the normal story render is followed by a second render labelled Show button text labels.

Testing Instructions for Keyboard

Not applicable. This change does not alter keyboard interaction.

Screenshots or screencast

tabs-docs-live-committed

Use of AI Tools

Codex was used to validate this change. I reviewed the diff and test output.

Copilot AI balanced review requested due to automatic review settings August 16, 2026 11:44

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 reached their quota limit.

@github-actions

Copy link
Copy Markdown

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: macayu17 <ayushhoff@git.wordpress.org>
Co-authored-by: afercia <afercia@git.wordpress.org>

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

@shail-mehta shail-mehta added [Type] Enhancement A suggestion for improvement. [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Storybook Storybook and its stories for components labels Aug 16, 2026

This branch has not been deployed

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

Labels

[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Storybook Storybook and its stories for components [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the Storybook show an additional render of all components with the 'Show button text labels' enabled

3 participants