-
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
Update navigation editor placeholder #34568
Conversation
Size Change: +2.4 kB (0%) Total Size: 1.04 MB
ℹ️ View Unchanged
|
Thanks for working on this, @talldan. It looks much better from a UX perspective, in my opiniton. If the current goal is to achieve parity with the "old" navigation screen, I think we can remove the "Copy existing menu" option. It doesn't exist on the current screen. Minor code related notes:
|
packages/edit-navigation/src/components/block-placeholder/index.js
Outdated
Show resolved
Hide resolved
packages/edit-navigation/src/components/block-placeholder/menu-items-to-blocks.js
Outdated
Show resolved
Hide resolved
I think this also fixes #30745. |
This looks nice. I would improve a couple of things:
|
If we were to do that and if we also had the interface to add links in bulk… we wouldn't need this placeholder state, right? I think that would simplify things a lot. |
In that case, I think we can just display the "blank state" when a new menu is created. We'll need to solve #31276 as well. |
I think copy existing menu is a nice feature to have. That is the user me who constantly fiddles with his WordPress blog. |
I think it's a good feature too, but maybe we could have a "Duplicate this menu" option or a way to paste a copied navigation instead (which I think we don't have, right?), and remove one step from the menu creation process. |
Co-authored-by: George Mamadashvili <[email protected]>
17a6ac6
to
b386aba
Compare
I think the copy menu option is a good feature, but then I like the duplicate menu idea too. I also quite like that the navigation editor guides the user through creating a menu in a very friendly way after this change, I wouldn't feel so good about leaving the user with an empty block after a menu has been created. My opinion is that it could be revisited, but right now the placeholder that's in |
packages/edit-navigation/src/components/block-placeholder/index.js
Outdated
Show resolved
Hide resolved
packages/edit-navigation/src/components/block-placeholder/index.js
Outdated
Show resolved
Hide resolved
Thanks for the re-review @Mamaduka, I think I've addressed all of that.
Here's an example of how that would look: I like it. What do you think @javierarce? I suppose it's a matter of whether we want to encourage users down the 'Start blank' path. |
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 working on this, @talldan.
I think this is a great improvement.
Cool, lets merge, and then if we want to try any other options discussed here it should be easy to iterate. |
Description
Fixes #33999
Fixes #23953
Fixes #30745
Updates the navigation editor's block placeholder when creating a new navigation block.
Implementation wise, this doesn't feel ideal. There was a lot of discussion on #23953 about a possible implementation that didn't affect the navigation block. When I started looking at this, I discovered the no matter what we do, the navigation block's current placeholder 'preview' needed to be disabled somehow as it always showed on block deselection:
I found it was equally as simple to disable this via a filter as it was to pass a replacement placeholder component into the block. So this is what I chose as the simplest approach.
Ultimately, this is an important piece for the navigation editor, and I think it's good to prioritise this as much as possible.
A problem with this change is that this now exposes the issue described in #31276 even more after clicking 'Start blank' and deselecting the block, so I'll start looking at that next.
How has this been tested?
It has existing e2e tests that have been updated.
Screenshots
Types of changes
New feature (non-breaking change which adds functionality)
Checklist:
*.native.js
files for terms that need renaming or removal).