-
Notifications
You must be signed in to change notification settings - Fork 195
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(dial,dialog,divider,dropindicator): Migrate docs to storybook pt7 #2833
docs(dial,dialog,divider,dropindicator): Migrate docs to storybook pt7 #2833
Conversation
|
File metricsSummaryTotal size: 4.63 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. |
🚀 Deployed on https://pr-2833--spectrum-css.netlify.app |
31c9260
to
297b64e
Compare
5b3e7a9
to
c165aed
Compare
1ec5878
to
60d8a70
Compare
5f3f15e
to
b84e78e
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.
Migration is there and looks great in the preview link 🎉 Everything looks on point!
Just a few comments:
- Dialog Docs renders perfectly in the preview link, but has an error in localhost on my end. The preview.js templates doesn't render.
- The dragging on Dial feels different on the Storybook than the OG docs version
Screen.Recording.2024-08-22.at.10.33.50.PM.mov
Screen.Recording.2024-08-22.at.10.34.51.PM.mov
Screen.Recording.2024-08-22.at.10.35.35.PM.mov
- adds static color stories, a sizing story and vertical story - removes customStyles arg from default args because they were overwriting other styles that are dependent on the orientation (i.e. vertical) - refactors chromatic coverage to reflect removal of custom styles in default template
- adds all sizing stories, with hero, no divider, fullscreen/fullscreen- takeover, scorlling example stories - refactors template to accommodate buttons when the dialog is dismissible (no buttons based on guidance/documentation), vs. non- dismissible - adds test coverage example for new stories - fixes sizing template issues in Variants() for showModal: false - renames heading for dialog arg to dialogHeading (to avoid variable naming conflicts between the component and Sizing function used within Variants())
revert arg name "dialogHeading" back to "heading." It's a known issue that the Variant() function is mixing the dialog's heading arg with the Sizing() heading arg. That refactoring and fix will be done in a new branch.
instead of deleting the isFocused type just to replace it with an identical isFocusVisible type & control, this extends isFocused definition to allow the isFocusVisible variable name
VRT diffs were found for Menu and Picker, so tracing them back, were caused by an incorrect inline-size property of 100% (as opposed to the corrected "auto")
To work better with React's hot module reloader, this should only call a template once and toggle the inputs based on settings.
- use the presence of the hero image url as a boolean, instead of an actual hasHeroImage boolean - removes layout !== default since it doesn't do anything anyways - use .every() array method for layout class modifiers
- use the presence of the hero image url as a boolean, instead of actual hasHeroImage boolean
this naming matches the other Sizing story, as well as indicates it is going through the Sizes() function.
- enforces orientation for divider test cases - creates new minDimensionValues arg to use as visualization. Because the inline and block sizes of the divider are dependant on content (which doesn't exist on this component), this new arg sets example values for min-inline-size and min-block-size. Any other customStyles passed to the component should still render as before, and we are relying on the CSS now instead of the styleMap in the default template. - refactors the min-inline-size/min-block-size in styleMap to use new minDimensionValues arg - adds extra documentation - corrects the default size of divider to small
b84e78e
to
4146e5e
Compare
Description
This PR continues migrating documentation from the static docs site into Storybook. The focus is on
dial
,dialog
(standard dialog),divider
anddropindicator
. All variants of the components should now be displayed on the StorybookDocs
page.dial
:new MDX docs pagenew storiesdialog
: !!new MDX docs page~~ new stories and controls (plus an additional note regarding alert dialog)divider
:new MDX docs pagenew storiesdropindicator
:new MDX docs pageThis 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