-
Notifications
You must be signed in to change notification settings - Fork 800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Masterbar: Require and use 'jetpack-masterbar' package in jetpack-mu-wpcom #37812
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped. Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Mu Wpcom plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Wpcomsh plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
… require the masterbar file that loads the admin menu for self-hosted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
On reviewing the code, it all looks good.
I tested on Simple, Atomic, self-hosted. I think most of what I found may not even be issues, but I'll add them here:
Important: Without the PR, only jetpack-core-color-schemes-overrides-sidebar-notice-css is loaded but my understanding based on the linked Jetpack product discussion above is that this is the desired behaviour.
On my test Atomic, neither was loaded when the PR wasn't applied. The color schemes looked and behaved the same though.
For block based themes, "Customize" should not be present under "Appearance".
(from the linked PR)
Testing on a Simple site, using block based theme (Twenty Twenty Four), I see Customize under Appearance. However I do with trunk too. Same with Classic or Default interface style. Atomic behaves as the PR description suggests though.
On a WoA default site, the Appearance->Additonal CSS link redirects you to wp-admin with an error message that you don't have access. Is this intended?
I couldn't replicate that. I know I mentioned in Slack I'd seem the message briefly, but that was while testing the Custom CSS PR, not this one.
Thanks for the review, @coder-karen ! Unfortunately I'm able to reproduce a Fatal when testing the
I think the safest approach here would be extracting the suggested change in the endpoint from this PR to another PR, then merge it so it's available on the next AT release and merging this one afterwards so it becomes available to WoA sites via the corresponding |
Many many thanks, @coder-karen !
This applies to classic Simple sites and the
It would be nice to get a confirmation around the intended behaviour from the product teams cc @mmtr
I'm also not able to reproduce this one anymore but will keep an eye in case it happens again while testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Impressive work, @fgiannar.
This works as expected to me, with no regressions in the behavior when I compare it against trunk
.
Tested in 5 different environments:
- WP.com Simple Default: Color schemes are correctly overridden and I can only change them in Calypso
- WP.com Simple Classic: Color schemes are correctly overridden and I can only change them in WP Admin
- WP.com Atomic Default: Color schemes are correctly overridden and I can only change them in Calypso
- WP.com Atomic Classic: Color schemes are correctly overridden and I can only change them in WP Admin
- Self-hosted sites: Color schemes are correctly overridden when the toolbar module is enabled and I can change them in WP Admin. The selected color scheme is not synced with Calypso, as expected.
EDIT: Somehow I thought I only had to test the admin color schemes changes. I'll review the rest of features tomorrow.
Just realized I only tested the color schemes, but changes affect to the whole masterbar module, which should be tested entirely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made sure to test everything now, and it works as expected 🚀
Testing on a Simple site, using block based theme (Twenty Twenty Four), I see Customize under Appearance. However I do with trunk too. Same with Classic or Default interface style. Atomic behaves as the PR description suggests though.
Yeah, this is unrelated to these changes, because it happens in trunk
as well. Due to a bug, the "Appearance > Customize" menu is visible on Simple Default sites when visiting a WP Admin page. It does not happen in other scenarios (Simple Default visiting Calypso, Simple Classic visiting any page).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Retested color schemes in particular on all site types, default and classic styles, as that was the only change since my last review. All tests well :)
Important: This PR should be merged after JP13.6-a.3
or later is released on AT. Context: #37812 (comment)Jetpack
13.6-a.5
is now released to AT: p9o2xV-4mW-p2Masterbar: Require and use 'jetpack-masterbar' package in jetpack-mu-wpcom
This is needed as we are slowly deprecating the feature for self-hosted sites.
Proposed changes:
Admin_Color_Schemes
to incorporate the logic from the corresponding feature injetpack-mu-wpcom
Main
class so that it behaves consistently with the WPCOM masterbar mu-plugin. Aka with Simple sites in mind.admin-color-schemes.php
to simply instantiateAdmin_Color_Schemes
upon loading only for classic Simple sites (also temp).Other information:
Jetpack product discussion
pfwV0U-3U-p2
Does this pull request change what data or activity we track or use?
No
Testing instructions:
We'll need to repeat the testing from #37676 with the following extras:
Simple Sites
We are mostly interested in classic Simple sites. These are the ones where
wpcom_is_nav_redesign_enabled()
will betrue
. This means thatreturn get_blog_option( YOUR_WPCOM_BLOG_ID, 'wpcom_admin_interface' )
returnswp-admin
. I was under the impression that switching to the Classic view would reflect this but it wasn't the case for me, so I had to manually set thewpcom_admin_interface
option towp-admin
for my Simple site.User Profile
Admin Color Scheme
setting inprofile.php
screen looks the same with/without the PR applied.Atomic Sites
We'll need to test with the provided instructions below but also with Jetpack on the current JP version on WoA aka
13.6-a.5
and the WordPress.com Features plugin on this branch via Jetpack beta. This will simulate the period between the next wpcomsh release and the next Jetpack AT release.We'll need to test both classic and default WoA sites. You can toggle this option via Settings->General in
wp-admin
for a classic WoA siteYou can toggle this option via Settings->General in Calypso for a Default WoA site:
TODO: On a WoA default site, the Appearance->Additonal CSS link redirects you to wp-admin with an error message that you don't have access. Is this intended?