-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
New User Experience (NUX) #6631
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
73e4691
Implement New User Guide
noisysocks 6f51f9a
Fix appearance of DotTip on mobile
noisysocks e29ca34
Remove unnecessary <Fragment>
noisysocks 712180e
Position NUX dots right next to the edge of the button
noisysocks 912019a
Increase NUX tip padding
noisysocks 301bf26
Add margin to sides of NUX tip on mobile
noisysocks deb6d3c
Don't encourage using domReady in the NUX README
noisysocks 69c82ee
Add wp-nux as a dependency of wp-edit-post
noisysocks 1f45212
Suggest that NUX tip identifiers are prefixed
noisysocks e956486
Don't use partial(), which is slated for removal
noisysocks a3070f6
tipID → tipId
noisysocks 15daa9c
Improve NUX JSDoc comments
noisysocks 49a6804
Memoize the getAssociatedGuide() selector
noisysocks 7a1e824
NUX: Dismiss the tip when one clicks away from it
noisysocks 6596c75
Position tooltips above NUX tips
noisysocks be79c13
Remove aria-modal property from DotTip
noisysocks f1911d8
Make order of the markup in DotTip match how they appear visually
noisysocks edd6e91
Improve a11y of DotTip labels
noisysocks ce74253
Dismiss tips instead of disabling when the X is clicked
noisysocks ff09643
Fix DotTip focus issue
noisysocks c8c4d22
NUX: Only show inserter tip in DefaultBlockAppender
noisysocks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -265,6 +265,13 @@ function gutenberg_register_scripts_and_styles() { | |
filemtime( gutenberg_dir_path() . 'build/core-blocks/index.js' ), | ||
true | ||
); | ||
wp_register_script( | ||
'wp-nux', | ||
gutenberg_url( 'build/nux/index.js' ), | ||
array( 'wp-element', 'wp-components', 'wp-data', 'wp-i18n', 'lodash' ), | ||
filemtime( gutenberg_dir_path() . 'build/nux/index.js' ), | ||
true | ||
); | ||
// Loading the old editor and its config to ensure the classic block works as expected. | ||
wp_add_inline_script( | ||
'editor', 'window.wp.oldEditor = window.wp.editor;', 'after' | ||
|
@@ -361,6 +368,7 @@ function gutenberg_register_scripts_and_styles() { | |
'tinymce-latest-lists', | ||
'tinymce-latest-paste', | ||
'tinymce-latest-table', | ||
'wp-nux', | ||
), | ||
filemtime( gutenberg_dir_path() . 'build/editor/index.js' ) | ||
); | ||
|
@@ -408,15 +416,15 @@ function gutenberg_register_scripts_and_styles() { | |
wp_register_style( | ||
'wp-editor', | ||
gutenberg_url( 'build/editor/style.css' ), | ||
array( 'wp-components', 'wp-editor-font' ), | ||
array( 'wp-components', 'wp-editor-font', 'wp-nux' ), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we do the same for 'wp-edit-post'? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👌 0499f5c82 |
||
filemtime( gutenberg_dir_path() . 'build/editor/style.css' ) | ||
); | ||
wp_style_add_data( 'wp-editor', 'rtl', 'replace' ); | ||
|
||
wp_register_style( | ||
'wp-edit-post', | ||
gutenberg_url( 'build/edit-post/style.css' ), | ||
array( 'wp-components', 'wp-editor', 'wp-edit-blocks', 'wp-core-blocks' ), | ||
array( 'wp-components', 'wp-editor', 'wp-edit-blocks', 'wp-core-blocks', 'wp-nux' ), | ||
filemtime( gutenberg_dir_path() . 'build/edit-post/style.css' ) | ||
); | ||
wp_style_add_data( 'wp-edit-post', 'rtl', 'replace' ); | ||
|
@@ -450,6 +458,14 @@ function gutenberg_register_scripts_and_styles() { | |
); | ||
wp_style_add_data( 'wp-edit-blocks', 'rtl', 'replace' ); | ||
|
||
wp_register_style( | ||
'wp-nux', | ||
gutenberg_url( 'build/nux/style.css' ), | ||
array( 'wp-components' ), | ||
filemtime( gutenberg_dir_path() . 'build/nux/style.css' ) | ||
); | ||
wp_style_add_data( 'wp-nux', 'rtl', 'replace' ); | ||
|
||
wp_register_style( | ||
'wp-core-blocks-theme', | ||
gutenberg_url( 'build/core-blocks/theme.css' ), | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I noticed that when dismissing a notice in a guide, and the next tip is not present in the DOM, no tip is being shown. Shouldn't we just skip to the next available tip?
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.
I don't think so. A tip in the guide might rely on the user having read a previous tip, e.g. Now that you've learned about X, this is what Y does!