Components: migrate Divider to SCSS module#79444
Conversation
9fbaf6d to
8b63082
Compare
|
Size Change: +438 B (+0.01%) Total Size: 7.51 MB 📦 View Changed
|
a786e87 to
b8417b4
Compare
|
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. |
|
Flaky tests detected in 3a1ad4a. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/28042817258
|
mirka
left a comment
There was a problem hiding this comment.
I smoke tested with both Divider and CardDivider. No regressions found.
There was a problem hiding this comment.
Kind of surprised how things got much simpler 😂
There was a problem hiding this comment.
Logical properties FTW + a lot of conditional logic implicitly converted to CSS selector matching + some of the code moved to the render function. Maybe I'm old fashioned, but I like the new version better.
5b01375 to
4bb58ff
Compare
3a1ad4a to
aa7435d
Compare
|
I have a few thoughts on this:
But for the sake of retaining the same behaviour as prior to the refactor (and to prevent scope creep), I will simply undo these changes, which should restore the original specificity. Restoring original specificity in #79534 |
This style was added at least six years ago. At that time, there was likely neither a design system nor a components/divider component, so that might have been the best approach back then. |
That will be also fixed by #79534 |


What?
Part of #66806
Migrates
Divideraway from Emotion to a local SCSS Module.Why?
Divideris one of the low-risk canary components for validating the SCSS Modules migration pattern before moving through more complex component families.How?
styles.tsfile withstyle.module.scss.components-dividerclass name from the context system.Internalchangelog entry.Testing Instructions
npm run format -- tools/eslint/suppressions.json.npm run lint:js -- packages/components/src/divider.npm run lint:css -- packages/components/src/divider/style.module.scss.npm run test:unit -- packages/components/src/divider/test/index.tsx.npx tsgo --noEmit -p packages/components/tsconfig.json.npm run lint:js -- packages/components/src --pass-on-unpruned-suppressions.Testing Instructions for Keyboard
Not applicable;
Divideris non-interactive and this PR preserves its existing rendering behavior.Screenshots or screencast
Not applicable; no visual change is intended.
Use of AI Tools
Drafted with assistance from ChatGPT/Codex. The changes were reviewed before opening this PR.