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

chore(storybook): support static color settings in testing grid #3172

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

castastrophe
Copy link
Collaborator

@castastrophe castastrophe commented Sep 27, 2024

Description

This update adds a resize observer to toggle the scale when the viewport drops below 480px (use scale = "large", else use scale = "medium").

This update also adds support for static colors in the testing grids saving us from having to run static white/static black snapshots separately. I accomplished this by updating which containers are returned by the fetchContainers function based on if the document is in a testing state or not.

Updated tests:

  • ActionButton: Remove separate static black & static white tests; add both to the testing grid.
  • ActionGroup: Add static black & static white to the test grid.
  • Button: Remove separate static black & static white tests; add both to the testing grid.
  • ClearButton: Remove OverBackground test; add static white to testing grid.
  • CloseButton: Add static black & static white to testing grid.
  • Divider: Remove static white and static black from separate snapshots; add to testing grid.
  • Link: Remove static white and static black and static white + quiet and static black + quiet from separate snapshots; add to testing grid.
  • ProgressBar: Remove static white from test; add to testing grid.
  • Meter: Remove static white from test; add to testing grid (remove the skipBorders flag).
  • ProgressCircle: Remove static white from test; add to testing grid.

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

  • Expect to see tray snapshots leveraging the large scale by default in the small snapshots for VRT.
  • On the action button story, expect to see a dark teal background with a grouping of white outlined buttons
  • In the action button testing grid, expect to see a light teal and dark teal box containing the static white and static black variant tests:
Screenshot 2024-09-27 at 6 31 41 PM
  • Review the changeset for this PR to validate other additions to the snapshots

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

Copy link

changeset-bot bot commented Sep 27, 2024

⚠️ No Changeset found

Latest commit: f55a3b7

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 self-assigned this Sep 27, 2024
@castastrophe castastrophe added run_vrt For use on PRs looking to kick off VRT storybook labels Sep 27, 2024
Copy link
Contributor

github-actions bot commented Sep 27, 2024

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

Copy link
Contributor

github-actions bot commented Sep 27, 2024

File metrics

Summary

Total size: 4.31 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-static-color-support-test-grid branch 3 times, most recently from 83f16db to 3c68620 Compare September 27, 2024 22:22
@castastrophe castastrophe marked this pull request as ready for review September 27, 2024 22:39
@castastrophe castastrophe force-pushed the chore-static-color-support-test-grid branch 2 times, most recently from 3fb3534 to 5ef1b66 Compare September 27, 2024 22:58
@castastrophe castastrophe added ready-for-review size-5 L ~30-42hrs; lots of effort or complexity, most of a sprint needed to complete. labels Sep 27, 2024
@castastrophe castastrophe force-pushed the chore-static-color-support-test-grid branch from 5ef1b66 to 11a3f88 Compare September 27, 2024 23:12
@castastrophe castastrophe force-pushed the chore-static-color-support-test-grid branch from 11a3f88 to f55a3b7 Compare September 30, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review run_vrt For use on PRs looking to kick off VRT size-5 L ~30-42hrs; lots of effort or complexity, most of a sprint needed to complete. storybook
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant