-
Notifications
You must be signed in to change notification settings - Fork 15
chore: update storybook configuration #418
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
Conversation
@@ -101,6 +104,7 @@ | |||
"rollup-plugin-size-snapshot": "0.12.0", | |||
"rollup-plugin-typescript2": "0.31.1", | |||
"styled-components": "5.3.3", | |||
"tailwindcss": "3.0.19", |
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 was the reason for adding tailwindcss
and @zendeskgarden/tailwindcss
?
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 like tailwindcss
is the library and @zendeskgarden/tailwindcss
is the plugin.
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 for styling storybook with some sane defaults: https://github.com/zendeskgarden/react-containers/pull/418/files#diff-2b5e28aefe329b32c6b4fd8923ed58c50ea800a653d78c14f6c26abcd4b6c0fe
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.
@Francois-Esquire tailwind
is a plugin peer dependency. See https://github.com/zendeskgarden/tailwindcss/blob/1ec2b62bc4bbb6214237c8ad2bf6fb736af949b9/plugin/package.json#L38-L40
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.
@mtomcal if you haven't yet, please see the PR description.
node_modules | ||
utils/storybook/coverage | ||
*.log | ||
|
||
# Package specific | ||
packages/**/dist | ||
package-lock.json | ||
|
||
# Demo specific | ||
demo/**/* |
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.
Has there been any changes to add demo folder yet?
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.
Not yet. TBD per PR description.
@@ -16,7 +16,7 @@ | |||
"lint:md": "markdownlint README.md packages/*/src/**/*.md packages/*/src/*.md packages/*/README.md", | |||
"new": "utils/scripts/new.js", | |||
"prepare": "yarn build", | |||
"start": "start-storybook -p 6006", | |||
"start": "start-storybook --no-version-updates -p 6006", |
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 can't find --no-version-updates
in their CLI docs. https://storybook.js.org/docs/react/api/cli-options Is this an undocumented flag?
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's documented with yarn start-storybook --help
. Also see storybookjs/storybook#8488
Description
Sets
react-containers
up for enhanced storybook usage that is consistent withreact-components
and the refactor that happened under zendeskgarden/react-components#1265. Note, unlike that former (gigantic ... lessons learned 😬) PR, this isolates configuration updates in prep for futuredemo
storybook refactors. My plan is to take those refactors one package at a time.Some of the goodies to highlight here include:
import { useAccordion } from '@zendeskgarden/container-accordion';
(see.storybook/babel.config.js
and.tsconfig.json
for details)tailwindcss
for rudimentary demo styling 🎉. The storybook demos underreact-containers
are intentionally not meant to mirror the high-fidelity design styling ofreact-components
. However, there's no need to make demo-life harder on ourselves than necessary.react-components
: add-on panel position, alphabetically sorted controls, etcoutline
a bit more visual "punch" (it is sometimes a bit difficult to see the default gray in these un-styled demos)Checklist
yarn start
)analyzed via axe and evaluated using VoiceOverincludes new unit tests