Skip to content

Admin bar: Fix WordPress.com logo alignment on WordPress 7.2 - #54616

Merged
fushar merged 1 commit into
trunkfrom
fix/admin-bar-wp-logo-svg-icon
Nov 6, 2026
Merged

fushar merged 1 commit into
trunkfrom
fix/admin-bar-wp-logo-svg-icon

Conversation

@fushar

@fushar fushar commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Fixes DOTCOM-19151

Proposed changes

  • Pass 'icon' => 'core-admin/wordpress' when replacing the wp-logo admin bar node, so the WordPress.com logo is vertically centered again on WordPress 7.2.
  • Why: Omnibar: Keep the wp-logo and site name icon working with the SVG admin bar icons of WordPress 7.2 #53835 relied on WordPress 7.2 turning the empty <span class="ab-icon"> in a node title into the .ab-icon.svg-icon slot. Core stopped modifying titles in r65223 and now only renders that slot from the new icon argument. Our logo was falling back to the 7.1 Dashicons path, which no longer gets core's 7.1 wp-logo sizing (padding: 6px 0 5px, top: 2px), so it sat about 4px too high.
  • On 7.2+ core renders the SVG slot, our existing mask ::before covers its SVG as before, and core hides the empty legacy span. WordPress 7.1 and older ignore the unknown icon argument and render exactly as before. Passing icon with the same title on every version is the pattern described in r65223.

Related product discussion/links

Does this pull request change what data or activity we track or use?

No.

Testing instructions

  • On a site running WordPress 7.2 (beta) with this change, open wp-admin and the site frontend.
  • Check that the WordPress.com logo at the top left of the admin bar is vertically centered and that no WordPress logo shows next to it.
  • Check the same at mobile width (≤782px) and on a phone-sized viewport (≤480px).
  • Repeat on a site running WordPress 7.1 and check that nothing changed.
  • Hover the logo and check that the WordPress.com submenu (Sites, Domains, …) still opens.

@github-actions

github-actions Bot commented Nov 6, 2026

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 Nov 6, 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/admin-bar-wp-logo-svg-icon branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack-mu-wpcom-plugin fix/admin-bar-wp-logo-svg-icon

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/wpcom-admin-bar/wpcom-admin-bar.php 157/336 (46.73%) 0.16% 0 💚

Full summary · PHP report · JS report

@fushar
fushar marked this pull request as ready for review November 6, 2026 13:26
@fushar fushar added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Nov 6, 2026
@fushar
fushar merged commit 80c6679 into trunk Nov 6, 2026
89 of 90 checks passed
@fushar
fushar deleted the fix/admin-bar-wp-logo-svg-icon branch November 6, 2026 13:47
@github-actions github-actions Bot removed the [Status] Needs Review This PR is ready for review. label Nov 6, 2026
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