Skip to content

Help Center: align/size the admin-bar Help icon consistently#50063

Draft
p-jackson wants to merge 1 commit into
trunkfrom
fix/mu-wpcom-help-center-icon-sizing
Draft

Help Center: align/size the admin-bar Help icon consistently#50063
p-jackson wants to merge 1 commit into
trunkfrom
fix/mu-wpcom-help-center-icon-sizing

Conversation

@p-jackson

Copy link
Copy Markdown
Member

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.

  • Tweak the inline SVG viewBox to absorb the icon's internal padding (desktop values live in markup):
    • #help-center-icon: 0 0 24 241.5 1.5 21 21
    • #help-center-icon-with-notification: 0 0 25 24-1 -1 26 26
  • Add an inline @media (max-width:782px) rule that scales each icon down (0.875 / 0.8667) to reproduce Calypso's mobile viewBox.
    • All four Calypso viewBoxes are concentric about the glyph centre (12,12), so the desktop↔mobile change is a pure centred zoom — reproducible exactly with transform: scale(). No markup duplication, no element-ID changes, no JS.
  • Glyph geometry is unchanged.

Calypso also removed a fixed width/height: 27px + padding override; Jetpack has no such override (the icon already sizes from its width/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

  • On an Atomic/Simple site (or a Jurassic Ninja site with this jetpack-mu-wpcom build), load a logged-in wp-admin page with the admin bar visible.
  • Desktop (>782px): confirm the Help (?) icon in the admin bar aligns/sizes consistently with the adjacent icons.
  • Resize to ≤782px: the icon scales down to its original (smaller) appearance and stays centred.
  • Unread variant: force #help-center-icon-with-notification visible (or trigger an unread state) and confirm the red notification dot stays correctly positioned at both widths.
  • Confirm no console errors and that the icon still toggles between the normal and unread states.

Note: in the block editor at ≥600px the icon is rendered by the external @automattic/help-center bundle (widgets.wp.com), not by this code — test in plain wp-admin where the inline SVG renders.

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.
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (WordPress.com Site Helper), and enable the fix/mu-wpcom-help-center-icon-sizing branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack-mu-wpcom-plugin fix/mu-wpcom-help-center-icon-sizing

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@jp-launch-control

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/packages/jetpack-mu-wpcom/src/features/help-center/class-help-center.php 79/331 (23.87%) -0.29% 4 💔

Full summary · PHP report · JS report

If appropriate, add one of these labels to override the failing coverage check: Covered by non-unit tests Use to ignore the Code coverage requirement check when E2Es or other non-unit tests cover the code Coverage tests to be added later Use to ignore the Code coverage requirement check when tests will be added in a follow-up PR I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant