-
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
feat(storybook): modifiers table added to docs #3195
Conversation
|
3c58016
to
a80c7c6
Compare
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. |
a80c7c6
to
58cdcfe
Compare
🚀 Deployed on https://pr-3195--spectrum-css.netlify.app |
f75b826
to
aac5345
Compare
aac5345
to
3392907
Compare
3392907
to
6a991cf
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.
The table showing the list of mods is a great addition.
The two bigger things I noticed when validating:
- The anchor link does not appear in the URL after clicking the "Modifiable custom properties" heading, like it does when clicking the other headings on the page
- The copy event is logging multiple times for a single click (noted below)
Personally, the copy to clipboard and toast functionality feels excessive to me, for a text list of properties. Would users be copying them that often?
It also may be a little unexpected behavior right now, as the rows show as clickable but without indication that a click would result in changing the contents of the clipboard; one might expect a click would show or link to more information, and it's only clear what will happen after you click one.
.storybook/project.json
Outdated
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.
What are these changes to project.json
and does this need to be validated?
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.
It ensures the report is run before the storybook is built so that every component has the latest metadata.json available for the doc block.
688bc30
to
8d4e8e0
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.
This is looking excellent! Having the mods surfaced like this will be really helpful I think.
Most of my comments are just questions, but I did see that progress bar is missing the metadata and packageJson imports (I'm assuming you don't want to wait for the fix in the resource link PR 😆)
8d4e8e0
to
86dc54a
Compare
@jawinn Just pushed up a fix for this - apparently vanilla HTML anchor linking doesn't work b/c React haha so I found an example of how they're doing it in the other Storybook docs and mimic'ed that. It seems to be working well now. |
86dc54a
to
995160e
Compare
ba665e0
to
bc5021a
Compare
bc5021a
to
8cfec9a
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 making all of those updates! This is looking really good 🤩 I just had one more comment on the modifiers array for field group!
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.
This looks good to me; my previous comments are addressed. The only thing I see is what Marissa already called out for Field group.
These are empty CSS custom property hooks available in this component | ||
that enable one-off customizations specific to a product implementation. | ||
</Body> | ||
<Table className="docblock-properties-table sb-unstyled spectrum-Table spectrum-Table--sizeL spectrum-Table--compact"> |
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.
Small suggestion: I'd add --mod-table-cursor-row-default: auto
to the .docblock-properties-table
so it doesn't show a pointer.
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.
Oh good idea, yes. I added that and pushed up.
8cfec9a
to
2d49004
Compare
2d49004
to
c8f2a26
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.
Description
This creates a custom DocBlock for our docs that displays the boilerplate text for mods on the docs site. I called this component a
PropertiesTable
with the hope that we can eventually expand this component to document all the custom properties being used by the component.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
@jawinn
Regression testing
Validate:
Screenshots
To-do list