NUX: bootstrap a NUX module#4173
Conversation
| * @return {Boolean} Whether the tip has been shown or not | ||
| */ | ||
| export function tipHasBeenShown( state, tipId ) { | ||
| return state.nux.tips[ tipId ]; |
There was a problem hiding this comment.
Any chance this would return undefined?
There was a problem hiding this comment.
good point, I think it's possible which still produces a "falsy" value but might better to force false
|
Firstly, thanks @youknowriad for a great start on this! I really do like the pulsing dot. I am not so sure we need to add in a speech arrow to the block though as that adds in confusion, could we have more like the mockup in future iterations? Similarly, could it be to the side and wider? These are all cosmetic suggestions. Here is a visual of what we have right now: Excited to see how this shapes up more! |
karmatosed
left a comment
There was a problem hiding this comment.
Added a few visual changes I'd like to see as a comment.
|
Does this need to be a separate module, or merely a small set of |
Yes, that's the idea. The persistence though is just a convenience though. I'd prefer if we had a server-side API for user preferences here.
The advantage of separating modules is the possibility to use it in other pages than the "editor" page. This could be useful in any WP page.
My understand of the |
|
Closing this for now, I'll revisit on clean PR when the time comes |

refs #3670 Still WIP but worth a review
This PR bootstraps the work on the NUX.
Functional Side:
DotTipshow up only once. Once you close it or reload the page, it will never show again.Technical Side:
nuxmodule allowing any WP module to add "tips".Providerand then inserting severalDotTipcomponents in the different places we want to show tips. (Other type of tips will be added later)datamodule to store a local statepersistenhancer to thedatamodule as helpers and updated it to be able to use it several times.Testing instructions
You can reset the state of the already shown dots by clearing the local storage.