Repository navigation
Conversation
reserve one strip height; the browser test loads the theme tokens
🤖 PR meta 🤖📦 Bundle sizeSize Change: 0 B Total Size: 9.05 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. Regression: updating a specific option will only change its value and will not corrupt others in
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes #85231.
The widget footer strip now reserves one height, the text line plus its padding, whatever affordances it holds. A compact control sits centered in it, so tiles side by side keep their dividers level, and the body keeps its size when a widget declares an action at runtime.
Why
The strip took its height from its content: a text link is a 20px line and a compact control is 32px, so a footer with an icon-only link or a callback button was 12px taller than a footer of links. A runtime action arriving once the data settled grew the strip and shrank the body under the reader.
How
packages/widget-dashboard/src/components/widget-footer/widget-footer.module.cssThe strip trades its block padding for a
min-block-sizecomputed from the tokens,--wpds-typography-line-height-smplus twice--wpds-dimension-padding-md, and the row'salign="center"centers whatever it holds. A minimum rather than a fixed size keeps a wrapped row of links from overflowing the strip.packages/widget-dashboard/src/test/widget-footer.browser.test.tsxA browser test measures three strips, text links, a text link beside an icon-only link, and callback buttons, and expects one height; it then rerenders a strip with a compact action arriving and expects the height unchanged. The package declares
@wordpress/themeas a dev dependency so the test can load the design tokens.Story and docs
The Playground gains a
Footerstory with the three strips side by side. TheRuntimeActionsstory and the chrome anatomy doc note that the strip keeps its height.Testing
Open
Widgets/Dashboard/Playground→Footer: the three dividers sit at the same height and the bodies share one size. Run "Refresh" or the export button: the button disables while the promise settles and the strip does not move.Open
RuntimeActions: once the check settles, "Review 3 items" and the download button arrive without growing the strip or shrinking the body.