jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Intro tour for classic admin interface

Open mmtr opened this issue 1 year ago • 2 comments

Fixes https://github.com/Automattic/dotcom-forge/issues/7404

Proposed changes:

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:

  • Go to '..'

mmtr avatar May 24 '24 14:05 mmtr

Thank you for your PR!

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

  • :white_check_mark: Include a description of your PR changes.
  • :white_check_mark: Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • :white_check_mark: Add testing instructions.
  • :white_check_mark: Specify whether this PR includes any changes to data or privacy.
  • :white_check_mark: 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 :robot:


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. Then, add the "[Status] Needs Team Review" label and ask someone from your team review the code. Once reviewed, it can then be merged. If you need an extra review from someone familiar with the codebase, you can update the labels from "[Status] Needs Team Review" to "[Status] Needs Review", and in that case Jetpack Approvers will do a final review of your PR.

github-actions[bot] avatar May 24 '24 14:05 github-actions[bot]

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 update/admin-interface-redirect-to-calypso 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 update/admin-interface-redirect-to-calypso
    

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

github-actions[bot] avatar May 24 '24 14:05 github-actions[bot]

If I navigate away from /wp-admin?admin-interface-changed=true the tour isn't displayed/completed. Maybe we can add an option or cookie to check if the tour is in progress and continue to show it across screens?

rcrdortiz avatar May 28 '24 07:05 rcrdortiz

If I navigate away from /wp-admin?admin-interface-changed=true the tour isn't displayed/completed. Maybe we can add an option or cookie to check if the tour is in progress and continue to show it across screens?

It's not that easy, because there is one step of the tour that requires to be in the dashboard (step 2: Hosting overview).

mmtr avatar May 28 '24 08:05 mmtr

When the notice is displayed, and I move to step 2 and then reload, the tour starts at step 1 again.

rcrdortiz avatar May 28 '24 08:05 rcrdortiz

If I navigate away from /wp-admin?admin-interface-changed=true the tour isn't displayed/completed. Maybe we can add an option or cookie to check if the tour is in progress and continue to show it across screens?

It's not that easy, because there is one step of the tour that requires to be in the dashboard (step 2: Hosting overview).

Maybe we can skip that step if we're not on /wp-admin? I mean, if the user navigates away he's never going to see it anyways right?

rcrdortiz avatar May 28 '24 08:05 rcrdortiz

[Minor] When we resize the screen the current tour step doesn't adjust to the new screen size until re-rendered.

https://github.com/Automattic/jetpack/assets/1989914/a0abc141-494f-47d6-893b-f0d05b18199e

rcrdortiz avatar May 28 '24 08:05 rcrdortiz

When the notice is displayed, and I move to step 2 and then reload, the tour starts at step 1 again.

Yup, that's expected for now. It's considered an uncommon case that is not worth handling.

Maybe we can skip that step if we're not on /wp-admin? I mean, if the user navigates away he's never going to see it anyways right?

If we do that, and they complete the tour outside of the dashboard, they'll never see the step 2 even when they are in the dashboard.

With the current approach, they won't see the tour outside of the dashboard, but they will be able to see the step 2 when they are in the dashboard.

Anyway, the effort needed to maintain the tour across screens is likely no worth it considering that (1) navigating away when the tour is present probably won't be a common case, (2) the tour is just educational – it's ok if it's not followed, and (3) the tour will still be there for those who navigate away and go back to the dashboard.

mmtr avatar May 28 '24 08:05 mmtr

(3) the tour will still be there for those who navigate away and go back to the dashboard.

This statement is misleading, by go back you mean navigating using the back button and not actually navigating to the dashboard again right? If I click on Appearance and then navigate back to the dashboard by clicking on the Dashboard menu, the tour isn't shown.

rcrdortiz avatar May 28 '24 08:05 rcrdortiz

When we resize the screen the current tour step doesn't adjust to the new screen size until re-rendered.

Yeah, that's actually a WP bug with the resizing. If you reload the page with that screen size, you'll see that the sidebar is visible and does't not transition between collapsed/expanded status:

https://github.com/Automattic/jetpack/assets/1233880/6c3df83b-96ac-40f5-ab97-ef40e660519a

Considering that users usually don't resize browsers (at least not in a significant way that changes the viewport from desktop to mobile or viceversa), I thought it wasn't worth to handle this issue.

mmtr avatar May 28 '24 08:05 mmtr

If I click on Appearance and then navigate back to the dashboard by clicking on the Dashboard menu, the tour isn't shown.

That's good catch! I'll push a change to keep showing the tour in that case.

mmtr avatar May 28 '24 08:05 mmtr

If I click on Appearance and then navigate back to the dashboard by clicking on the Dashboard menu, the tour isn't shown.

Solved in https://github.com/Automattic/jetpack/pull/37533/commits/67d8181c5611272ec090542f8feb7767b6bda06e

mmtr avatar May 28 '24 08:05 mmtr