Skip to content
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
wants to merge 3 commits into from

Conversation

BogdanUngureanu
Copy link
Contributor

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:

  • Load the tour only on a subset of the pages; Advertising and Stats should be excluded.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

Does this pull request change what data or activity we track or use?

Testing instructions:

  • Apply this PR on your site
  • Go to WP-Admin > Posts and Click on the stats icon we display for a post
  • Go to WP-Admin > Settings > Advertising
  • Notice that there's no gray overlay displayed anymore

@BogdanUngureanu BogdanUngureanu requested a review from a team December 19, 2024 15:27
@BogdanUngureanu BogdanUngureanu self-assigned this Dec 19, 2024
@BogdanUngureanu BogdanUngureanu added [Type] Bug When a feature is broken and / or not performing as intended [Status] Needs Team Review labels Dec 19, 2024
Copy link
Contributor

github-actions bot commented Dec 19, 2024

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WordPress.com Simple site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin, and enable the fix/tour-on-subset-of-rdv branch.

    • For jetpack-mu-wpcom changes, also add define( 'JETPACK_MU_WPCOM_LOAD_VIA_BETA_PLUGIN', true ); to your wp-config.php file.
  • To test on Simple, run the following command on your sandbox:

    bin/jetpack-downloader test jetpack-mu-wpcom-plugin fix/tour-on-subset-of-rdv
    

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

Copy link
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Choose a review path based on your changes:
    • A. Team Review: add the "[Status] Needs Team Review" label
      • For most changes, including minor cross-team impacts.
      • Example: Updating a team-specific component or a small change to a shared library.
    • B. Crew Review: add the "[Status] Needs Review" label
      • For significant changes to core functionality.
      • Example: Major updates to a shared library or complex features.
    • C. Both: Start with Team, then request Crew
      • For complex changes or when you need extra confidence.
      • Example: Refactor affecting multiple systems.
  3. Get at least one approval before merging.

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(
Copy link
Contributor

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

@rcrdortiz
Copy link
Contributor

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.

@rcrdortiz
Copy link
Contributor

I'm on a site with a Personal plan, when I click on the stats icon I land here:
Screenshot 2024-12-19 at 16 42 26

I'm not sure if I'm doing something wrong. I have my site + API sandboxed.

@rcrdortiz
Copy link
Contributor

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(
Copy link
Member

@mmtr mmtr Dec 20, 2024

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

Copy link
Contributor Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[mu wpcom Feature] Wpcom Admin Interface [Package] Jetpack mu wpcom WordPress.com Features [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants