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

WPCOM Block Editor: Remove disable-nux-tour #38369

Closed

Conversation

Copons
Copy link
Contributor

@Copons Copons commented Dec 12, 2019

Changes proposed in this Pull Request

  • Remove the disable-nux-tour override from the WPCOM Block Editor integration.

We were disabling it for several reasons: it was on a per-site basis, so users with many sites would get annoyed by it; it had wonky positioning on WPCOM because of its forced fullscreen mode.

Core Gutenberg recently changed the NUX from DotTip (tooltips relatively positioned to their container element) to a WelcomeGuide ("multi-step" modal with text and images).

Eventually WPCOM will have a fully customized Welcome Guide instead of Core's, but for now, reenabling the vanilla Core NUX is better than nothing. 🙂

Screenshot 2019-12-12 at 12 19 01

Testing instructions

Pre-requisites:

  • Apply D36655 (twin diff of this PR).
  • Sandbox widgets.wp.com.
  • Pre-sandbox a new site.

Test:

  • Create a new site with the pre-sandboxed URL on Horizon (https://horizon.wordpress.com/jetpack/new).
    This is because the new Core NUX is available starting from Gutenberg 7.1.0, which as of today is not in WPCOM Production yet.
  • Open the block editor.
  • Make sure the Welcome Guide shows up.
  • Close the Welcome Guide and reload the editor.
  • Make sure the Welcome Guide doesn't show up anymore. It can be triggered again in the editor's More menu (ellipsis icon).

Part of #38299

@Copons Copons added [Type] Enhancement [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 12, 2019
@Copons Copons requested review from a team as code owners December 12, 2019 12:08
@Copons Copons self-assigned this Dec 12, 2019
@matticbot
Copy link
Contributor

@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@apeatling
Copy link
Member

Two things before I test this:

  • This will still show up on every site I own, even if I've dismissed it on a different site?
  • Will all existing users suddenly see this even if they've been using Gutenberg for some time?

@gwwar
Copy link
Contributor

gwwar commented Dec 12, 2019

This will still show up on every site I own, even if I've dismissed it on a different site?

Yes per site, per user, per browser

Will all existing users suddenly see this even if they've been using Gutenberg for some time?

Yes

If we want to avoid that I'd recommend our own NUX redux store/UI backed by an API endpoint that can keep track of this.

@gwwar
Copy link
Contributor

gwwar commented Dec 12, 2019

Code looks good otherwise for re-enabling the tour

@ianstewart
Copy link
Contributor

Will all existing users suddenly see this even if they've been using Gutenberg for some time?

Yes

This sounds like a blocker.

@apeatling
Copy link
Member

apeatling commented Dec 12, 2019

Yes, agreed. I think:

Will all existing users suddenly see this even if they've been using Gutenberg for some time?

Is a blocker, we need to limit it to new users from the time in launches, otherwise it looks bad.

@Copons
Copy link
Contributor Author

Copons commented Dec 13, 2019

Will all existing users suddenly see this even if they've been using Gutenberg for some time?

Yes

Wait, I don't think this was the case for me?
I've tested on an old site and had to manually click on Welcome Guide in the More menu to trigger it.
I'll test again though, as I might have had some dirty environment.


EDIT: Scratch that, I've tested on a really old test site, and indeed the NUX shows up.

I was planning to work on the API in a follow up along with a fully custom NUX, while having this as a temporary thing for new users, but NNNNNOPE!


EDIT: so I think this is what happens.

Core Guten dispatches ( 'core/nux' ).disableTips() when tips (or the welcome guide) are dismissed.
The WPCOM Guten integration, before this PR, dispatched the same action, but immediately upon editor load.

disableTips() updates state[ 'core/nux' ].preferences.areTipsEnabled, which is persisted in localStorage.

To display the tips or the welcome guide, the NUX checks for that areTipsEnabled.

What does this mean in WPCOM?

  1. New sites will see the NUX.
  2. Old sites that never opened the block editor will see the NUX.
  3. Old sites that opened the block editor after we forced disableTips won't see the NUX.
  4. Old sites that cleared the localStorage will see the NUX (this would be the same in Core).

1, 2, and 3 are the correct behaviour imho; 4 is debatable.

@Copons Copons added [Status] In Progress and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 13, 2019
@michaeldcain
Copy link
Member

michaeldcain commented Dec 13, 2019

Old sites that cleared the localStorage will see the NUX (this would be the same in Core).

While not ideal, I think this is more of an edge case. People clear localStorage when they're troubleshooting an issue, and in that case, it's not unreasonable to think that they'll have to reset some parts of the UI (i.e. sidebar open/close), esp. if it's still dismissible.

@apeatling
Copy link
Member

The list above if correct seems perfectly fine to ship to me.

@Copons
Copy link
Contributor Author

Copons commented Dec 13, 2019

@michaeldcain well, "clearing" localStorage would also happen when you change browser or device.
(Unless, say, the browser synced it, but I don't think that's the case)

@apeatling it's a chore to test, but y'all feel free to 😛

@mmtr
Copy link
Member

mmtr commented Dec 16, 2019

New sites will see the NUX.
Old sites that never opened the block editor will see the NUX.

Just noting that we disabled NUX to cover exactly these scenarios: #32472

Back then, we didn't want those sites to see the NUX.

@mmtr
Copy link
Member

mmtr commented Dec 16, 2019

Back then, we didn't want those sites to see the NUX.

To clarify, we didn't want the NUX to show up on every new site (especially if the user already dismissed it on an existing site).

@Copons
Copy link
Contributor Author

Copons commented Dec 16, 2019

New sites will see the NUX.
Old sites that never opened the block editor will see the NUX.

Just noting that we disabled NUX to cover exactly these scenarios: #32472

Back then, we didn't want those sites to see the NUX.

This PR is supposed to be a stopgap though, a temporary thing while we work on a per-user (instead of per-site) custom NUX, which also involves API changes and so it will take some time to land.

Imho it's preferable to have the guide potentially multiple times for the same user, than to have the user disoriented by the block editor.
Also, I kinda feel most multi-site users are a12s, and I'm sure a12s can endure having to dismiss the NUX many times. 😄
Also 2: imho the WelcomeGuide is far less annoying than the tips. It's more "intrusive" yes, but it's super easy to dismiss for good.

@Copons Copons force-pushed the update/wpcom-block-editor-enable-welcome-guide branch from 733b362 to ebe622e Compare December 16, 2019 12:05
@Copons Copons added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] In Progress labels Dec 16, 2019
@Addison-Stavlo
Copy link
Contributor

New sites will see the NUX.
Old sites that never opened the block editor will see the NUX.
Old sites that opened the block editor after we forced disableTips won't see the NUX.
Old sites that cleared the localStorage will see the NUX (this would be the same in Core).

This is the behavior I am seeing when testing on the sandbox. This all seems reasonable to me. It might be slightly annoying for someone who is consistently changing to new devices or creating all sorts of new sites, but I think the benefit of having this show up for new editor users outweighs that slight annoyance.

Imho it's preferable to have the guide potentially multiple times for the same user, than to have the user disoriented by the block editor.
Also 2: imho the WelcomeGuide is far less annoying than the tips. It's more "intrusive" yes, but it's super easy to dismiss for good.

I agree.

@Copons
Copy link
Contributor Author

Copons commented Dec 17, 2019

Closing since this change is now included in #38248.
Thanks @mmtr! ✨

@Copons Copons closed this Dec 17, 2019
@Copons Copons deleted the update/wpcom-block-editor-enable-welcome-guide branch December 17, 2019 19:14
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 17, 2019
@mmtr
Copy link
Member

mmtr commented Dec 18, 2019

Just landed #38248, so the Welcome Guide should be visible now to all new sites and users who never used the block editor before on their sites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants