Skip to content

chore(storybook): add migrated components list #3745

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

Draft
wants to merge 1 commit into
base: spectrum-two
Choose a base branch
from

Conversation

marissahuysentruyt
Copy link
Collaborator

@marissahuysentruyt marissahuysentruyt commented May 15, 2025

Description

DISCLAIMER: MOST CODE GENERATED BY CURSOR

  • adds a MigratedComponentsList() block to ComponentDetails.jsx. That block gets used in the S2 Migration guide MDX file
  • adds a migrated-component-scanner.js task to scan the components directory and generate a list of migrated components based on their status (status: type: "migrated")
  • adds a migrated-components.json file to the .storybook/data directory
  • updates the package.json scripts to include the new migrated-component-scanner.js task so that it builds and captures the migration status when storybook is started

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

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.

Screenshots

To-do list

  • I have read the contribution guidelines.
  • I have updated relevant storybook stories and templates.
  • I have tested these changes in Windows High Contrast mode.
  • 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. ✨

@marissahuysentruyt marissahuysentruyt self-assigned this May 15, 2025
@marissahuysentruyt marissahuysentruyt added size-2 S ~6-18hrs; not hard or time consuming, one or two work days to complete. wip This is a work in progress, don't judge. S2 Spectrum 2 labels May 15, 2025
Copy link

changeset-bot bot commented May 15, 2025

⚠️ No Changeset found

Latest commit: 17e141a

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 15, 2025

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

Copy link
Contributor

github-actions bot commented May 15, 2025

File metrics

Summary

Total size: 1.42 MB*

🎉 No changes detected in any packages

* Size is the sum of all main files for packages in the library.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/add-migrated-components-list branch from 5792f6c to 83e37cf Compare June 17, 2025 13:24
- adds a MigratedComponentsList() block to ComponentDetails.jsx. That
block gets used in the S2 Migration guide MDX file
- adds a migrated-component-scanner.js task to scan the components
directory and generate a list of migrated components based on their
status (status: type: "migrated")
- adds a migrated-components.json file to the .storybook/data directory
- updates the package.json scripts to include the new
migrated-component-scanner.js task so that it builds and captures the
migration status when storybook is started
@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/add-migrated-components-list branch from 83e37cf to 17e141a Compare June 17, 2025 20:35

This is a list of all components that have been fully migrated to Spectrum 2.

<MigratedComponentsList />
Copy link
Collaborator

Choose a reason for hiding this comment

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

😍

@@ -15,7 +15,7 @@
"scripts": {
"build": "yarn builder tag:component,ui-icons",
"build:docs": "yarn build:preview --output-dir ../dist/",
"build:preview": "yarn report && nx build storybook",
"build:preview": "yarn report && yarn component:data && nx build storybook",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if there's a way to include this task as a storybook report. In the storybook project.json, if we use this script as the report, would it get run automatically with the others? What's the downside of doing that, maybe it's run more than it needs to be?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm picturing you could run it like nx report storybook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S2 Spectrum 2 size-2 S ~6-18hrs; not hard or time consuming, one or two work days to complete. wip This is a work in progress, don't judge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants