Skip to content

Commit edcb467

Browse files
simisonmatticbot
authored andcommitted
Fix sidebar free upsell color on problematic admin color schemes (#47903)
--------- Co-authored-by: Christian Gastrell <cgastrell@gmail.com> Co-authored-by: Brad Jorsch <anomiex@users.noreply.github.com> Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/23916944627 Upstream-Ref: Automattic/jetpack@a81bff1
1 parent c70af3e commit edcb467

File tree

11 files changed

+97
-76
lines changed

11 files changed

+97
-76
lines changed

jetpack_vendor/automattic/jetpack-admin-ui/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ This is an alpha version! The changes listed here are not final.
1212
### Added
1313
- Add "Upgrade Jetpack" menu item for free users in the Jetpack admin menu.
1414

15+
### Fixed
16+
- Fix upgrade menu item color on problematic admin color schemes and add build pipeline for CSS assets.
17+
1518
## [0.6.0] - 2026-03-30
1619
### Changed
1720
- Sidebar: Change "Anti-spam" to "Akismet Anti-spam". [#47834]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php return array('dependencies' => array(), 'version' => '8c258eaa3f2213b901e4');

jetpack_vendor/automattic/jetpack-admin-ui/build/admin-ui-upgrade-menu.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jetpack_vendor/automattic/jetpack-admin-ui/build/admin-ui-upgrade-menu.js

Whitespace-only changes.

jetpack_vendor/automattic/jetpack-admin-ui/build/admin-ui-upgrade-menu.rtl.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jetpack_vendor/automattic/jetpack-admin-ui/composer.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
]
2525
},
2626
"scripts": {
27+
"build-development": [
28+
"pnpm run build"
29+
],
30+
"build-production": [
31+
"pnpm run build-production"
32+
],
2733
"phpunit": [
2834
"phpunit-select-config phpunit.#.xml.dist --colors=always"
2935
],

jetpack_vendor/automattic/jetpack-admin-ui/src/class-admin-menu.php

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ class Admin_Menu {
1616
const PACKAGE_VERSION = '0.7.0-alpha';
1717

1818
/**
19-
* Redirect source slug used as the upgrade URL identifier and CSS class.
19+
* Slug used for the upgrade menu item and redirect URL.
20+
*
21+
* Keep the slug in sync with `$upgrade-menu-slug` at admin-ui-upgrade-menu.scss
2022
*
2123
* @var string
2224
*/
@@ -54,7 +56,7 @@ public static function init() {
5456
self::handle_akismet_menu();
5557
add_action( 'admin_menu', array( __CLASS__, 'admin_menu_hook_callback' ), 1000 ); // Jetpack uses 998.
5658
add_action( 'network_admin_menu', array( __CLASS__, 'admin_menu_hook_callback' ), 1000 ); // Jetpack uses 998.
57-
add_action( 'admin_head', array( __CLASS__, 'add_upgrade_menu_item_styles' ) );
59+
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'add_upgrade_menu_item_styles' ) );
5860
}
5961
}
6062

@@ -345,25 +347,26 @@ private static function maybe_add_upgrade_menu_item() {
345347
}
346348

347349
/**
348-
* Outputs inline CSS to style the "Upgrade Jetpack" menu item in Jetpack green.
350+
* Enqueues admin styles for the "Upgrade Jetpack" menu item.
349351
*
350-
* The sidebar menu is visible on every admin page, so styles must load globally.
351-
* Only outputs for free-plan sites on self-hosted installs.
352+
* The sidebar menu is visible on every admin page, so styles load globally.
353+
* Only enqueues for free-plan sites on self-hosted installs.
352354
*
353355
* @return void
354356
*/
355357
public static function add_upgrade_menu_item_styles() {
356358
if ( ! self::should_show_upgrade_menu() ) {
357359
return;
358360
}
359-
?>
360-
<style>
361-
#adminmenu li.<?php echo esc_attr( self::UPGRADE_MENU_SLUG ); ?> > a,
362-
#adminmenu li.<?php echo esc_attr( self::UPGRADE_MENU_SLUG ); ?> > a:hover {
363-
color: #069e08 !important;
364-
font-weight: 600;
365-
}
366-
</style>
367-
<?php
361+
362+
$asset_file = dirname( __DIR__ ) . '/build/admin-ui-upgrade-menu.asset.php';
363+
$asset = file_exists( $asset_file ) ? require $asset_file : array();
364+
365+
wp_enqueue_style(
366+
'jetpack-admin-ui-upgrade-menu',
367+
plugins_url( '../build/admin-ui-upgrade-menu.css', __FILE__ ),
368+
$asset['dependencies'] ?? array(),
369+
$asset['version'] ?? self::PACKAGE_VERSION
370+
);
368371
}
369372
}

