-
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
Add initial navigation editor user docs #34985
Conversation
Size Change: -199 B (0%) Total Size: 1.06 MB
ℹ️ View Unchanged
|
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.
Nice work adding this in Dan. I think it's a great start which we can augment and iterate on over time.
I added some "nit" comments where I felt we could make things clearer or improve the formatting. All minor stuff.
|
||
# Block-based menu editor | ||
|
||
The Block-based Navigation Editor brings the power of blocks to the Appearance > Navigation section in the WordPress Administration Screens allowing you use blocks to create menus. |
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.
Are we going to use the term menu
or navigation
? Menu doesn't sort of bind us to the classic menus screen...
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.
Yeah, I don't know! This question was also asked in the tracking issue. The button is currently 'New menu' in the editor, so I think as longs as the docs match the UI it's ok.
If/when the UI changes we can update the docs to match.
I personally can't see a switch entirely to 'Navigation' because 'New navigation' doesn't sound right. That might be because navigation is an uncountable noun, so it can't represent a tangible item.
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.
Oh, I see now you were referring to the title. Good point, I changed it.
|
||
The interface replicates the Post Editor experience, allowing you to use similar workflows like drag and drop. | ||
|
||
The editor provides access to all the menus created using the previous Menu screen in WordPress. |
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.
The editor provides access to all the menus created using the previous Menu screen in WordPress. | |
The editor provides access to all/any of the menus you created using the classic `Menus` screen in WordPress. |
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.
It's a nitpick, but I don't think 'you' is correct because different users could've created the menus, not just the reader. 😄
I'm a bit hesitant about saying 'classic' right now. Widget docs use the term 'previous', so I think it's good to stay consistent. This might change if we decide to use the term 'classic' in the UI or as a plugin.
The sentence is a bit awkward, but I don't know, I think I'll leave it for now.
|
||
The editor provides access to all the menus created using the previous Menu screen in WordPress. | ||
|
||
New menus can also easily be created, providing options to easily create a menu from an existing page hierarchy, by copying an existing menu, or creating a blank menu. |
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.
New menus can also easily be created, providing options to easily create a menu from an existing page hierarchy, by copying an existing menu, or creating a blank menu. | |
New menus can also easily be created: | |
* from an existing `Page` hierarchy | |
* by copying an existing menu, | |
* by creating a blank menu. |
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've gone half and half on this. I don't like leaving out that the editor 'provides options', because otherwise the 'by copying an existing menu' part makes it sound like the user has to find the menu, copy it, and then paste it.
Lets avoid using backticks for words because this formats it like code, which I don't think is relevant for user docs.
I only used them for the +
button because it makes it look more like the icon, but I expect there will be images in the final docs.
|
||
1. Click one of the `+` buttons. | ||
2. Select the type of link you want to add. | ||
3. Use the dialog to search for the item you want to link to. For a custom link, type in a URL and hit 'Enter'. |
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.
3. Use the dialog to search for the item you want to link to. For a custom link, type in a URL and hit 'Enter'. | |
3. One the item is inserted into the editor, use the dialog to search for the item you want to link to. Alternatively, for a custom link, type in a URL and hit 'Enter'. |
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 'Once the item is inserted into the editor' is needed because the line above tells them to insert it and it happens immediately.
I have changed this by splitting out the instructions for a custom link, which I think makes it clearer.
2. Select the type of link you want to add. | ||
3. Use the dialog to search for the item you want to link to. For a custom link, type in a URL and hit 'Enter'. | ||
|
||
### How to add a submenu block |
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.
### How to add a submenu block | |
### How to add a submenu |
The goal is to add a submenu. At this point the "block" is an implementation detail.
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.
Yeah, I initially started with that, but added 'block' because this heading was very similar to 'How to create a menu' 🤔
Maybe that's ok, I'll change it back.
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 changed this and the above heading to 'How to insert a link' and 'How to insert a submenu', which I think is better all round 👍
|
||
### How to add a submenu block | ||
|
||
There are two ways to create a submenu, the first option is to create a new submenu from scratch: |
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.
There are two ways to create a submenu, the first option is to create a new submenu from scratch: | |
There are two ways to create a submenu. | |
The first option is to create a new submenu from scratch: |
Excellent work Dan! Thank you for spending time on this :) |
role="menuitem" | ||
icon={ external } | ||
href={ __( | ||
'https://github.com/WordPress/gutenberg/tree/trunk/packages/edit-navigation/docs/user-documentation.md' |
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 was translating some strings to my native language and ran into this one. I've seen it in use in a couple other places as well, so I'm curious as to why we use _()
within the href
attribute.
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.
Thanks for pointing that out. It's not needed here, as these docs aren't internationalized.
I'll spin up a PR to remove it (#35313).
Description
Fixes #34266
Adds some initial navigation editor user documentation.
This is heavily based on the docs for the widget editor (https://wordpress.org/support/article/block-based-widgets-editor/).
As the editor is developed these can be refined before eventually making their way to the wordpress.org website prior to release.
I've also added a link to the documentation from the editor in this PR, but unfortunately that won't work until the PR is merged.