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

docs(alertbanner): migrate docs to storybook #3118

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

jawinn
Copy link
Collaborator

@jawinn jawinn commented Sep 16, 2024

Description

Create docs-only stories for alert banner in Storybook to represent what was on the docs site.

Modifies the alert banner's action button control to allow the text of the button to be editable.

Adds unrepresented test cases and examples for options with just an action button (no close button), and text only (no action button or close button). The design team had confirmed these as available options during the S2 migration.

Note: these updated docs were based on the ones from from the WIP S2 migration; I decided against using the custom MDX file and just prefixing the three variant stories with "Variant: " to group them together, since the only unique thing the custom MDX was providing was another heading above the three semantic variants. And because the current preference is to use the autodocs template unless it's really necessary to create a custom MDX.

How and where has this been tested?

Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.

Validation steps

  • Docs from docs site are represented in the Storybook "Docs"
  • All existing sets of options displayed on the chromatic template are still covered in the updated template
  • New chromatic template covers options for both buttons, just close button, just action button, and text only

Regression testing

Validate:

  1. The documentation pages for at least two other components are still loading, including:
  • The pages render correctly, are accessible, and are responsive.
  1. If components have been modified, VRTs have been run on this branch:
  • VRTs have been run and looked at.
  • Any VRT changes have been accepted (by reviewer and/or PR author), or there are no changes.

To-do list

  • I have read the contribution guidelines.
  • I have updated relevant storybook stories and templates.
  • If my change impacts other components, I have tested to make sure they don't break.
  • If my change impacts documentation, I have updated the documentation accordingly.
  • ✨ This pull request is ready to merge. ✨

Copy link

changeset-bot bot commented Sep 16, 2024

⚠️ No Changeset found

Latest commit: 0c76468

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

@jawinn jawinn added documentation Because documentation is important and shouldn't be broken ready-for-review labels Sep 16, 2024
@jawinn jawinn force-pushed the jawinn/css-929-alertbanner-docs-to-storybook branch from a38a219 to 020a291 Compare September 16, 2024 15:22
Copy link
Contributor

github-actions bot commented Sep 16, 2024

🚀 Deployed on https://pr-3118--spectrum-css.netlify.app

@jawinn jawinn force-pushed the jawinn/css-929-alertbanner-docs-to-storybook branch from 020a291 to 3bc1e2b Compare September 16, 2024 15:30
Copy link
Contributor

github-actions bot commented Sep 16, 2024

File metrics

Summary

Total size: 4.11 MB*

🎉 No changes detected in any packages

* Size determined by adding together the size of the main file for all packages in the library.
* Results are not gzipped or minified.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

@jawinn jawinn force-pushed the jawinn/css-929-alertbanner-docs-to-storybook branch from 3bc1e2b to 8364f3a Compare September 16, 2024 17:38
Copy link
Collaborator

@rise-erpelding rise-erpelding left a comment

Choose a reason for hiding this comment

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

This looks great! Test coverage looks good, info from Docs Site is included, and the variants are all displayed in a really nice way. Well done!

I added one tiny grammatical suggestion but don't expect this would need a re-review afterward, so I'm approving!

components/alertbanner/stories/alertbanner.stories.js Outdated Show resolved Hide resolved
components/alertbanner/stories/alertbanner.stories.js Outdated Show resolved Hide resolved
components/alertbanner/stories/template.js Show resolved Hide resolved
Copy link
Collaborator

@castastrophe castastrophe left a comment

Choose a reason for hiding this comment

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

Great addition to the docs page, thanks for linking the design docs. Let's make a note to publish the site after this merges. Thanks for making these updates and expanding the test coverage.

@castastrophe castastrophe force-pushed the jawinn/css-929-alertbanner-docs-to-storybook branch from 8364f3a to a5c5e9a Compare September 18, 2024 12:11
@jawinn jawinn force-pushed the jawinn/css-929-alertbanner-docs-to-storybook branch from a5c5e9a to 0e52226 Compare September 18, 2024 14:07
Create docs-only stories for alert banner in Storybook to represent
what was on the docs site.

Modifies the alert banner's action button control to allow the text of
the button to be editable.

Adds test cases and examples for options without close button and
without close button or action button.
@jawinn jawinn force-pushed the jawinn/css-929-alertbanner-docs-to-storybook branch from 0e52226 to 0c76468 Compare September 18, 2024 14:32
@jawinn jawinn merged commit c9176c1 into main Sep 18, 2024
12 checks passed
@jawinn jawinn deleted the jawinn/css-929-alertbanner-docs-to-storybook branch September 18, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Because documentation is important and shouldn't be broken ready-for-review s1 storybook
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants