Repository navigation
Conversation
🤖 PR meta 🤖🎉 PropsIf 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. Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: 0 B Total Size: 8.3 MB
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. pushes earlier threads above the canvas to keep the selected one aligned in
|
16ff0e9 to
50a4473
Compare
50a4473 to
d61a3e1
Compare
b2e2cbd to
053a2fc
Compare
053a2fc to
ed52ab4
Compare
c4ddfb2 to
2c8393f
Compare
8ffb370 to
49cccdf
Compare
2c8393f to
e41af0a
Compare
Maps admin notices onto the React `Notice`, whose styles are already expressed entirely in tokens. The admin's tone classes correspond one to one with its variants, so `.notice-success` takes the success surface, border and text colours, and so on for warning, error and info. A notice with no tone class takes the neutral surface. The visible change is how tone is carried. WordPress signals it with a 4px bar on the leading edge over a white or near-white background; the design system uses a full hairline border, a tinted surface and tinted text, with a rounded corner. That is a change of idiom rather than a value swap, and the bar is the most recognisable part of a WordPress notice today. `.updated` and `.error` are covered alongside `.notice`, matching what WordPress does, because a great many plugins still emit them. `div.error` is qualified by element exactly as WordPress qualifies it, so a bare `.error` used for field validation is not caught. Notice paragraphs no longer add their own outer margins. WordPress gives them `margin: 0.5em 0`, which stacks on the notice's padding and makes a single-line notice 13px taller than the padding asks for. Removing the first and last margins lets the padding alone define the box, matching the design system; margins between paragraphs are kept, since a notice with two paragraphs still needs them. The dismiss button now inherits the notice's tone rather than being fixed black, and takes an outline focus ring in place of the box-shadow one. Its glyph is a dashicons font character rather than an image, so colour applies directly and no masking is needed. Margin and position are left to WordPress, which sets them contextually. Padding is set here as part of the notice's appearance, so the three contextual padding overrides outside the Customizer are repeated to keep them from being flattened: the file editor sidebar, plugin dependency cards, and inline-edit errors are all deliberately tighter than a standalone notice. The parity harness gains every tone, the legacy classes, and a dismissible notice. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A dismissible notice was 7px taller than a plain one, with its text off centre. The dismiss button is appended after the last paragraph, so that paragraph was no longer `:last-child` and kept its bottom margin. It is now matched when it is followed only by the button. The notice's padding also flattened common.css's `padding-right: 48px` on dismissible notices, which would let long text run under the button. The same room is now reserved from the notice's own padding. The button is centred on the first line of text, which keeps it aligned at every size common.css gives it, and inset so the space right of the glyph matches the space left of the text. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
e41af0a to
54bf498
Compare
Stacked on #82425 and part of the same off-by-default experiment.
This PR updates WordPress notices to use WPDS tokens: colour spacing, radius. The goal is the same: reduce the surface area of WordPress, and in the process discovering inconsistencies, bugs, regressions, and issues to fix in both directions.
The parent PR is the main part of the experiment that leverages the benefits of a single set of tokens for maintainabillity. This builds upon the same, but makes slight visual changes. Where an existing notice has a left border, this is a tinted surface with a border all around.
In this notice effort, a few improvements to do were found along the way:
What this is not
Testing instructions
Use of AI Tools
Claude Opus 5.