-
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
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
projects/packages/jetpack-mu-wpcom/changelog/fix-tour-on-subset-of-rdv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: fixed | ||
|
||
Enable the tour only on a subset of the Removed duplicate views screens. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,15 +116,23 @@ | |
} | ||
add_filter( 'pre_update_option_wpcom_admin_interface', 'wpcom_admin_interface_pre_update_option', 10, 2 ); | ||
|
||
const WPCOM_DUPLICATE_VIEW_WITH_TOUR = array( | ||
'edit.php', | ||
'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( | ||
Check warning on line 127 in projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-interface/wpcom-admin-interface.php GitHub Actions / PHP Code Sniffer (non-excluded files only)
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
'edit.php', | ||
'admin.php?page=stats', | ||
'tools.php?page=advertising', | ||
'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', | ||
'admin.php?page=stats', | ||
'tools.php?page=advertising', | ||
); | ||
|
||
/** | ||
|
@@ -462,7 +470,7 @@ | |
|
||
$current_screen = wpcom_admin_get_current_screen(); | ||
|
||
if ( ! in_array( $current_screen, WPCOM_DUPLICATED_VIEW, true ) ) { | ||
if ( ! in_array( $current_screen, WPCOM_DUPLICATE_VIEW_WITH_TOUR, true ) ) { | ||
return; | ||
} | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
ortools.php?page=advertising
.Actually, I think adding
admin.php?page=stats
andtools.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: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 viewThere 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.
@mmtr this PR it's now redundant and replaced by #40690.
I should've closed it yesterday, but forgot. Sorry!