From 2cfa7fabadf40adca915b1c7fe91e13a95b8e53c Mon Sep 17 00:00:00 2001 From: Ashar Fuadi Date: Thu, 18 Jul 2024 10:17:32 +0700 Subject: [PATCH 1/2] Admin Bar: Make it consistent between Calypso and WP Admin regardless of the value of Admin Interface Style This reverts commit d88fc410325e13ed3e164f20661bc83594d05609. --- .../packages/jetpack-mu-wpcom/changelog/feat-unify-masterbar | 4 ++++ .../src/features/wpcom-admin-bar/wpcom-admin-bar.php | 4 +--- projects/packages/masterbar/changelog/feat-unify-masterbar | 4 ++++ projects/packages/masterbar/composer.json | 2 +- projects/packages/masterbar/package.json | 2 +- .../src/admin-color-schemes/class-admin-color-schemes.php | 2 +- .../masterbar/src/admin-menu/class-base-admin-menu.php | 4 ++-- projects/packages/masterbar/src/class-main.php | 4 ++-- projects/plugins/jetpack/changelog/feat-unify-masterbar | 5 +++++ projects/plugins/jetpack/composer.lock | 4 ++-- .../plugins/mu-wpcom-plugin/changelog/feat-unify-masterbar | 5 +++++ projects/plugins/mu-wpcom-plugin/composer.lock | 4 ++-- projects/plugins/wpcomsh/changelog/feat-unify-masterbar | 5 +++++ projects/plugins/wpcomsh/composer.lock | 4 ++-- 14 files changed, 37 insertions(+), 16 deletions(-) create mode 100644 projects/packages/jetpack-mu-wpcom/changelog/feat-unify-masterbar create mode 100644 projects/packages/masterbar/changelog/feat-unify-masterbar create mode 100644 projects/plugins/jetpack/changelog/feat-unify-masterbar create mode 100644 projects/plugins/mu-wpcom-plugin/changelog/feat-unify-masterbar create mode 100644 projects/plugins/wpcomsh/changelog/feat-unify-masterbar diff --git a/projects/packages/jetpack-mu-wpcom/changelog/feat-unify-masterbar b/projects/packages/jetpack-mu-wpcom/changelog/feat-unify-masterbar new file mode 100644 index 0000000000000..d4b1a1df72511 --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/feat-unify-masterbar @@ -0,0 +1,4 @@ +Significance: minor +Type: changed + +Admin Bar: Make it consistent between Calypso and WP Admin regardless of the value of Admin Interface Style diff --git a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-bar/wpcom-admin-bar.php b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-bar/wpcom-admin-bar.php index 7edefbba95a1d..67034c150207c 100644 --- a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-bar/wpcom-admin-bar.php +++ b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-bar/wpcom-admin-bar.php @@ -9,9 +9,7 @@ use Automattic\Jetpack\Jetpack_Mu_Wpcom; -if ( get_option( 'wpcom_admin_interface' ) !== 'wp-admin' ) { - return; -} +define( 'WPCOM_ADMIN_BAR_UNIFICATION', true ); /** * Enqueue assets needed by the WordPress.com admin bar. diff --git a/projects/packages/masterbar/changelog/feat-unify-masterbar b/projects/packages/masterbar/changelog/feat-unify-masterbar new file mode 100644 index 0000000000000..d4b1a1df72511 --- /dev/null +++ b/projects/packages/masterbar/changelog/feat-unify-masterbar @@ -0,0 +1,4 @@ +Significance: minor +Type: changed + +Admin Bar: Make it consistent between Calypso and WP Admin regardless of the value of Admin Interface Style diff --git a/projects/packages/masterbar/composer.json b/projects/packages/masterbar/composer.json index 1fe51f0f329bd..e2cbf86669f9e 100644 --- a/projects/packages/masterbar/composer.json +++ b/projects/packages/masterbar/composer.json @@ -63,7 +63,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "0.3.x-dev" + "dev-trunk": "0.4.x-dev" }, "changelogger": { "link-template": "https://github.com/Automattic/jetpack-masterbar/compare/v${old}...v${new}" diff --git a/projects/packages/masterbar/package.json b/projects/packages/masterbar/package.json index 3ad06a70ef3c1..ab1c27242d3a0 100644 --- a/projects/packages/masterbar/package.json +++ b/projects/packages/masterbar/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-masterbar", - "version": "0.3.1", + "version": "0.4.0-alpha", "description": "The WordPress.com Toolbar feature replaces the default admin bar and offers quick links to the Reader, all your sites, your WordPress.com profile, and notifications.", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/masterbar/#readme", "bugs": { diff --git a/projects/packages/masterbar/src/admin-color-schemes/class-admin-color-schemes.php b/projects/packages/masterbar/src/admin-color-schemes/class-admin-color-schemes.php index 5e3edd926a915..42a9c0f32fa78 100644 --- a/projects/packages/masterbar/src/admin-color-schemes/class-admin-color-schemes.php +++ b/projects/packages/masterbar/src/admin-color-schemes/class-admin-color-schemes.php @@ -32,7 +32,7 @@ public function __construct() { add_action( 'rest_api_init', array( $this, 'register_admin_color_meta' ) ); } - if ( get_option( 'wpcom_admin_interface' ) === 'wp-admin' ) { // Classic sites. + if ( ( defined( 'WPCOM_ADMIN_BAR_UNIFICATION' ) && WPCOM_ADMIN_BAR_UNIFICATION ) || get_option( 'wpcom_admin_interface' ) === 'wp-admin' ) { // Classic sites. add_filter( 'css_do_concat', array( $this, 'disable_css_concat_for_color_schemes' ), 10, 2 ); add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_color_scheme_for_sidebar_notice' ) ); } else { // Default and self-hosted sites. diff --git a/projects/packages/masterbar/src/admin-menu/class-base-admin-menu.php b/projects/packages/masterbar/src/admin-menu/class-base-admin-menu.php index 2b638b8159073..0a82ee4ac89fa 100644 --- a/projects/packages/masterbar/src/admin-menu/class-base-admin-menu.php +++ b/projects/packages/masterbar/src/admin-menu/class-base-admin-menu.php @@ -276,8 +276,8 @@ public function enqueue_scripts() { ) ); - // Load nav unification styles when the user isn't using wp-admin interface style. - if ( ! $this->use_wp_admin_interface() ) { + // Load nav unification styles for the admin bar when the user isn't using wp-admin interface style. + if ( ! $this->use_wp_admin_interface() && ! ( defined( 'WPCOM_ADMIN_BAR_UNIFICATION' ) && WPCOM_ADMIN_BAR_UNIFICATION ) ) { Assets::register_script( 'jetpack-admin-nav-unification', $assets_base_path . 'admin-menu-nav-unification.js', diff --git a/projects/packages/masterbar/src/class-main.php b/projects/packages/masterbar/src/class-main.php index 078111fcb5d93..db738fc5f55a2 100644 --- a/projects/packages/masterbar/src/class-main.php +++ b/projects/packages/masterbar/src/class-main.php @@ -14,7 +14,7 @@ */ class Main { - const PACKAGE_VERSION = '0.3.1'; + const PACKAGE_VERSION = '0.4.0-alpha'; /** * Initializer. @@ -29,7 +29,7 @@ public static function init() { new Admin_Color_Schemes(); - if ( get_option( 'wpcom_admin_interface' ) === 'wp-admin' ) { + if ( ( defined( 'WPCOM_ADMIN_BAR_UNIFICATION' ) && WPCOM_ADMIN_BAR_UNIFICATION ) || get_option( 'wpcom_admin_interface' ) === 'wp-admin' ) { return; } diff --git a/projects/plugins/jetpack/changelog/feat-unify-masterbar b/projects/plugins/jetpack/changelog/feat-unify-masterbar new file mode 100644 index 0000000000000..a1c1831fa1ef7 --- /dev/null +++ b/projects/plugins/jetpack/changelog/feat-unify-masterbar @@ -0,0 +1,5 @@ +Significance: patch +Type: other +Comment: Updated composer.lock. + + diff --git a/projects/plugins/jetpack/composer.lock b/projects/plugins/jetpack/composer.lock index 9d153dcda4aa0..3eed656c37093 100644 --- a/projects/plugins/jetpack/composer.lock +++ b/projects/plugins/jetpack/composer.lock @@ -1661,7 +1661,7 @@ "dist": { "type": "path", "url": "../../packages/masterbar", - "reference": "6425113a40fc707923278fa64aeb59aac96f1c3e" + "reference": "7eb8932228fd440df85d5459043a7203adf08e35" }, "require": { "automattic/jetpack-assets": "@dev", @@ -1689,7 +1689,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "0.3.x-dev" + "dev-trunk": "0.4.x-dev" }, "changelogger": { "link-template": "https://github.com/Automattic/jetpack-masterbar/compare/v${old}...v${new}" diff --git a/projects/plugins/mu-wpcom-plugin/changelog/feat-unify-masterbar b/projects/plugins/mu-wpcom-plugin/changelog/feat-unify-masterbar new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/mu-wpcom-plugin/changelog/feat-unify-masterbar @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/mu-wpcom-plugin/composer.lock b/projects/plugins/mu-wpcom-plugin/composer.lock index c91bb09395b7c..fe27908d1c6f7 100644 --- a/projects/plugins/mu-wpcom-plugin/composer.lock +++ b/projects/plugins/mu-wpcom-plugin/composer.lock @@ -926,7 +926,7 @@ "dist": { "type": "path", "url": "../../packages/masterbar", - "reference": "6425113a40fc707923278fa64aeb59aac96f1c3e" + "reference": "7eb8932228fd440df85d5459043a7203adf08e35" }, "require": { "automattic/jetpack-assets": "@dev", @@ -954,7 +954,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "0.3.x-dev" + "dev-trunk": "0.4.x-dev" }, "changelogger": { "link-template": "https://github.com/Automattic/jetpack-masterbar/compare/v${old}...v${new}" diff --git a/projects/plugins/wpcomsh/changelog/feat-unify-masterbar b/projects/plugins/wpcomsh/changelog/feat-unify-masterbar new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/wpcomsh/changelog/feat-unify-masterbar @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/wpcomsh/composer.lock b/projects/plugins/wpcomsh/composer.lock index ea894c030f6a4..cd77f47d65202 100644 --- a/projects/plugins/wpcomsh/composer.lock +++ b/projects/plugins/wpcomsh/composer.lock @@ -1063,7 +1063,7 @@ "dist": { "type": "path", "url": "../../packages/masterbar", - "reference": "6425113a40fc707923278fa64aeb59aac96f1c3e" + "reference": "7eb8932228fd440df85d5459043a7203adf08e35" }, "require": { "automattic/jetpack-assets": "@dev", @@ -1091,7 +1091,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "0.3.x-dev" + "dev-trunk": "0.4.x-dev" }, "changelogger": { "link-template": "https://github.com/Automattic/jetpack-masterbar/compare/v${old}...v${new}" From 871affe860831cb1e38dd9dff93cbb43437b7df4 Mon Sep 17 00:00:00 2001 From: Ashar Fuadi Date: Thu, 18 Jul 2024 16:20:58 +0700 Subject: [PATCH 2/2] fixup versions --- projects/packages/jetpack-mu-wpcom/composer.json | 2 +- projects/packages/jetpack-mu-wpcom/package.json | 2 +- .../packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php | 2 +- .../plugins/mu-wpcom-plugin/changelog/feat-unify-masterbar-2 | 5 +++++ projects/plugins/mu-wpcom-plugin/composer.json | 2 +- projects/plugins/mu-wpcom-plugin/composer.lock | 4 ++-- projects/plugins/mu-wpcom-plugin/mu-wpcom-plugin.php | 2 +- projects/plugins/mu-wpcom-plugin/package.json | 2 +- projects/plugins/wpcomsh/changelog/feat-unify-masterbar-2 | 5 +++++ projects/plugins/wpcomsh/composer.lock | 4 ++-- 10 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 projects/plugins/mu-wpcom-plugin/changelog/feat-unify-masterbar-2 create mode 100644 projects/plugins/wpcomsh/changelog/feat-unify-masterbar-2 diff --git a/projects/packages/jetpack-mu-wpcom/composer.json b/projects/packages/jetpack-mu-wpcom/composer.json index 76f1bd70eb3bd..cfdd91a913616 100644 --- a/projects/packages/jetpack-mu-wpcom/composer.json +++ b/projects/packages/jetpack-mu-wpcom/composer.json @@ -62,7 +62,7 @@ }, "autotagger": true, "branch-alias": { - "dev-trunk": "5.45.x-dev" + "dev-trunk": "5.46.x-dev" }, "textdomain": "jetpack-mu-wpcom", "version-constants": { diff --git a/projects/packages/jetpack-mu-wpcom/package.json b/projects/packages/jetpack-mu-wpcom/package.json index 46914fcf53321..7a920e08efd11 100644 --- a/projects/packages/jetpack-mu-wpcom/package.json +++ b/projects/packages/jetpack-mu-wpcom/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-mu-wpcom", - "version": "5.45.0", + "version": "5.46.0-alpha", "description": "Enhances your site with features powered by WordPress.com", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/jetpack-mu-wpcom/#readme", "bugs": { diff --git a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php index e0b8e8c822a25..6f67464fa87fd 100644 --- a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php +++ b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php @@ -13,7 +13,7 @@ * Jetpack_Mu_Wpcom main class. */ class Jetpack_Mu_Wpcom { - const PACKAGE_VERSION = '5.45.0'; + const PACKAGE_VERSION = '5.46.0-alpha'; const PKG_DIR = __DIR__ . '/../'; const BASE_DIR = __DIR__ . '/'; const BASE_FILE = __FILE__; diff --git a/projects/plugins/mu-wpcom-plugin/changelog/feat-unify-masterbar-2 b/projects/plugins/mu-wpcom-plugin/changelog/feat-unify-masterbar-2 new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/mu-wpcom-plugin/changelog/feat-unify-masterbar-2 @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/mu-wpcom-plugin/composer.json b/projects/plugins/mu-wpcom-plugin/composer.json index 220af3bc0d16d..d49395345b634 100644 --- a/projects/plugins/mu-wpcom-plugin/composer.json +++ b/projects/plugins/mu-wpcom-plugin/composer.json @@ -46,6 +46,6 @@ ] }, "config": { - "autoloader-suffix": "d9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_4_1" + "autoloader-suffix": "d9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_4_2_alpha" } } diff --git a/projects/plugins/mu-wpcom-plugin/composer.lock b/projects/plugins/mu-wpcom-plugin/composer.lock index fe27908d1c6f7..d9b2f3dda1fea 100644 --- a/projects/plugins/mu-wpcom-plugin/composer.lock +++ b/projects/plugins/mu-wpcom-plugin/composer.lock @@ -1005,7 +1005,7 @@ "dist": { "type": "path", "url": "../../packages/jetpack-mu-wpcom", - "reference": "c26a4dc9f95986ac41f6614a31a59f9efedcb72e" + "reference": "a417025d2587643638c7e276bb2dee14423dd51e" }, "require": { "automattic/jetpack-assets": "@dev", @@ -1039,7 +1039,7 @@ }, "autotagger": true, "branch-alias": { - "dev-trunk": "5.45.x-dev" + "dev-trunk": "5.46.x-dev" }, "textdomain": "jetpack-mu-wpcom", "version-constants": { diff --git a/projects/plugins/mu-wpcom-plugin/mu-wpcom-plugin.php b/projects/plugins/mu-wpcom-plugin/mu-wpcom-plugin.php index 5467901b57ba3..576fcd1fceae9 100644 --- a/projects/plugins/mu-wpcom-plugin/mu-wpcom-plugin.php +++ b/projects/plugins/mu-wpcom-plugin/mu-wpcom-plugin.php @@ -3,7 +3,7 @@ * * Plugin Name: WordPress.com Features * Description: Test plugin for the jetpack-mu-wpcom package - * Version: 2.4.1 + * Version: 2.4.2-alpha * Author: Automattic * License: GPLv2 or later * Text Domain: jetpack-mu-wpcom-plugin diff --git a/projects/plugins/mu-wpcom-plugin/package.json b/projects/plugins/mu-wpcom-plugin/package.json index 9f3a5da876105..b95d2cb7aea6b 100644 --- a/projects/plugins/mu-wpcom-plugin/package.json +++ b/projects/plugins/mu-wpcom-plugin/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-mu-wpcom-plugin", - "version": "2.4.1", + "version": "2.4.2-alpha", "description": "Test plugin for the jetpack-mu-wpcom package", "homepage": "https://jetpack.com", "bugs": { diff --git a/projects/plugins/wpcomsh/changelog/feat-unify-masterbar-2 b/projects/plugins/wpcomsh/changelog/feat-unify-masterbar-2 new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/wpcomsh/changelog/feat-unify-masterbar-2 @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/wpcomsh/composer.lock b/projects/plugins/wpcomsh/composer.lock index cd77f47d65202..a1de6b64e87bc 100644 --- a/projects/plugins/wpcomsh/composer.lock +++ b/projects/plugins/wpcomsh/composer.lock @@ -1142,7 +1142,7 @@ "dist": { "type": "path", "url": "../../packages/jetpack-mu-wpcom", - "reference": "c26a4dc9f95986ac41f6614a31a59f9efedcb72e" + "reference": "a417025d2587643638c7e276bb2dee14423dd51e" }, "require": { "automattic/jetpack-assets": "@dev", @@ -1176,7 +1176,7 @@ }, "autotagger": true, "branch-alias": { - "dev-trunk": "5.45.x-dev" + "dev-trunk": "5.46.x-dev" }, "textdomain": "jetpack-mu-wpcom", "version-constants": {