Skip to content
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

Navigation block: missing inline + inserter to add new menu items without selecting parent block #37572

Closed
annezazu opened this issue Dec 22, 2021 · 7 comments · Fixed by #37637
Assignees
Labels
[Block] Navigation Affects the Navigation Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@annezazu
Copy link
Contributor

Description

I cannot see a quick inserter for adding additional navigation items unless I select the overall parent block. Previously, I was able to see a + in line to quickly add menu items. Now I have to add an item and select the overall parent block once more in order to add additional links to the menu. This seems to be a regression at worst and a step backwards for UX either way by adding additional not terribly intuitive steps. cc @jasmussen for insights :D

Step-by-step reproduction instructions

  1. Add a navigation block.
  2. Add a new link to a page or post.
  3. See that there isn't a + option to quickly add more items.
  4. Select the overall parent navigation block in order to see the option return.

Screenshots, screen recording, code snippet

add.new.nav.menu.items.mov

Environment info

  • No Gutenberg
  • WordPress
  • Twenty Twenty-two theme
  • WordPress 5.9-beta4-52408

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@annezazu annezazu added [Type] Bug An existing feature does not function as intended [Block] Navigation Affects the Navigation Block labels Dec 22, 2021
@jasmussen
Copy link
Contributor

This is an intentional change as of #36605. I recognize that's a bit of a shift to what we've been used to, but the behavior is identical to that of social links, buttons, groups, and any other container blocks. Part of that conversation was the deliberate balancing of tradeoffs:

  • Do we accept the nearly-always jarring shifts in the layout that happen when the plus button appears on selection?
  • Or do we remove that shift, but require you to rely on other methods of inserting blocks?

To recap the ways you can insert blocks, there's the top left inserter, there's insert before/after in the block toolbar more menu, there's the sibling inserter (hover between two blocks) and of course you can select the parent.

In accepting the trade-off a stated goal was also to continue to refine the in-canvas methods for adding blocks, one idea being to extend the sibling inserter to not only allow inserting between blocks, but also before the first and after the last blocks:

@courtneyr-dev
Copy link
Contributor

courtneyr-dev commented Dec 22, 2021

I found adding pages to a new navigation menu exceptionally confusing. It feels extra complicated by not having a preview of pages to include, but the way to insert additional links was challenging.

navigation.menu.mp4

@annezazu
Copy link
Contributor Author

Thanks for the explanation @jasmussen! I can see how this was a tricky call to make. My two cents is that this makes it much harder to quickly create menus which seems to run against the lighter navigation experience work.

@jasmussen
Copy link
Contributor

The formula for creating navigation blocks from scratch changed rather fundamentally and abruptly when the saving mechanism was introduced. It's mostly stabilized, and I think it affords an option in the future to require much less building, potentially being pre-populated with a "default menu" (just the pages on your site). In the mean time, it requires this difficult tradeoff. CC: @youknowriad if you have any thoughts.

@annezazu
Copy link
Contributor Author

Okay! I'll be sure this is clear in the documentation. I wanted to note though that I do not see the sibling inserter in the current iteration (tried with just 5.9 beta 4 and with Gutenberg 12.2):

sibling.inserter.mov

@jasmussen
Copy link
Contributor

#37637 is a PR that takes a stab at changing this behavior just for the navigation block. It's not a PR I really love, neither codewise or the fact that it changes an otherwise standardized behavior. But you're not wrong: looking at the navigation block in isolation, it's not an ideal behavior.

My best hope is that we can get some quick conversation going on that PR to see if/how we can best land a solution, at least for the near term.

Thank you for your patience!

@tellthemachines
Copy link
Contributor

I'm not sure how widely-known this is, but pressing Enter immediately after creating a nav link inserts another nav link. This makes it quicker even than showing the inline inserter, but of course folks have to know about it... I wonder if there's any way of making this obvious?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants