Theme: Add color warning diagnostics workbench - #81817
Conversation
|
Size Change: 0 B Total Size: 7.74 MB |
|
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. |
| seed.value, | ||
| ramp[ tokenName ] | ||
| ) | ||
| ? '3px dashed #996800' |
There was a problem hiding this comment.
switched to currentColor
| { | ||
| label: 'Coffee', | ||
| source: 'WordPress admin scheme', | ||
| background: '#5b534d', | ||
| primary: '#916745', | ||
| }, | ||
| { | ||
| label: 'Ectoplasm', | ||
| source: 'WordPress admin scheme', | ||
| background: '#4f386e', | ||
| primary: '#646c3e', | ||
| }, |
There was a problem hiding this comment.
We really need a central data source of all these theme constants, we've already had some issues with drift 😅 (Which is also weird because it seems like a simple string search & replace across the repo! Maybe we were unlucky with the merge timing of parallel PRs?)
There was a problem hiding this comment.
We do, although currently those schemes are defined in admin-ui
Do you think that's the best common place, since they're a WordPress app setting? Or should they be in the theme package?
We can iterate on this aspect in a follow-up once we have a clear direction
There was a problem hiding this comment.
@wordpress/base-styles would be a really natural place, if it's feasible to also start exposing a JS file.
8a9e91f to
162e950
Compare
162e950 to
4590f1f
Compare

Follow-up to #81185
See #81162
What?
Turns the existing ThemeProvider Color Scales stories into a Storybook workbench for
onColorWarnings, including the #81162 reproduction and WordPress admin schemes.Why?
ThemeProvider color warnings were not visible in Storybook. This provides one comparison surface for the later #81162 ramp-construction work.
How?
Each sample renders a real
ThemeProviderand stores its warnings locally. The stories map warnings back to affected ramp steps, show compact details, and mark adjusted seed anchors with a dashedSEED ≠outline. Production behavior is unchanged.Testing Instructions
npm run storybook:devand open Theme Provider → Color Scales → Default.#608010and background to#4f386e; confirm the warning report updates.SEED ≠markers.Testing Instructions for Keyboard
Change the Default story colors with the keyboard and confirm the labeled results update without relying on color alone.
Screenshots
Use of AI Tools
Codex was used to implement, verify, and self-review this change.