-
Notifications
You must be signed in to change notification settings - Fork 4
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
Replace the design system with local source files #171
Conversation
2f5efdd
to
6b38611
Compare
MutableRefObject, | ||
} from 'react'; | ||
import { styled, css } from '@storybook/theming'; | ||
import { WithTooltip, TooltipMessage } from '@storybook/components'; |
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 was changed from
import { WithTooltip, TooltipMessage } from '@storybook/design-system';
and I do not know whether there is a big difference, whether this will break or not. Please test it well
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 may have had a minor impact: https://www.chromatic.com/review?appId=6480e1b0042842f149cfd74c&number=171&type=linked&view=changes
- Sorry for the noisy diff; prettier ran too
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 good 👍🏻
- The previous template string styles allowed some bad patterns, mixing static and dynamic styles and indescriminately overwriting styles for a selector - When converting those styles to JS objects, I unwittingly copied those patterns, which now caused issues - To fix - I separated (where reasonable) static and dynamic (those that depend on `props`) styles into multiple style arguments - I ensured that all top-level selector object keys are only ever in the styles once and all of the conditionality happens within
Second attempt at fixing the issue, this time with a bit more harsh measure: copy the files used from
@storybook/design-system
, and get rid of the dependency altogether (for now at least)Turns out this fixed the issue and it runs OK on a project:
But there are consequences locally that caused CI failures and such.
👉 Please make sure to test the canary really well before merging
📦 Published PR as canary version:
1.0.3--canary.171.b614185.0
✨ Test out this PR locally via: