-
Notifications
You must be signed in to change notification settings - Fork 201
docs(swatch,swatchgroup,table,tabs): docs migrations to storybook #2925
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(swatch,swatchgroup,table,tabs): docs migrations to storybook #2925
Conversation
|
🚀 Deployed on https://pr-2925--spectrum-css.netlify.app |
File metricsSummaryTotal size: 4.11 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. |
597c65b
to
6b6d58a
Compare
f7ce386
to
8633c48
Compare
8633c48
to
c6f7deb
Compare
d3506b0
to
e195f17
Compare
swatchColor: { table: { disable: true } }, | ||
isRectangle: { table: { disable: true } }, | ||
imageUrl: { table: { disable: true } }, | ||
isMixedValue: { table: { disable: true } }, | ||
gradient: { table: { disable: true } }, |
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 were all in the controls for swatch group (since we're spreading the Swatch
args, and I had to add a bunch to swatch), but I didn't think they were necessary. Let me know if I should keep them in the controls table.
class=${classMap({ | ||
[`${rootClass}-cell`]: true, | ||
[`${rootClass}-checkboxCell`]: true, | ||
})} |
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.
Maybe I didn't need to do this, but it felt out of place. There aren't very many instances where I remembered us just flat out doing the class names without the classMap()
.
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 love this! It's a great addition.
ed03400
to
503f232
Compare
1ac2606
to
c7b5a86
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.
A few suggestions and ideas but seriously loving these updates.
class=${classMap({ | ||
[`${rootClass}-cell`]: true, | ||
[`${rootClass}-checkboxCell`]: true, | ||
})} |
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 love this! It's a great addition.
Disabled.args = { | ||
content: [ | ||
{ | ||
id: "tab-1", |
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.
Do we want to let the template.js set a default id for tabs?
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.
Let me know if this is what you're thinking. I haven't used getRandomId
yet, but I looked at some examples. There should be an id now on the tabs component, as well as each tab item. bcfe278
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.
Love it! Added bonus, now there's no risk of a duplicate ID error during testing. 🥳
c8ea445
to
b5f7826
Compare
- missing stories are added - additional template to support new stories - expands chromatic test cases
- adds missing stories to docs page - expands Chromatic test cases - adds documentation for border classes, density and corner rounding
- adds missing variants to docs page - expands Chromatic test coverage - enhances coverage to support new variants
- migration guide notes are moved to CHANGELOG - adds missing stories to docs page - enhances template to support new variants - expands Chromatic test coverage
- renames withBorder arg to borderStyle since it isn't a boolean arg for swatch/swatchgroup - refactors template and test files to reflect arg name changes - removes unnecessary comments - removes unnecessary literals in Container() functions - corrects withColumnDividers arg name to hasColumnDividers in default table args - corrects sentence case in table control args - extend swatch.argtypes and fix containerWidth - fix sizing docs description - uses "Density - Compact" and "Density - Spacious" as story names so that both stories will be next to each other on the docs page. - calls out the default, regular density for the default table in the story description
docs(tabs): use passive voice in docs descriptions
- adds descriptions in the control table for isMixedValue, rounding, and imageUrl - adds a better description for gradient control - changes gradient control from color to text to make it clearer that a user can input their own gradient examples. - change from isRectangle boolean, to shape inline-radio control - add description for rectangle control - update template.js & test file as needed for refactored rectangle - add nothing/empty story docs description - add opacity examples to swatch stories
chore(swatchgroup): remove shape control from control table
- fix sentence case in control table - because certain variants cannot be created from the default story, this adds stories to sidebar them back to the navigation for users to view and further edit via the controls - adds description of the quiet multi-select, that has emphasized styles by default, and how to remove those emphasized styles to clarify quiet emphasized multi-select story
- in most stories, swatchgroup now uses colors that now meet contrast in both our light and dark mode to properly show the "default" of having no border on the swatches in the swatchgroup - for the light border story, a new set of colors that don't meet color contrast for light mode are implemented - the rounding template was updated to use a selection of the new colors that meet contrast - updated light border swatch colors for the light border test case
- adds documentation around making sure the default border is applied in cases where a swatch is empty/undefined - updates the no-color test case to apply the default border - removes non-existent swatch arguments isGradient and isImage - fix rectangle story name to shape
- fixes case of defaultValues swatch/swatchgroup - uses shorthand for borderStyles in swatch and converts in template now - simplifies isDisabled, isSelected assignments in swatchgroup template - removes unnecessary destructuring in tabs
b5f7826
to
33fb0fb
Compare
Description
This PR continues migrating documentation from the static docs site into Storybook. The focus is on
swatch
,swatchgroup
,table
andtabs
. All variants of the components should now be displayed on the StorybookDocs
page. All components haveautodocs
and/or!dev
stories now. Migration notes fortables
andtabs
have been added to the correspondingchangelog
s.Jira
No MDX pages were added for any components.
This PR doesn't need a changeset since it's docs-only.
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
Regression testing
Validate:
Screenshots
To-do list