-
Notifications
You must be signed in to change notification settings - Fork 196
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(picker): migrate docs to storybook #3200
Conversation
|
e91df32
to
622cb65
Compare
🎉 Published on https://spectrum-css.netlify.app as production |
File metricsSummaryTotal 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. |
622cb65
to
2f399de
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.
These docs are such a great improvement over what we had before! I especially appreciate the added content from the guidelines (when to use quiet, when to use side label, etc.). Also, thank you for adding a card for that invalid icon being so tiny!
Some questions I have on whether we should add extra documentation/coverage that I'd love your opinion on:
- Do we need to talk about
withSwitch
option on the Docs page at all or is that strictly for checking alignment? (seems like it is, just want to be sure) - Is there any value to adding documentation/support in the template for the Required picker? (It might be nice, but there's also already SO MUCH going on here.)
- Pickers with and without a label are shown somewhat interchangeably, it might be nice to include that guideline about "always use a label unless it's obvious" somewhere here.
- We're not testing help text with the picker, should we? (Also disabled + invalid + helptext)
- It looks like (but tell me if I have a control on in Storybook somewhere that I shouldn't 😂) we're testing Picker pretty much exclusively with side labels, do we want to test the top label too? (Or are we and I just missed it?)
- Also, not a question about coverage, but is this a good time/place to change the "left" option in the label position controls to "side" to be more logical?
2f399de
to
5adbc4c
Compare
9a8eb12
to
dcc5d2b
Compare
It's just for catching an edge case with alignment that was brought up a while ago. I've recategorized this under
I think this delves too much into all the options for field label. In the updated docs descriptions, I've included a link to field label.
I've included docs about this and a link to the guidelines. And to take that even further and follow the guidelines in the other examples, I swapped out the use of
There are no picker specific help text styles that I can find (within the picker CSS), and help text is outside of picker, so it doesn't seem like this needs to be in VRTs.
All of the others have a top label right now, so please take a look again. I did have to make some adjustments to add
Seems like as good of a time as any; I've changed this to |
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.
Wonderful work on this! I think it's safe to say you're our resident picker expert!
I only have one thing that I think actually needs to change (the is-loading/is-hovered test case). The rest of my comments are questions! Thanks for all your work on this!
isHovered, | ||
isActive, |
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 saw there was a section about "read-only" pickers in the guidelines: https://spectrum.adobe.com/page/picker/#Read-only
Should we add that to the controls at all? It's not on the docs site, and the S2 picker Figma designs don't look like they have a read only option.
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 are no read-only styles in the CSS, so there isn't anything for us to show currently. It's unclear to me looking at that sparse guideline whether anything is needed for follow-up work related to read-only; it looks like Spectrum Web Components displays read-only like the default and React Spectrum does not have this option.
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.
Looks great! Left one small comment about some wording that you can change at your discretion, but otherwise good to go!
Migrates docs site information to Storybook for the Picker component. Creates several docs-only stories to represent the missing examples. Adds a control for value (currentValue), and separates the concept of value and placeholder, which are different things with different classes. Adds a control for displaying the thumbnail variant (with a workflow icon) from the docs site. This icon has a class associated with it that was not previously represented in Storybook. Renames "content" to "popoverContent" and refactors some of the iconName code in the Picker template for clarity. Updates the variants test.js data to add coverage for missing states and variants.
d17a4cc
to
b034228
Compare
Description
Migrates docs site information to Storybook for the Picker component. Creates several docs only stories to represent the missing examples. This also updates the variants test.js data to add coverage for missing states and variants.
Some Storybook updates of note:
currentValue
), and separates the concept of value and placeholder, which are different things with different classes. Their text resides in the same element but theis-placeholder
class only exists when this text is a placeholder..spectrum-Picker-icon
) that was not previously represented in Storybook.content
topopoverContent
and refactors some of theiconName
code in the Picker template to clarify what they are used for.CSS-936
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
@marissahuysentruyt
currentValue
control text is set, it is used instead of theplaceholder
control text. Theis-placeholder
class only resides on the element containing the text when the placeholder text is used.Regression testing
Validate:
To-do list