-
Notifications
You must be signed in to change notification settings - Fork 202
feat(picker): refactoring template markup, testing token passthroughs #3792
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
base: spectrum-two
Are you sure you want to change the base?
feat(picker): refactoring template markup, testing token passthroughs #3792
Conversation
🦋 Changeset detectedLatest commit: da7dad2 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 |
File metricsSummaryTotal size: 1.41 MB*
picker
* An ASCII character in UTF-8 is 8 bits or 1 byte. |
🚀 Deployed on https://pr-3792--spectrum-css.netlify.app |
d7c1ead
to
e519171
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.
I think there's some style fixes that need to be addressed, specifically for the quiet variants. I left a thought about probably reimplementing the isQuiet
arg getting passed to Picker()
(not Template()
). We'll also need to double check the side+quiet variant since the text alignment is pretty wonky:
placeholder, | ||
currentValue, | ||
contentIconName, | ||
isQuiet = false, |
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'm not totally sure where to put this comment, but I think it's related to the removal of this isQuiet arg.
I noticed on the docs page that the Quiet Invalid story has borders. I'm not certain where that code lives however...
If I put the .spectrum-Picker--quiet
on the button itself, the borders are removed as expected.
Other recent PR preview (from the table migration):
@aramos-adobe Would you be open to adding a test case where we check side + quiet pickers? That's the controls I used to find the text alignment issue. |
Description
Refactored the Picker component template to encapsulate the popover, help text, label, and
spectrum-Picker-button
within a unified structure. Thespectrum-Picker
now acts as the root class, allowing for more targeted button styles and streamlined --mod and style passthroughs to child elements.For example,
--mod-popover-animation-distance
—defined in the Popover—now registers correctly within the Picker, enabling size variant tokens to apply expected values when the corresponding size class is used.New mod
--mod-picker-popover-animation-distance
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
- [ ] Correct
--spectrum-picker-popover-animation-distance
token changes according per size variant- [ ] Layout still works for top and side labels
- [ ] Test grid environment still in tact
Regression testing
Validate:
Screenshots
To-do list