Admin UI: Update Page background color#76548
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. |
Does |
|
@ciampo I don't think they're wrapped in ThemeProvider: gutenberg/routes/font-list/stage.tsx Line 76 in e6ec896 Variable resolves to |
|
I can see a Which is likely the cause for the From a quick search, I can see in fact two places in the gutenberg/packages/boot/src/components/root/index.tsx Lines 141 to 143 in ded37b3 gutenberg/packages/boot/src/components/root/single-page.tsx Lines 58 to 60 in ded37b3 So things are working as expected (the |
|
@CGastrell how does this change manifest in the Site Editor (Appearance → Editor)? I'm guessing the Styles section is affected. |
|
@jameskoster I'm assuming we could go ahead with the background color coming from component instead and remove the fixed |
2a2b05a to
46d5752
Compare
ciampo
left a comment
There was a problem hiding this comment.
Nothing to note, code-wise. I'll let y'all decide whether you want to go ahead with this, also in the light of the fact that the actual background color is dictated by parent ThemeProvider instances.
|
@simison I was mostly concerned about any unintentional affects in the site editor or other existing pages. I think the DataViews pages will be fine since DataViews itself sets a background color. But the Styles page doesn't, so I assume that will look different, and we'd need to apply a background to something like I think the change is fine, I'm just not sure we should be updating the visual design of existing pages. That might be better handled separately? |
|
I'm surprised to see this. As far as I was aware, we were trying to move the opposite direction in core itself to align with the rest of the site editor etc and use white as the background. Lots of elements such as notices etc don't look good on the off white backdrop. |
|
My understanding is that for the wider admin redesign we want content within the page to be contained in an element that has a lighter (white) background, e.g. a Card or a DataView, but that the page background itself should have slightly darker luminance. See this story as a crude example. |
|
@fabiankaegy, like @jameskoster notes, in practise most current pages end up fully white. Full-width DataViews is a good example, and editors are another. On settings pages with Cards, which Connectors and Fonts are likely best current examples, we should make them look "less flat," where everything is just white at the same "level". That's best done in separate PRs. |
Wouldn't you say what's needed there is that the action items/menus surfaces need to stand out? Meaning, it's not the BG color that's wrong, it should be the actionable surfaces that need visual contrast/raising. BTW, can't open those files, they seem to have come from some private user content. I can see the thumbnails on your response, but can't open full size. |
Arguably yes, but that decision needs broader design input. It’s not something we should resolve within the scope of this PR. For now I think it would be simpler to align stylistically with trunk then revisit this detail later. |
46d5752 to
997a3cc
Compare
|
I agree with Jay, as-is this can't land with a white page header and gray page background. But that doesn't mean this becomes indefinitely blocked. The thing to solve for is agree on our surfaces and their properties, and past exercises have suggested that "the frame" is a single surface. That means it has a single color. So this mostly needs a decision: are pages gray in background, or white? I recognize that #76448 provides a visual argument for why the frame has two surfaces, the page header being one that floats on top of it. But for the same reasons as Fabian suggests, this hasn't been the direction the core project has moved. So that split is hard for me to support, even though I very much appreciate the PR here. But is it possible to find agreement on a single color for both? Can we simply adopt a shade of gray rather than white, for the frame surface as a whole? IMO if it's the right one, we absolutely can. The following is a different shade of gray of an older unrelated sketch, but it also features a frame surface as well as settings page componentry, and with high enough contrast to feel intentional.
|
My understanding is that is the preferred direction—matching Page + Header background ( |
avoids invisible icon background when rendered on Page surfaces after #76548
* add EmptyState component to @wordpress/ui compound component with Root, Visual, Icon, Title, Description, Actions * add EmptyState unit tests * add EmptyState stories * align EmptyState with @wordpress/ui conventions remove docblock comments, use semantic CSS tokens * fix code review feedback on EmptyState component use _Icon import convention, remove CSS var() spacing * use neutral-weak bg for EmptyState icon avoids invisible icon background when rendered on Page surfaces after #76548 * move max-width to EmptyState root with token replaces hardcoded 350px on description with --wpds-dimension-surface-width-sm on container * use Text component for EmptyState title and description delegates typography styles to Text variants instead of manual font-size/weight/line-height declarations
|
These are all fine arguments and, as a visual refinement/decision, I think there's no actual rush, some of the scopes might be currently out of my reach. I keep wondering though, if this value is something that can be set up from ThemeProvider, the scope of the consensus can stick only to the "default" value context, hence we're not forcing or twisting things per se, but merely set how things look "out of the box". |
|
@CGastrell I think the concern is that this PR indirectly changes the design of an existing feature in an unintentional way. Ideally that should be discussed in a dedicated issue/PR. So I think the action item is just to maintain the existing background color, with a TODO to revisit later. WDYT? |
Use --wpds-color-bg-surface-neutral instead of --wpds-color-bg-surface-neutral-strong for the Page background, giving it a subtle off-white instead of pure white. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Keep the existing --wpds-color-bg-surface-neutral-strong value to avoid unintentional design changes to existing pages (e.g. Styles). The lighter background can be revisited once those pages handle the contrast change. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
997a3cc to
54abdac
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sounds good. I just left a TODO comment there with a (self referencing) link to this PR for more context. Thanks! While this turns the PR into a no-op, it's good to have a reminder there with some context. |
|
@CGastrell I think you mis-interpreted my message, apologies for not being clearer. We should apply the change we want at the component level, IE update |
* add EmptyState component to @wordpress/ui compound component with Root, Visual, Icon, Title, Description, Actions * add EmptyState unit tests * add EmptyState stories * align EmptyState with @wordpress/ui conventions remove docblock comments, use semantic CSS tokens * fix code review feedback on EmptyState component use _Icon import convention, remove CSS var() spacing * use neutral-weak bg for EmptyState icon avoids invisible icon background when rendered on Page surfaces after #76548 * move max-width to EmptyState root with token replaces hardcoded 350px on description with --wpds-dimension-surface-width-sm on container * use Text component for EmptyState title and description delegates typography styles to Text variants instead of manual font-size/weight/line-height declarations
* Admin UI: Update Page background color to use neutral surface token Use --wpds-color-bg-surface-neutral instead of --wpds-color-bg-surface-neutral-strong for the Page background, giving it a subtle off-white instead of pure white. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Revert page background color change, add TODO to revisit Keep the existing --wpds-color-bg-surface-neutral-strong value to avoid unintentional design changes to existing pages (e.g. Styles). The lighter background can be revisited once those pages handle the contrast change. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add PR reference to TODO comment Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* add EmptyState component to @wordpress/ui compound component with Root, Visual, Icon, Title, Description, Actions * add EmptyState unit tests * add EmptyState stories * align EmptyState with @wordpress/ui conventions remove docblock comments, use semantic CSS tokens * fix code review feedback on EmptyState component use _Icon import convention, remove CSS var() spacing * use neutral-weak bg for EmptyState icon avoids invisible icon background when rendered on Page surfaces after #76548 * move max-width to EmptyState root with token replaces hardcoded 350px on description with --wpds-dimension-surface-width-sm on container * use Text component for EmptyState title and description delegates typography styles to Text variants instead of manual font-size/weight/line-height declarations
* Admin UI: Update Page background color to use neutral surface token Use --wpds-color-bg-surface-neutral instead of --wpds-color-bg-surface-neutral-strong for the Page background, giving it a subtle off-white instead of pure white. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Revert page background color change, add TODO to revisit Keep the existing --wpds-color-bg-surface-neutral-strong value to avoid unintentional design changes to existing pages (e.g. Styles). The lighter background can be revisited once those pages handle the contrast change. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add PR reference to TODO comment Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>





See design convo #76709
Part of #76448
What?
Updates the Page component background color from
--wpds-color-bg-surface-neutral-strong(#ffffff) to--wpds-color-bg-surface-neutral(#f8f8f8), giving the page a subtle off-white background instead of pure white.Before:

After:
Why?
As discussed in #76448, the page background should not be pure white. The design token currently resolves to
#f8f8f8; a separate effort to update the token value to#fcfcfcis being tracked independently.How?
Single token swap in
packages/admin-ui/src/page/style.scss. The header retains--wpds-color-bg-surface-neutral-strong(white) for visual separation.Testing Instructions
PagecomponentNOTE: since this PR branches out from #76467 test can be done by running
npm run storybook:devand checking the Page componentKeyboard Testing
No keyboard-specific changes.
This PR depends on #76467 for Storybook stories.
Part of #76448.
🤖 Generated with Claude Code