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

More storybook example/docs for dynamic/multi-state buttons #4553

Closed
wants to merge 5 commits into from

Conversation

khiga8
Copy link
Contributor

@khiga8 khiga8 commented May 2, 2024

Fixes: https://github.com/github/accessibility/issues/6266

Changelog

New

  1. This PR newly adds the storybook/addon-blocks package. This allows me to provide more comprehensive documentation for a storybook example the storybook way ✨ .
  2. I added a dedicated documentation page for multi-state buttons as a follow-up to an audit issue which revealed the need for accessibility guidance for multistate button patterns.

I've already proposed doc updates to Primer's interface guidelines. I don't think this is enough. I find additional value in having code examples with explanatory text, since the interface guidelines is more framework agnostic.

There is a need to provide additional documentation for nuanced examples alongside the code (Slack), but there isn't a standardized practice for doing that right now in storybook.

Initially I went down the route of directly adding text explanations to the storybook story, but utilizing storybook blocks and MDX feels a lot cleaner, and feels like the "storybook way". So, I am trying this storybook markdown out!

Check it out 🔍 :

📢 REVIEWERS: let me know if this approach doesn't make sense to you or if you have a different suggestion!
Are there are any concerns with adding this package? 👀

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

Copy link

changeset-bot bot commented May 2, 2024

⚠️ No Changeset found

Latest commit: 07badb2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented May 2, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 87.98 KB (0%)
packages/react/dist/browser.umd.js 88.28 KB (0%)

@primer primer bot temporarily deployed to github-pages May 2, 2024 16:55 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-4553 May 2, 2024 16:55 Inactive
@khiga8 khiga8 added the skip changeset This change does not need a changelog label May 2, 2024
@khiga8 khiga8 marked this pull request as ready for review May 2, 2024 17:48
@khiga8 khiga8 requested review from a team as code owners May 2, 2024 17:48

<Meta of={ButtonStories} title="Components/Button/Features/MultiStateButtons" />

# Multi-state Buttons
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@primer primer bot temporarily deployed to github-pages May 2, 2024 19:16 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-4553 May 2, 2024 19:17 Inactive
Co-authored-by: Lindsey Wild <35239154+lindseywild@users.noreply.github.com>
Copy link
Member

@joshblack joshblack left a comment

Choose a reason for hiding this comment

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

LGTM! Just one comment on the dependency

@@ -141,6 +141,7 @@
"@storybook/addon-links": "7.6.2",
"@storybook/addon-storysource": "7.6.14",
"@storybook/addon-styling": "1.3.7",
"@storybook/blocks": "8.0.9",
Copy link
Member

Choose a reason for hiding this comment

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

Could we use the v7 version of @storybook/blocks since we're still on v7 of storybook? 👀

Copy link
Contributor

Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jul 15, 2024
@khiga8
Copy link
Contributor Author

khiga8 commented Jul 16, 2024

Closing for now given Slack convo concerns on introducing blocks!

@khiga8 khiga8 closed this Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changeset This change does not need a changelog Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants