-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance this would return undefined
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:
DotTip
show up only once. Once you close it or reload the page, it will never show again.Technical Side:
nux
module allowing any WP module to add "tips".Provider
and then inserting severalDotTip
components in the different places we want to show tips. (Other type of tips will be added later)data
module to store a local statepersist
enhancer to thedata
module 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.