Repository navigation
UI: Document the Avatar footprint of each size - #87892
Conversation
Consumers lay out content around the avatar against its outer footprint, which adds 3px for the activity ring. List the image size and footprint of each size, and test the footprint so the numbers stay accurate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🤖 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. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: 0 B Total Size: 8.85 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. As a user I want to be able to add multiple close buttons so that users can close the overlay from different positions in
|
List the dimension token of each size and the rule for the footprint, instead of pixel values, so the docs stay accurate if the tokens change. Remove the footprint test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The changelog validator expects Documentation to be the last Unreleased section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aduth
left a comment
There was a problem hiding this comment.
LGTM 👍 I think this will help set clearer expectations around its size. It does also create a bit of a "contract" and potential future burden for us if we change how this works (e.g. changing 3px, or the high-DPI focus ring width).
|
Yes, although I assume we'll log it as a change. I find that, without it, it may get harder for consumers to lay |
What?
Follow-up to #87841 (step 3).
Documents the dimension token behind each
Avatarsize, and how to compute the outer footprint from it.Why?
The
Avatarreserves 3px for the activity ring, so its footprint is larger than itssize. Consumers need the footprint to lay out content around the avatar, but the docs only said that the footprint "reserves room" for the ring. The collaborator UI in the editor is moving to thisAvatarand has to adjust its offsets to the new box.The footprint can't be exposed as a custom property on the
Avatar: a parent can't read a custom property that is set on its child. So the docs give the rule, in terms of tokens. If the token values change, the docs stay accurate.How?
The
sizeJSDoc now:xsto--wpds-dimension-size-2xs,sm,mdandlgto the matching--wpds-dimension-size-*, andxlto twice--wpds-dimension-size-md.calc(var(--wpds-dimension-size-sm) + 3px), and that it stays the same whether or not the avatar is active, at every display density.--wpds-border-width-focus.The 3px is a fixed value in the CSS: the ring at its high-DPI width (2 × 1.5px). It is not twice
--wpds-border-width-focus, which is 2px on standard-density screens.Testing Instructions
sizedescription should list the token of each size and the footprint rule.sm.Testing Instructions for Keyboard
No UI change.
Use of AI Tools
Written with Claude Code (Claude Opus 5.5), at my direction: Claude made the change and drafted this description.
🤖 Generated with Claude Code