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

NUX: Make disabling tips instance specific. #12633

Closed
TimothyBJacobs opened this issue Dec 6, 2018 · 3 comments
Closed

NUX: Make disabling tips instance specific. #12633

TimothyBJacobs opened this issue Dec 6, 2018 · 3 comments
Labels
[Feature] NUX Anything that impacts the new user experience [Type] Enhancement A suggestion for improvement.

Comments

@TimothyBJacobs
Copy link
Member

Is your feature request related to a problem? Please describe.
If I disable tips in the Block Editor, I don't want that to hide tips for all other apps in my WordPress install.

Describe the solution you'd like
Something like context that would function similarly to the notices package. areTipsEnabled, enableTips and disableTips would all take an optional context parameter that defaults to global. Perhaps that'd include modifying the <DotTip /> component to include a context prop, it could be inferred from the tipId but that is almost certainly not correct for "shared spaces" like the editor.

Alternately, the context could be set for the entire page load and would just effect the reducer ( which would in turn mean they are persisted differently in localStorage. Like wp.nux.setContext().

For clarity, I mean a reducer shape something like this.

{
  "preferences": {
    "areTipsEnabled": ["global", "my-app"]
  }
}

Or if was important to distinguish the null state.

{
  "preferences": {
    "areTipsEnabled": {
      "global": true,
      "my-app": false
    }
  }
}

Describe alternatives you've considered
Heavily monkey patching isTipVisible(). #12632 would alleviate this need a bit since it'd be less likely that users would completely disable tips.

@designsimply
Copy link
Member

Would adding the ability to disable tips in one context area over another also cover the case you raised in #12632? Why is a separate issue needed for that case? Can that one be consolidated into this issue?

@designsimply designsimply added [Type] Enhancement A suggestion for improvement. [Feature] NUX Anything that impacts the new user experience labels Dec 6, 2018
@TimothyBJacobs
Copy link
Member Author

As I mentioned, I think #12632 does alleviate the need partially, but I think they are distinct features.

For instance, I'm planning on having an "enable/disable" tips control in the Screen Options section of our plugin section. It isn't particularly clear that disabling tips there would disable tips for the entirety of WordPress. And vice-versa, disabling the tips in the Gutenberg options doesn't seem clear that it'd disable tips for our plugin.

Also, for clarity, I'm not sure I'd sum up #12632 as disabling tips in a certain area. More that it'd remove the current guide from the store state. It wouldn't necessarily be a permanent disabling of that guide, as I don't there is any way to permanently identify a guide.

@noisysocks
Copy link
Member

Closing this out as DotTip is deprecated as of #18981. The Welcome Guide which has replaced tips uses isFeatureActive instead of areTipsEnabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] NUX Anything that impacts the new user experience [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants