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

Prevent dashboard feature tours from being triggered during module setup #3187

Closed
eugene-manuilov opened this issue Apr 19, 2021 · 14 comments
Closed
Labels
P1 Medium priority Type: Enhancement Improvement of an existing feature
Milestone

Comments

@eugene-manuilov
Copy link
Collaborator

eugene-manuilov commented Apr 19, 2021

Feature Description

We probably need to update tooltip tours to avoid popping up on the module setup pages. It is not a big deal and a user can always close it for sure, but it would be more convenient if we just don't display tooltip tours there.

sitekit 10uplabs com_wp-admin_admin php_page=googlesitekit-dashboard slug=optimize reAuth=true


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • A new JS constants VIEW_CONTEXT_MODULE_SETUP with value "moduleSetup" should be added.
  • The constant should be used instead of the current value for the viewContext prop of Root when the ModuleSetup component will be used within (i.e. within googlesitekit-dashboard.js and googlesitekit-module.js).

Implementation Brief

Inside assets/js/googlesitekit/constants.js:

  • define and export a new constant, VIEW_CONTEXT_MODULE_SETUP, with value "moduleSetup".

Inside assets/js/googlesitekit-dashboard.js:

  • Import VIEW_CONTEXT_MODULE_SETUP in addition to the existing VIEW_CONTEXT_DASHBOARD
  • If setupModuleSlug is truthy, pass the new VIEW_CONTEXT_MODULE_SETUP constant to <Root> as the viewContext prop.
  • If setupModuleSlug is falsy, pass VIEW_CONTEXT_DASHBOARD to <Root> as the viewContext prop.

Inside assets/js/googlesitekit-module.js:

  • Import VIEW_CONTEXT_MODULE_SETUP in addition to the existing VIEW_CONTEXT_MODULE
  • If setupModuleSlug is truthy, pass the new VIEW_CONTEXT_MODULE_SETUP constant to <Root> as the viewContext prop.
  • If setupModuleSlug is falsy, pass VIEW_CONTEXT_MODULE to <Root> as the viewContext prop.

Test Coverage

  • No new tests needed

Visual Regression Changes

  • Images dealing with feature tours might need updating.

QA Brief

  • The issue was originally visible when activating Optimize (or another module that requires a setup form) - the feature tour would run on the setup form page, which isn't ideal.
  • Verify that the feature tours no longer run in this scenario. You will likely need to do something along these lines:
    • delete your dismissed tours (e.g. by using WP CLI)
    • navigate to the dashboard and dismiss all the tours that appear there (except for example the 'help visibility' tour)
    • then proceed to activate Optimize and check if the tour appears on the setup form page.

Changelog entry

  • Prevent feature tours from appearing during module setup.
@eugene-manuilov eugene-manuilov added Type: Enhancement Improvement of an existing feature P2 Low priority labels Apr 19, 2021
@aaemnnosttv aaemnnosttv changed the title Do not display feature toors on the module setup pages Do not display feature tours on the module setup pages Apr 20, 2021
@aaemnnosttv
Copy link
Collaborator

I think this is something to evaluate on a per-tour basis. For help specifically, I think it makes sense to allow here as module setup is probably one of the areas where users encounter trouble.

However, the dashboard and page dashboard view contexts shouldn't include module setup IMO. Perhaps what we should do is move module setup into a dedicated page rather than reusing the dashboard URL for this. We can't really use the module-specific dashboard screens for this since not every module has one, but most have a set up flow.

So in this case, I think the problem is more that the dashboard entrypoint GoogleSitekitDashboard is doing too much.

@felixarntz
Copy link
Member

@aaemnnosttv Sounds good. Maybe let's refocus this issue on splitting out the responsibility of module setup from the dashboard, e.g. via a googlesitekit-dashboard-module-setup.js asset that is conditionally enqueued instead of the googlesitekit-dashboard.js / googlesitekit-dashboard-details.js one.

@felixarntz felixarntz changed the title Do not display feature tours on the module setup pages Separate out module setup into its own JS asset outside of googlesitekit-dashboard Apr 20, 2021
@felixarntz felixarntz added P1 Medium priority and removed P2 Low priority labels May 4, 2021
@felixarntz felixarntz removed their assignment May 4, 2021
@felixarntz felixarntz self-assigned this Jul 26, 2021
@felixarntz
Copy link
Member

@aaemnnosttv @eugene-manuilov @tofumatt Do we still think this is an idea worth pursuing at this point? We've been occasionally talking about working more towards a single page application, and this issue specifically would counter that tendency. Should we maybe close this instead?

@aaemnnosttv
Copy link
Collaborator

@felixarntz As is, I don't think we need a separate JS asset to solve this problem. The simpler change would be to use a different viewContext for module set up where as it currently shares the same as the dashboard due to using the same entry point. That way we could allow for setup-specific tours if we wanted but otherwise this would solve the problem of showing dashboard tours during module set up as the view context is not really accurate here. So I don't think we should close it but redefine it in a simpler way.

@eugene-manuilov
Copy link
Collaborator Author

Yep, I agree with Evan. Let's solve it using a simpler way instead of closing it.

@felixarntz
Copy link
Member

@aaemnnosttv @eugene-manuilov Sounds like a plan - I've added ACs accordingly (also a lot simpler!).

@aaemnnosttv aaemnnosttv changed the title Separate out module setup into its own JS asset outside of googlesitekit-dashboard Prevent dashboard feature tours from being triggered during module setup Sep 9, 2021
@eclarke1 eclarke1 added this to the Sprint 58 milestone Sep 9, 2021
@johnPhillips
Copy link
Contributor

Sorry @eugene-manuilov for the accidental assignment there - mouse slip!

@eugene-manuilov eugene-manuilov self-assigned this Sep 10, 2021
@eugene-manuilov
Copy link
Collaborator Author

IB ✔️

@wpdarren
Copy link
Collaborator

@aaemnnosttv as per our conversation on Slack last week, am I assuming correctly that this cannot be tested until #4069 is in develop? I have tried to trigger the helpVisibility tour but no success.

@aaemnnosttv
Copy link
Collaborator

@wpdarren it should be testable now, but you'll need to disable the overriding of feature flags since this one is no longer controllable via the tester plugin. You may still need the tester plugin active though to force the older initial version. Does that make sense?

@wpdarren
Copy link
Collaborator

@aaemnnosttv okay, I have run through this again, but no success at getting the helpVisibility tour appearing.

Here are the steps that I took.

  • Test site on develop branch.
  • Tester plugin activated, but Force enabled feature flags set to Do not override.
  • The Force initial Site Kit plugin version was set to 1.27.0
  • When I connected to Site Kit, no feature tour appeared. I was on Site Kit Dashboard screen.
  • I logged into the site on Terminal and noticed that wp_googlesitekitpersistent_initial_version entry was not appearing.
  • I ran the command to add this in. I set it to 1.27.0 (and 1.25.0 because that is what I used for testing tours previously).
  • I then reset SiteKit and connected again but no feature tour appeared.

Any ideas?

@aaemnnosttv
Copy link
Collaborator

@wpdarren try clearing any dismissed tours you may have by deleting wp_googlesitekitpersistent_dismissed_tours for your user.

@wpdarren
Copy link
Collaborator

@aaemnnosttv I looked at that and wp_googlesitekitpersistent_dismissed_tours isn't in for my user. 🤔

@wpdarren
Copy link
Collaborator

QA Update: ✅

When setting up Optimize no tour appeared after it had been dismissed.

image

@wpdarren wpdarren removed their assignment Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 Medium priority Type: Enhancement Improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

7 participants