jetpack_vendor/i18n-map.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
'packages' => array(
77
'jetpack-admin-ui' => array(
88
'path' => 'jetpack_vendor/automattic/jetpack-admin-ui',
9-
'ver' => '0.7.0-alpha1775067928',
9+
'ver' => '0.7.0-alpha1775156303',
1010
),
1111
'jetpack-assets' => array(
1212
'path' => 'jetpack_vendor/automattic/jetpack-assets',

vendor/composer/installed.json

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"dist": {
88
"type": "path",
99
"url": "/tmp/jetpack-build/Automattic/jetpack-a8c-mc-stats",
10-
"reference": "7cd23eb50c7419f98a9889506be957886eb55f26"
10+
"reference": "bb3833a328514514103ae50ab05b623054fbcbca"
1111
},
1212
"require": {
1313
"php": ">=7.2"
@@ -59,12 +59,12 @@
5959
},
6060
{
6161
"name": "automattic/jetpack-admin-ui",
62-
"version": "0.7.0-alpha.1775067928",
63-
"version_normalized": "0.7.0.0-alpha1775067928",
62+
"version": "0.7.0-alpha.1775156303",
63+
"version_normalized": "0.7.0.0-alpha1775156303",
6464
"dist": {
6565
"type": "path",
6666
"url": "/tmp/jetpack-build/Automattic/jetpack-admin-ui",
67-
"reference": "43ecb6d1870252ede52fd40cd81526435a053852"
67+
"reference": "1f45aee394cf69635f95a6ee18c2dd486d878510"
6868
},
6969
"require": {
7070
"automattic/jetpack-redirect": "^3.0.9",
@@ -103,6 +103,12 @@
103103
]
104104
},
105105
"scripts": {
106+
"build-development": [
107+
"pnpm run build"
108+
],
109+
"build-production": [
110+
"pnpm run build-production"
111+
],
106112
"phpunit": [
107113
"phpunit-select-config phpunit.#.xml.dist --colors=always"
108114
],
@@ -129,7 +135,7 @@
129135
"dist": {
130136
"type": "path",
131137
"url": "/tmp/jetpack-build/Automattic/jetpack-assets",
132-
"reference": "55557738667264238384da3c213ed1323fec1710"
138+
"reference": "96bca7efb40723f2de253e3625ec40375f2ebb62"
133139
},
134140
"require": {
135141
"automattic/jetpack-constants": "^3.0.8",
@@ -203,7 +209,7 @@
203209
"dist": {
204210
"type": "path",
205211
"url": "/tmp/jetpack-build/Automattic/jetpack-autoloader",
206-
"reference": "d83f148a654a0631d4117d08bdef6e8b6d2526fe"
212+
"reference": "625a63e1247d06ffd6b37beb229c333ac0b36b31"
207213
},
208214
"require": {
209215
"composer-plugin-api": "^2.2",
@@ -275,7 +281,7 @@
275281
"dist": {
276282
"type": "path",
277283
"url": "/tmp/jetpack-build/Automattic/jetpack-boost-core",
278-
"reference": "1e9a9e52f966ba6d4b0f3d900b4394cbc5f0f39d"
284+
"reference": "9c795f77ec7e9dc26af3ec1ca0a89934db1c3632"
279285
},
280286
"require": {
281287
"automattic/jetpack-connection": "^8.2.0-alpha",
@@ -334,7 +340,7 @@
334340
"dist": {
335341
"type": "path",
336342
"url": "/tmp/jetpack-build/Automattic/jetpack-boost-speed-score",
337-
"reference": "e51e84bac8822670c868299cc29d22b47c4e31a1"
343+
"reference": "5ed7c3a5752aa3cb75e3a49eeb6cc75fc033669b"
338344
},
339345
"require": {
340346
"automattic/jetpack-boost-core": "^0.4.3",
@@ -402,7 +408,7 @@
402408
"dist": {
403409
"type": "path",
404410
"url": "/tmp/jetpack-build/Automattic/jetpack-composer-plugin",
405-
"reference": "431b6f649d8a75b546c8ba6dab4194b7834db3dd"
411+
"reference": "c9df64b2a368d1dd220c9a356e020190f90c2a34"
406412
},
407413
"require": {
408414
"composer-plugin-api": "^2.2",
@@ -466,7 +472,7 @@
466472
"dist": {
467473
"type": "path",
468474
"url": "/tmp/jetpack-build/Automattic/jetpack-config",
469-
"reference": "816729ee87ed4eaa3b92108fb6b63edc0a38c2fe"
475+
"reference": "d21a1e0b94d018896eefd43ec274de8b83db6c81"
470476
},
471477
"require": {
472478
"php": ">=7.2"
@@ -541,7 +547,7 @@
541547
"dist": {
542548
"type": "path",
543549
"url": "/tmp/jetpack-build/Automattic/jetpack-connection",
544-
"reference": "d4e181d3866c2802ef8aa0238d132411d6e9c881"
550+
"reference": "5b43a569a4158443b53915e99a40a8ad0c58334f"
545551
},
546552
"require": {
547553
"automattic/jetpack-a8c-mc-stats": "^3.0.5",
@@ -629,7 +635,7 @@
629635
"dist": {
630636
"type": "path",
631637
"url": "/tmp/jetpack-build/Automattic/jetpack-constants",
632-
"reference": "0f4ede1c80e59057b4d75dd92952001e314bcf91"
638+
"reference": "99cbf30d56c1fede5661f4273444a249242ad25d"
633639
},
634640
"require": {
635641
"php": ">=7.2"
@@ -687,7 +693,7 @@
687693
"dist": {
688694
"type": "path",
689695
"url": "/tmp/jetpack-build/Automattic/jetpack-device-detection",
690-
"reference": "2e2619f853f16040a46d606a105bc5c5a70df49e"
696+
"reference": "4b9fda2456cbb7cdf9258722f13094c5ce2505b4"
691697
},
692698
"require": {
693699
"php": ">=7.2"
@@ -744,7 +750,7 @@
744750
"dist": {
745751
"type": "path",
746752
"url": "/tmp/jetpack-build/Automattic/jetpack-explat",
747-
"reference": "00c198bfce1c06a4a32d752dd0ecda15db77da17"
753+
"reference": "aa5c7c43b3f7bb7264d7c412600b3470a2f0ea73"
748754
},
749755
"require": {
750756
"automattic/jetpack-connection": "^8.2.0-alpha",
@@ -823,7 +829,7 @@
823829
"dist": {
824830
"type": "path",
825831
"url": "/tmp/jetpack-build/Automattic/jetpack-ip",
826-
"reference": "96d96442d3132b7653c3805aea6606d9bb6ca0fd"
832+
"reference": "28329b20311039e504096faf0d5584ae2a2a3ef1"
827833
},
828834
"require": {
829835
"php": ">=7.2"
@@ -885,7 +891,7 @@
885891
"dist": {
886892
"type": "path",
887893
"url": "/tmp/jetpack-build/Automattic/jetpack-jitm",
888-
"reference": "749012627e30afcb9738291dde0ddaee939e9bf1"
894+
"reference": "f6540fbce9f4db768964831d461a0f2197350ff7"
889895
},
890896
"require": {
891897
"automattic/jetpack-a8c-mc-stats": "^3.0.5",
@@ -964,7 +970,7 @@
964970
"dist": {
965971
"type": "path",
966972
"url": "/tmp/jetpack-build/Automattic/jetpack-licensing",
967-
"reference": "9669ccc88e66f7e04eb27d48572049515bb9e9a9"
973+
"reference": "32aad30ae7a0dd209c6399df684d2be212acc469"
968974
},
969975
"require": {
970976
"automattic/jetpack-connection": "^8.2.0-alpha",
@@ -1024,7 +1030,7 @@
10241030
"dist": {
10251031
"type": "path",
10261032
"url": "/tmp/jetpack-build/Automattic/jetpack-logo",
1027-
"reference": "5e24c5621351426f1e274aea8391e1bb8e7af709"
1033+
"reference": "aa1e92e85f11b750c301386dd19a9816852b4f4d"
10281034
},
10291035
"require": {
10301036
"php": ">=7.2"
@@ -1081,7 +1087,7 @@
10811087
"dist": {
10821088
"type": "path",
10831089
"url": "/tmp/jetpack-build/Automattic/jetpack-my-jetpack",
1084-
"reference": "0323bfc116e25553b0de783908a09792e5487bd2"
1090+
"reference": "fb18f2151b133cd9bf7532293c70f7e7e7a70388"
10851091
},
10861092
"require": {
10871093
"automattic/jetpack-admin-ui": "^0.7.0-alpha",
@@ -1185,7 +1191,7 @@
11851191
"dist": {
11861192
"type": "path",
11871193
"url": "/tmp/jetpack-build/Automattic/jetpack-password-checker",
1188-
"reference": "d3ef75564d80a9651b815c301136353a23370307"
1194+
"reference": "015aae11c66776432bf150bbfc86934835079e07"
11891195
},
11901196
"require": {
11911197
"php": ">=7.2"
@@ -1244,7 +1250,7 @@
12441250
"dist": {
12451251
"type": "path",
12461252
"url": "/tmp/jetpack-build/Automattic/jetpack-plans",
1247-
"reference": "1a52f2d859a989ff888d51774d0e354204a5f463"
1253+
"reference": "7807c9bcbd476f179d27eb6a1b39a5cce0dd645b"
12481254
},
12491255
"require": {
12501256
"automattic/jetpack-connection": "^8.2.0-alpha",
@@ -1310,7 +1316,7 @@
13101316
"dist": {
13111317
"type": "path",
13121318
"url": "/tmp/jetpack-build/Automattic/jetpack-plugins-installer",
1313-
"reference": "3d991923af7a1ef3ff304517d4a7a36084490b7c"
1319+
"reference": "1506ae0f5a7ee0ed1062a9e4c6e16c7aaa9a7f30"
13141320
},
13151321
"require": {
13161322
"automattic/jetpack-a8c-mc-stats": "^3.0.5",
@@ -1370,7 +1376,7 @@
13701376
"dist": {
13711377
"type": "path",
13721378
"url": "/tmp/jetpack-build/Automattic/jetpack-protect-models",
1373-
"reference": "e00f4345e0c8c027cde7b9734c718eb891c3df25"
1379+
"reference": "0cd87a66ea1aa6b925a53df8266105ebae3755a1"
13741380
},
13751381
"require": {
13761382
"automattic/jetpack-redirect": "^3.0.9",
@@ -1439,7 +1445,7 @@
14391445
"dist": {
14401446
"type": "path",
14411447
"url": "/tmp/jetpack-build/Automattic/jetpack-protect-status",
1442-
"reference": "18b6ca1aa8a579004d5a48a2a1f6c63c45fccf2f"
1448+
"reference": "8d3e350bd72974cf40cc51d1d7e2c9aa5c7a8439"
14431449
},
14441450
"require": {
14451451
"automattic/jetpack-connection": "^8.2.0-alpha",
@@ -1512,7 +1518,7 @@
15121518
"dist": {
15131519
"type": "path",
15141520
"url": "/tmp/jetpack-build/Automattic/jetpack-redirect",
1515-
"reference": "29d1b27097ba5469ba96311c0569f15621c26e12"
1521+
"reference": "364f41cd95976e49b672a9c615b7c5acfad5b408"
15161522
},
15171523
"require": {
15181524
"automattic/jetpack-status": "^6.1.2",
@@ -1571,7 +1577,7 @@
15711577
"dist": {
15721578
"type": "path",
15731579
"url": "/tmp/jetpack-build/Automattic/jetpack-roles",
1574-
"reference": "6282fa0486b9aa62ff4d94e2675163e2406e25cf"
1580+
"reference": "8359d71924b5934b050336454b99a2bb5ea42271"
15751581
},
15761582
"require": {
15771583
"php": ">=7.2"
@@ -1629,7 +1635,7 @@
16291635
"dist": {
16301636
"type": "path",
16311637
"url": "/tmp/jetpack-build/Automattic/jetpack-search",
1632-
"reference": "964060c6a349d5436928bc67d8ef09fbee9339d0"
1638+
"reference": "8ddcd419f98579374a9aa39ffacc569b2afcf1b3"
16331639
},
16341640
"require": {
16351641
"automattic/jetpack-assets": "^4.3.30",
@@ -1715,7 +1721,7 @@
17151721
"dist": {
17161722
"type": "path",
17171723
"url": "/tmp/jetpack-build/Automattic/jetpack-stats",
1718-
"reference": "0fefed85a9b59ccd4782a4d1d8bf968cd0f4adb0"
1724+
"reference": "ff88dadd8e19a8d0bec525dd5ee26ae45dbc8210"
17191725
},
17201726
"require": {
17211727
"automattic/jetpack-connection": "^8.2.0-alpha",
@@ -1785,7 +1791,7 @@
17851791
"dist": {
17861792
"type": "path",
17871793
"url": "/tmp/jetpack-build/Automattic/jetpack-status",
1788-
"reference": "2e0f2540033012cd44bb8130972f997771c57477"
1794+
"reference": "52e5714be16483e2d98dc5a83a3d9ded53fbe43a"
17891795
},
17901796
"require": {
17911797
"automattic/jetpack-constants": "^3.0.8",
@@ -1853,7 +1859,7 @@
18531859
"dist": {
18541860
"type": "path",
18551861
"url": "/tmp/jetpack-build/Automattic/jetpack-sync",
1856-
"reference": "1d2806af5687a25fc7b53a700f218c8715f5b8a6"
1862+
"reference": "2fd23b5b3ac2c420c42df4e1312adca7b1b4d2bf"
18571863
},
18581864
"require": {
18591865
"automattic/jetpack-connection": "^8.2.0-alpha",

0 commit comments

Comments
 (0)