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: storybook description format; lit syntax alignment #2681

Merged
merged 2 commits into from May 2, 2024

Conversation

castastrophe
Copy link
Collaborator

@castastrophe castastrophe commented Apr 19, 2024

Description

Descriptions can be written as JDoc comments in Storybook stories above stories, meta, or components. This format seems more contributor-friendly than attaching parameters.docs.description.{story,component} to each story. These JSDoc blocks can include markdown as well!

This PR moves all description data into JSDoc blocks. It also updates customStyles objects to use a consistent format and naming approach along with a few other minor linting fixes.

In an effort to prevent unnecessary VRT shifts, I also migrated all ems and rems used in displaying VRT groupings to px.

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

  1. Spin up the local storybook (yarn start) or preview the linked version in the PR.
  • No regressions in VRTs
  • Click through docs pages and check that the descriptions appear above the initial code example.

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

Screenshot 2024-04-19 at 2 39 08 PM

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. ✨

@castastrophe castastrophe added the run_vrt For use on PRs looking to kick off VRT label Apr 19, 2024
@castastrophe castastrophe self-assigned this Apr 19, 2024
Copy link

changeset-bot bot commented Apr 19, 2024

⚠️ No Changeset found

Latest commit: 689a461

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

@castastrophe castastrophe force-pushed the chore-storybook-descriptions-formatting branch from 7e6ecf8 to 41625fc Compare April 19, 2024 18:42
Copy link
Contributor

github-actions bot commented Apr 19, 2024

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

Copy link
Contributor

github-actions bot commented Apr 19, 2024

File metrics

Summary

Total size: 4.57 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.

@castastrophe castastrophe force-pushed the chore-storybook-descriptions-formatting branch 7 times, most recently from efcfabd to 8aab4f9 Compare April 19, 2024 20:23
@castastrophe castastrophe changed the title chore: storybook description format; lit syntax alignment docs: storybook description format; lit syntax alignment Apr 19, 2024
Copy link
Collaborator

@pfulton pfulton left a comment

Choose a reason for hiding this comment

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

I like this idea, and I think it's a step in the right direction, as we continue to bring over some of the features of the Docs site.

It looks like we might have lost the padding on some of the stories (see the Chromatic diffs; Action Menu is an example). In the Card stories, we seem to be missing the ... icon (also captured via Chromatic).

Overall, it looks like this batch of Chromatic diffs has mostly detected things that I think we should try to address before we merge this work in.

@castastrophe castastrophe force-pushed the chore-storybook-descriptions-formatting branch 4 times, most recently from 6e2b1db to f9d2a3a Compare April 23, 2024 17:19
@castastrophe
Copy link
Collaborator Author

@pfulton Great feedback. I found a decorators typo in several stories and corrected a few issues. There are 5 baselines left that I think are improvements and fixes. Let me know if you find any other issues!

@castastrophe castastrophe force-pushed the chore-storybook-descriptions-formatting branch 5 times, most recently from ac7d58b to f7a7cf0 Compare April 26, 2024 21:26
@castastrophe castastrophe force-pushed the chore-storybook-descriptions-formatting branch from f7a7cf0 to f18dfe2 Compare April 29, 2024 16:55
@castastrophe castastrophe merged commit 0f6dbf9 into main May 2, 2024
13 checks passed
@castastrophe castastrophe deleted the chore-storybook-descriptions-formatting branch May 2, 2024 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run_vrt For use on PRs looking to kick off VRT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants