Global Styles: Migrate shadows presets to use the preset management layer. - #79812
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. |
|
Size Change: +191 B (0%) Total Size: 7.82 MB 📦 View Changed
|
|
Flaky tests detected in 8c60253. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/30153193269
|
…lobal-styles-preset-migrate-shadows
…lobal-styles-preset-migrate-shadows
…lobal-styles-preset-migrate-shadows
…lobal-styles-preset-migrate-shadows
|
Since rebasing we were getting an ESLint failure coming from #80754, which added some components to the not-recommended denylist. For now I'm suppressing them (same as #80754 did) and I'll treat them separately so this PR doesn't grow in scope or risk. |
# Conflicts: # packages/global-styles-ui/src/confirm-reset-shadow-dialog.tsx # packages/global-styles-ui/src/shadows-edit-panel.tsx # packages/global-styles-ui/src/shadows-panel.tsx
|
Thanks a lot for the reviews George! |
…ayer. (#79812) * Migrate shadows presets to use the preset management layer. Co-authored-by: juanfra <juanfra@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Trunk's shadows preset migration (#79812) removed `confirm-reset-shadow-dialog.tsx`, which the text shadows screen still imported, breaking the TypeScript build. Rebuild `ScreenTextShadows` on the same `usePresets` + `PresetGroup` layer that `ShadowsPanel` now uses, which drops the local `TextShadowList` component and routes the reset confirmation through `presets/dialogs/confirm-reset-dialog`. Also drop the now single-use `__text-shadows-panel__options-container` selector in favour of the existing `__shadows-panel__options-container`, which `shadows-edit-panel.tsx` already uses for the same purpose. Co-Authored-By: Claude <noreply@anthropic.com>
What?
Built on top of #79810
Migrate the shadow presets to use the layer proposed in #79810. No functionality should be changing There may be a few minimal spacing changes due to the introduction of the recommended
Stackcomponent from@wordpres/ui. All strings stay unchanged.Why?
Adopts the new shared preset-management layer (#79810) to remove duplicated code between preset managers, and to make it cheaper to add the next preset screens (Spacing, Border Radius) on top of it.
How?
Migrating to use
<PresetGroup>,usePresets(),<PresetEditHeader>and the dialogs for renaming/deleting.Testing Instructions
Storybook
npm run storybook:devUse of AI Tools
Cursor/Claude