Skip to content

Admin: share the Jetpack logo mark between the masthead and the Akismet footer - #52694

Merged
xavier-lc merged 2 commits into
trunkfrom
change/share-chrome-logo-svg
Sep 23, 2026
Merged

xavier-lc merged 2 commits into
trunkfrom
change/share-chrome-logo-svg

Conversation

@xavier-lc

@xavier-lc xavier-lc commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Proposed changes

The green Jetpack mark was inlined as a raw SVG string in two neighbouring admin-chrome files, byte for byte identical in viewBox, fill and path data. This moves it to one Admin_Chrome_Logo::render() helper and has both call sites use it.

Height, class and accessible name genuinely differ per call site, so they become parameters rather than being flattened:

masthead Akismet footer
height 20 16
class none jp-akismet-logo
a11y role="img" aria-label="Jetpack logo" aria-hidden="true"

The a11y split is deliberate, not drift — the Akismet mark sits beside visible "Jetpack" text, so announcing it twice is noise. Passing no label is what makes the mark decorative.

The helper lives in src/ rather than on Jetpack_Admin_Page for the reason Footer_Links already documents: WordPress.com Simple declares its own stub of that class, and Akismet_Admin_Chrome runs there via Akismet_Admin_WPCOM.

Nothing renders differently. Attribute order is preserved so both call sites emit exactly the markup they emitted before, and a test pins those two exact strings so a future tidy-up of the attribute order fails loudly instead of silently changing output.

Not in scope

Per the issue: packages/logo is untouched (its emblem carries an id, no height, and no label hook, so it isn't a drop-in), as is the black footer mark in wrap_ui() and the ~12 JSX/other copies of the path data elsewhere in the monorepo.

Before / after

Admin_Chrome_Logo::render() has exactly two call sites, and the masthead one has two wrapper branches, so there are three distinct rendered outputs. All three are below. The page that calls wrap_ui() (Modules, About, Debug, Publicize, Stats) does not vary the logo, so those are the same three cases rather than extra ones.

Captured on a live Jurassic Ninja site at 1440×900, same window and same crop for every frame. "Before" is trunk; "after" is this branch. Only the plugin build changed between the two passes — site state was held constant, with the two masthead cases toggled by a query-param filter rather than by reconfiguring the site.

1. Masthead — My Jetpack available (logo wrapped in <a>)

Before After
before after

2. Masthead — My Jetpack unavailable (logo wrapped in <span>)

Before After
before after

3. Akismet settings footer (16px, decorative)

Before After
before after

These are pixel-identical, not just similar

Each pair has the same dimensions and the same SHA-256 over the decoded PNG pixel data:

Scenario Before After
Masthead, available 1566×131 652178cf1a2ec011 1566×131 652178cf1a2ec011 identical
Masthead, unavailable 1566×131 94fdd51eafc39a9c 1566×131 94fdd51eafc39a9c identical
Akismet footer 1568×108 6d07e099e4c3d0a8 1568×108 6d07e099e4c3d0a8 identical

And the DOM read live on each revision agrees:

Scenario Wrapper Logo <svg> attributes
Masthead, available A → A height="20" role="img" aria-label="Jetpack logo" — unchanged
Masthead, unavailable SPAN → SPAN height="20" role="img" aria-label="Jetpack logo" — unchanged
Akismet footer — height="16" class="jp-akismet-logo" aria-hidden="true" — unchanged

Related product discussion/links

JETPACK-2763. Surfaced while reviewing #52606, which hoisted the masthead copy into a variable and made the duplication visible.

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

No.

Testing instructions

The claim is that this changes nothing a user can see, so the useful test is proving that:

  1. Render the chrome on this branch and on trunk and compare. I did this on a live instance by rendering Jetpack_Admin_Page::wrap_ui() and Akismet_Admin_Chrome::render_footer() through wp eval-file on both revisions — 3813 bytes, byte-identical, covering the masthead and the Akismet footer.
  2. jp docker phpunit jetpack -- --filter='Admin_Chrome_Logo_Test|Akismet_Admin_Chrome_Test' → OK (14 tests, 44 assertions). Akismet_Admin_Chrome_Test exercises both real call sites; Admin_Chrome_Logo_Test covers labelled vs decorative, the omitted-when-empty class, per-caller height, and the two exact output strings.
  3. Visually: the Jetpack Modules masthead and the Akismet settings footer should be unchanged.

Gates run

  • jp docker phpunit jetpack (filtered) — 14 tests, 44 assertions, pass
  • jp phan plugins/jetpack — no issues outside test files
  • PHPCS on all touched files — no violations
  • php -l on all touched files — clean

…et footer

The same SVG was inlined in both files, byte for byte. Height, class and
accessible name differ per call site, so they become parameters.
@xavier-lc xavier-lc added [Status] In Progress [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Sep 23, 2026
@xavier-lc xavier-lc self-assigned this Sep 23, 2026
@github-actions

github-actions Bot commented Sep 23, 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 (Jetpack), and enable the change/share-chrome-logo-svg branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack change/share-chrome-logo-svg

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

@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!


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: October 6, 2026

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@jp-launch-control

jp-launch-control Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/plugins/jetpack/_inc/lib/admin-pages/class-akismet-admin-chrome.php 245/247 (99.19%) -0.00% 0 💚

1 file is newly checked for coverage.

File Coverage
projects/plugins/jetpack/src/class-admin-chrome-logo.php 7/7 (100.00%) 💚

Full summary · PHP report · JS report

@xavier-lc
xavier-lc marked this pull request as ready for review September 23, 2026 10:15
In this plugin "Chrome" on its own reads as the browser, so the old name
parsed as the Google Chrome logo. "Admin chrome" is the phrase the codebase
already uses for this UI, as in Akismet_Admin_Chrome.
@xavier-lc
xavier-lc merged commit 96ae691 into trunk Sep 23, 2026
81 checks passed
@xavier-lc
xavier-lc deleted the change/share-chrome-logo-svg branch September 23, 2026 10:55
@github-actions github-actions Bot added this to the jetpack/16.3 milestone Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant