-
Notifications
You must be signed in to change notification settings - Fork 798
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
Untangling Cleanup: Clean up wpcom_is_nav_redesign_enabled()
flag
#38197
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. |
43a350a
to
bb5dfc6
Compare
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.
Thanks for this! Some comments:
- One of the reasons we used
wpcom_is_nav_redesign_enabled()
(and therefore the massivefunction_exists
checks) in wpcomsh, is so that we could quickly release/revert the feature in wpcomsh, without having to rely on Jetpack release cycle. Now that it's released, we don't need to rely on wpcomsh anymore. That's the reason why I proposed in the issue to just simply useget_option( 'wpcom_admin_interface' ) === 'wp-admin'
as it's literally what it is. - If we still want to use functions, what I suggest is:
- Put the function in another feature in mu-wpcom. E.g.:
admin-interface/admin-interface.php
- Use it and remove all the
function_exists
checks. - See this example Hide wpcom items if
is_agency_managed_site
#37993, where we added a similaris_agency_managed_site()
function.
- Put the function in another feature in mu-wpcom. E.g.:
- We should do similar thing in
wpcomsh
and not rely on thefeature-plugins/nav-redesign.php
file anymore, as that would defeat the purpose of the refactor.
What do you think?
Can we now rename the PR 😄 |
wpcom_is_nav_redesign_enabled
to uses_wp_admin_interface
@fushar haha right, done! |
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.
Triple-checked the changes, and smoke-tested on a WoA dev test site and everything works as usual. Nice 👍
Merging this now to unblock things because we have another Untangling iteration this week! |
@fushar thanks for merging this! |
Related to: https://github.com/Automattic/dotcom-forge/issues/7927
Proposed changes:
wpcom_is_nav_redesign_enabled
function name is not relevant anymore and can be confusing for future developers.This goes alongside this wpcom PR: D154312-code
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
wpcom_classic_tour_completed
option to'0'
:wpsh
and thenupdate_blog_option( SITE_ID, 'wpcom_classic_tour_completed', '0' );
/wp-admin/?admin-interface-changed=true