-
Notifications
You must be signed in to change notification settings - Fork 197
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
feat(colorwheel): S2 migration #3390
base: spectrum-two
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 02a3f15 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
🚀 Deployed on https://pr-3390--spectrum-css.netlify.app |
File metricsSummaryTotal size: 1.66 MB* Table reports on changes to a package's main file.
colorwheel
* An ASCII character in UTF-8 is 8 bits or 1 byte. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few questions for you, as usual!
- I wonder if we need to refactor the
color-wheel-width
andcolor-wheel-minimum-width
tokens from our custom tokens/dist. Those values change based on the platform (desktop/mobile), but the designs don't say anything about any size changes between desktop and mobile. In other components, they have noted the size differences. It might be something worth checking with design on. 🤷♀️ - Do we need to adjust
.spectrum-ColorWheel-border
at all so that our border is actually transparent, against the color wheel, instead of outside of the color wheel? I'm not sure if the clip path is the right place, but maybe that custom property needs some tweaking? I think S2 would be the place to fix this! (because it's also not like that inmain
, but looking at S1 designs, it should have been).
Ours (effectively, has a gray border):
In Figma (where the border is "on top" of the color wheel):
Happy to pair on any of my comments if two heads are better than one! 👍
I started a thread in the implementations channel about the first question — I'll go ahead and run with design's preference.
|
eaf2611
to
3a12421
Compare
99a6ad6
to
f3be898
Compare
cdb180d
to
27d01df
Compare
7ce5746
to
7af66a2
Compare
9cb357e
to
70603e0
Compare
c93daf7
to
e393c32
Compare
5b042e8
to
c01a26b
Compare
4552560
to
dea94d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! I left some ideas and comments about some of the CSS changes. I did want to run something by you...
What do you think of adjusting the default template for this component? In Figma for S1, it looks like the default did not have the color loupe, but in Figma now, the S2 color wheel has the color loupe as the default. Should we update our default story to reflect that change?
![Screenshot 2025-01-29 at 5 46 30 PM](https://private-user-images.githubusercontent.com/69602589/407935533-caa58627-1f19-4174-b9b5-adc1ab5afaa1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwODg5MzcsIm5iZiI6MTczOTA4ODYzNywicGF0aCI6Ii82OTYwMjU4OS80MDc5MzU1MzMtY2FhNTg2MjctMWYxOS00MTc0LWI5YjUtYWRjMWFiNWFmYWExLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDA4MTAzN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg2NWM1OTM4NTViNmZkYTU4MGNkOTA5MWM0YjEwNzI5YjI1ZTc4YmJlNWViODlkZGQ3NTFhNzFhODBlYmMyMTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.G1s0JxPyrMLTAnwdF_Rf5akbdXU0AlGxAS6CkpRofM8)
I think at the minimum maybe we should show a story with a color loupe on the docs page, and add the corresponding controls. Any thoughts on that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
378549e
to
f2aafaa
Compare
Addressed this in c84834: |
c9d910f
to
086faac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! It's so close! I have some smaller suggestions to "leave it better than we found it" for the CSS. I also totally didn't dig into the WHCM stuff initially, and suggested changes that deviated too far from what prod has, so I tried to suggest more accurate changes this time. 🤦♀️
In the index.css, could you refactor the min-inline-size
so we aren't using the token directly in the style definition? This wasn't something you introduced, but I figured maybe we could fix it up so it matches what our preferences are. Maybe something like
--spectrum-colorwheel-min-inline-size: var(--spectrum-color-wheel-minimum-width)
? And then use the min-inline-size custom property in the style definition.
Last but not least, do you think we have any tests to add? I was thinking it wouldn't be a terrible idea to throw a quick isWithColorLoupe: false
test into the tests file.
--highcontrast-colorwheel-border-color-disabled: GrayText; | ||
--highcontrast-colorwheel-fill-color-disabled: Canvas; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I totally spoke too soon on the WHCM stuff! I left an updated (more thought-through 😬 ) idea that should replicate what's on prod better now.
Looks like we still need the gradient itself, and then I have a better idea how to replicate this disabled state now:
(this is production when I test in AssistivLabs)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a984eb6
to
61d7526
Compare
56c6806
to
793571c
Compare
1f3d572
to
eb8c57f
Compare
eb8c57f
to
2454e32
Compare
db2a5dd
to
f34473b
Compare
1bfefa5
to
ee52db2
Compare
f34473b
to
cf46c2b
Compare
- chore(colorwheel): update property name - chore(colorwheel): wip inset borders - chore(colorwheel): fix lint violations - chore(colorwheel): move mod declarations - chore(colorwheel): drop unused property + update metadata - chore(colorwheel): remove underlying border node + class - chore(colorwheel): remove unused property - fix(colorwheel): add missing mod - fix(colorwheel): comments for updated before spacing/positioning - fix(colorwheel): adopt proper token for border opacity - fix(colorwheel): remove inset border on disabled state - fix(colorwheel): remove global token reference - chore(colorwheel): highlight removed/added mods - chore(colorwheel): update copyright year - chore(colorwheel): add color loupe to default story - fix(colorwheel): correct WHC disabled background color value - chore(colorwheel): update test heading - fix(colorwheel): typos - chore(colorwheel): update token usage - chore(colorwheel): add without loupe test - chore(colorwheel): restore WHC styles - chore(colorwheel): move isWithColorLoupe property - fix(colorwheel): whc disabled background
ee52db2
to
02a3f15
Compare
Description
CSS-1020
This change migrates the colorwheel component to S2. It adds the
--spectrum-colorwheel-border-color-rgb
and--spectrum-colorwheel-border-opacity
custom properties. It updates--spectrum-colorwheel-border-color
to leverage these tokens in anrgba(...)
function.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
colorwheel
component.Regression testing
Validate:
To-do list