Help Center: align/size the admin-bar Help icon consistently#50063
Help Center: align/size the admin-bar Help icon consistently#50063p-jackson wants to merge 1 commit into
Conversation
Port wp-calypso#111737: tweak SVG viewBox (desktop values in markup) and scale down at <=782px to reproduce the mobile viewBox. Concentric viewBoxes make a centered CSS scale exact, so no markup/ID changes or JS.
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Code Coverage SummaryCoverage changed in 1 file.
Full summary · PHP report · JS report If appropriate, add one of these labels to override the failing coverage check:
Covered by non-unit tests
|
Fixes #
Proposed changes
Ports wp-calypso#111737 to Jetpack's WordPress.com admin-bar Help Center icon (
jetpack-mu-wpcom), so the Help (?) glyph aligns and sizes consistently with the other admin-bar icons.viewBoxto absorb the icon's internal padding (desktop values live in markup):#help-center-icon:0 0 24 24→1.5 1.5 21 21#help-center-icon-with-notification:0 0 25 24→-1 -1 26 26@media (max-width:782px)rule that scales each icon down (0.875/0.8667) to reproduce Calypso's mobileviewBox.transform: scale(). No markup duplication, no element-ID changes, no JS.Calypso also removed a fixed
width/height: 27px+ padding override; Jetpack has no such override (the icon already sizes from itswidth/height="24"SVG attributes), so there's no analog to remove.Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
jetpack-mu-wpcombuild), load a logged-in wp-admin page with the admin bar visible.#help-center-icon-with-notificationvisible (or trigger an unread state) and confirm the red notification dot stays correctly positioned at both widths.Note: in the block editor at ≥600px the icon is rendered by the external
@automattic/help-centerbundle (widgets.wp.com), not by this code — test in plain wp-admin where the inline SVG renders.