-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Theme: Add Storybook stories #72747
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
Theme: Add Storybook stories #72747
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
| DEFAULT_SEED_COLORS.bg; | ||
| DEFAULT_SEED_COLORS.primary; | ||
| const bg = | ||
| color.bg ?? inheritedSettings.color?.bg ?? DEFAULT_SEED_COLORS.primary; | ||
| color.bg ?? inheritedSettings.color?.bg ?? DEFAULT_SEED_COLORS.bg; |
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 a bug in the implementation. Evidenced by the other variables it's pulling from and the name of the variables being assigned, these were wrongly inverted.
|
Size Change: 0 B Total Size: 2.37 MB ℹ️ View Unchanged
|
|
Flaky tests detected in 676665d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/18887284590
|
mirka
left a comment
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 👍
storybook/main.js
Outdated
| '../packages/global-styles-ui/src/**/stories/*.story.@(js|tsx|mdx)', | ||
| '../packages/dataviews/src/**/stories/*.story.@(js|tsx|mdx)', | ||
| '../packages/fields/src/**/stories/*.story.@(js|tsx|mdx)', | ||
| '../packages/theme/src/**/*.stories.@(tsx|mdx)', |
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's change the naming convention of the story files to match the other packages. **/stories/*.story.@ instead of **/*.stories.@.
For example there's also a loader here that expects that naming convention, and maybe some other stuff too. It'll be simpler to stick with a single pattern.
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's change the naming convention of the story files to match the other packages.
**/stories/*.story.@instead of**/*.stories.@.
👍 Updated in 2266c4f.
| */ | ||
| import { ThemeProvider } from './theme-provider'; | ||
|
|
||
| const meta: Meta< typeof ThemeProvider > = { |
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.
No strong opinion on whether it needs to be added now, but I'll note that this is technically missing the stylesheet. If we were to add it, they're managed here.
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.
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.
To expand a bit, I'm also assuming we won't need separate LTR and RTL stylesheets because we intend to use logical properties exclusively, though I can also clarify this with an inline comment, and follow-up with more strict enforcement.
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 also clarify this with an inline comment
Added in 676665d
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.
follow-up with more strict enforcement.
Follow-up at #72758

What?
Adds Storybook stories for the
themepackage added in #72305Follow-up to #72305
Why?
This was a follow-up action noted in #72305
Storybook stories help provide visibility to this work, and will be important to demonstrate changes to the theme implementation.
Testing Instructions
Verify Storybook stories demonstrate theme functionality:
npm run storybook:dev