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

fix: static white meter story and corrected fill colors #2965

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

marissahuysentruyt
Copy link
Collaborator

@marissahuysentruyt marissahuysentruyt commented Aug 2, 2024

Description

Because meter just extends the ProgressBar.args, staticWhite shows in the meter controls in Storybook. During the work in #2929, we noticed that the positive, negative and notice fill colors for meter do not respond as expected when looking at a staticWhite story. When staticWhite was turned on, the positive, negative and notice colors remained the same, while the default story (and all of the progress bar stories) have reinforced, white fill colors.

🚫
Screenshot 2024-07-29 at 10 49 39 AM

After checking with design (Nadeen), it was confirmed all stories should have the same fill colors as the default story when staticWhite is toggled on:

if the component is in the static option - all the elements take on white (field label, value and fill of the progress bar) and transparent white for the progress bar track.


Screenshot 2024-08-06 at 1 03 24 PM

This PR adds the static white story to meter to increase Chromatic coverage, and adds CSS to enforce the static white design specs.

CSS-872

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

Meter

  • Check with design on behavior of positive, negative, notice stories for meter @marissahuysentruyt
  • Visit the meter default story
  • In the controls, turn on the static white styles
  • Verify the default story's progress bar fill color changes from blue to white
  • Turn the Chromatic preview on and verify all stories behave the same, with any fill colors changing to white (--spectrum-progressbar-fill-color-white), and track colors turning to transparent white (--spectrum-progressbar-track-color-white)
  • Reset the component (to turn off the static white styles) and choose a fill color from the controls
  • Verify the default and large stories' progress bars turn to the appropriate colors (positive=green; negative=red; notice=orange)
  • Turn the static white controls on once more and verify the static white styles are applied (all progress bars should be white)
  • Inspect spectrum-ProgressBar (the parent element)
  • Verify that your chosen fill color has added the appropriate class to parent element for the default and large stories (postive=is-positive; negative=is-negative; notice=is-notice), and also has the additional spectrum-ProgressBar--staticWhite class)

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 Aug 2, 2024

🦋 Changeset detected

Latest commit: e41ba19

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@spectrum-css/progressbar Patch

Not sure what this means? Click here to learn what changesets are.

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

Copy link
Contributor

github-actions bot commented Aug 2, 2024

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

Copy link
Contributor

github-actions bot commented Aug 2, 2024

File metrics

Summary

Total size: 4.63 MB*
Total change (Δ): ⬆ 0.42 KB (0.01%)

Table reports on changes to a package's main file. Other changes can be found in the collapsed Details section below.

Package Size Δ
progressbar 11.02 KB ⬆ 0.10 KB

Details

progressbar

File Head Base Δ
index-base.css 11.02 KB 10.92 KB ⬆ 0.10 KB (0.94%)
index-vars.css 11.02 KB 10.92 KB ⬆ 0.10 KB (0.94%)
index.css 11.02 KB 10.92 KB ⬆ 0.10 KB (0.94%)
metadata.json 6.03 KB 5.93 KB ⬆ 0.10 KB (1.73%)
* 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.

@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/fix-meter-missing-static-white branch 3 times, most recently from 87fc3e3 to d4136b2 Compare August 5, 2024 15:03
@marissahuysentruyt marissahuysentruyt added the wip This is a work in progress, don't judge. label Aug 5, 2024
@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/fix-meter-missing-static-white branch from d4136b2 to c763024 Compare August 6, 2024 16:34
@marissahuysentruyt marissahuysentruyt marked this pull request as ready for review August 6, 2024 16:40
@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/fix-meter-missing-static-white branch from c763024 to 87fde44 Compare August 6, 2024 16:54
@marissahuysentruyt marissahuysentruyt added size-2 S ~6-18hrs; not hard or time consuming, one or two work days to complete. run_vrt For use on PRs looking to kick off VRT storybook ready-for-review and removed wip This is a work in progress, don't judge. labels Aug 6, 2024
@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/fix-meter-missing-static-white branch from 87fde44 to f0e5cb8 Compare August 7, 2024 17:13
components/progressbar/stories/meter.stories.js Outdated Show resolved Hide resolved
.changeset/lucky-jeans-happen.md Outdated Show resolved Hide resolved
@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/fix-meter-missing-static-white branch from c9036fe to 05e5bf0 Compare August 9, 2024 14:48
@@ -223,7 +223,7 @@
}

/* Static White */
.spectrum-ProgressBar--staticWhite {
.spectrum-ProgressBar.spectrum-ProgressBar--staticWhite {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't love that we have to increase specificity to make this work but we can address those concerns in a separate PR because it's an issue we have across the project.

@castastrophe castastrophe force-pushed the marissahuysentruyt/fix-meter-missing-static-white branch from 3557f37 to 6375a73 Compare August 12, 2024 20:04
@castastrophe castastrophe force-pushed the marissahuysentruyt/fix-meter-missing-static-white branch from 6375a73 to e41ba19 Compare August 12, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge run_vrt For use on PRs looking to kick off VRT size-2 S ~6-18hrs; not hard or time consuming, one or two work days to complete. storybook
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants