-
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
RDV: Use the tour only on a subset of the pages #40687
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. Follow this PR Review Process:
Still unsure? Reach out in #jetpack-developers for guidance! |
'edit.php?post_type=jetpack-portfolio', | ||
'edit.php?post_type=jetpack-testimonial', | ||
'edit-comments.php', | ||
'edit-tags.php?taxonomy=category', | ||
'edit-tags.php?taxonomy=post_tag', | ||
); | ||
const WPCOM_DUPLICATED_VIEW = array( |
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.
It looks like we're going to need to duplicate the previous array
Hey, a before and after of the gray overlay would be really helpful for people (like me) who aren't aware of the issue. I've checked the parent Issue and couldn't see any reference to the gray overlay either. |
When I click on wp-admin => settings => advertising, I land on a Calypso page, is this expected? |
@@ -116,15 +116,23 @@ function ( $location ) { | |||
} | |||
add_filter( 'pre_update_option_wpcom_admin_interface', 'wpcom_admin_interface_pre_update_option', 10, 2 ); | |||
|
|||
const WPCOM_DUPLICATE_VIEW_WITH_TOUR = array( |
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.
I don't think the tour is the differentiating factor here. The "View" switcher is also hidden on all these screens, and it should remain visible on screens like admin.php?page=stats
or tools.php?page=advertising
.
Actually, I think adding admin.php?page=stats
and tools.php?page=advertising
to they array of duplicate views was a mistake, because we are not removing the duplicate Calypso screens for those (which is why we don't show the tour and why we don't hide the switcher).
Due to that, I think it'd be less confusing if we have these two arrays:
WPCOM_DUPLICATE_VIEW
: Lists of WP Admin paths whose Calypso counterpart has been removed, and therefore we need to:- Enforce the WP Admin link in the menu
- Hide the View switcher
- Show the tour
WPCOM_CLASSIC_INTERFACE_PATHS
: List of WP Admin paths not enabled for the Default admin interface (e.g. Jetpack Stats, Advertising Tools) that can be accessed from a enforced WP Admin view- Access to these paths should be enabled when visiting a WP Admin view whose Calypso counterpart has been removed
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.
Before this change, all pages marked as duplicate view would have been presented with a tour explaining the switch to Core.
However, there were pages like Stats and Advertising that shouldn't receive this tour. Furthermore, when a user visited these pages, a gray overlay was displayed without a tour (since the page didn't had one).
This PR removes this behavior and loads the tour only on a subset of the pages that have a tour.
Related to Automattic/wp-calypso#97400
Proposed changes:
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions: