Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Badge component: Fix Storybook url link #68077

Merged
merged 3 commits into from
Dec 18, 2024
Merged

Badge component: Fix Storybook url link #68077

merged 3 commits into from
Dec 18, 2024

Conversation

t-hamano
Copy link
Contributor

@t-hamano t-hamano commented Dec 18, 2024

What?

Fix an issue where the Storybook link in the Badge component README was not linking to an actual story:

426f038b3403e90168cd5227bcee5686.mp4

Why?

This is because the URL rules are different when automatically generating a README and when using Storybook.

How?

By adding an id field to the storybook meta, change the story URL of the Badge component as follows:

Testing Instructions

Testing Instructions for Keyboard

  • Run npm run storybook:dev
  • The story URL for the Badge component should be http://localhost:50240/?path=/docs/components-badge--docs.

@t-hamano t-hamano added [Type] Developer Documentation Documentation for developers Storybook Storybook and its stories for components labels Dec 18, 2024
@t-hamano t-hamano self-assigned this Dec 18, 2024
@@ -48,4 +48,3 @@ export function generateMarkdownPropsJson( props, { headingLevel = 2 } = {} ) {

return [ { [ `h${ headingLevel }` ]: 'Props' }, ...propsJson ];
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change is to fix a warning in prettier (Two newlines).

@t-hamano t-hamano requested a review from a team December 18, 2024 08:01
@t-hamano t-hamano marked this pull request as ready for review December 18, 2024 08:01
Copy link

github-actions bot commented Dec 18, 2024

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: t-hamano <[email protected]>
Co-authored-by: tyxla <[email protected]>

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

Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

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

Thanks @t-hamano 🙌

packages/components/CHANGELOG.md Outdated Show resolved Hide resolved
@t-hamano t-hamano merged commit 5bc7972 into trunk Dec 18, 2024
63 checks passed
@t-hamano t-hamano deleted the badge/docs-link branch December 18, 2024 09:28
@github-actions github-actions bot added this to the Gutenberg 20.0 milestone Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storybook Storybook and its stories for components [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants