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 Link block uses incorrect classname for nested submenu #21444

Closed
talldan opened this issue Apr 7, 2020 · 1 comment
Closed

Navigation Link block uses incorrect classname for nested submenu #21444

talldan opened this issue Apr 7, 2020 · 1 comment
Assignees
Labels
[Block] Navigation Affects the Navigation Block [Type] Code Quality Issues or PRs that relate to code quality

Comments

@talldan
Copy link
Contributor

talldan commented Apr 7, 2020

Describe the bug
The Navigation block uses a Navigation Link inner block and each Navigation Link can also have child Navigation Links to create sub-menus, e.g.:

- Navigation
  '- Navigation Link
      '- Navigation Link

However when building a deeply nested navigation block and checking the class names used in a post, an incorrect wp-block-navigation__container class is used within wp-block-navigation-link:
Screenshot 2020-04-07 at 1 07 54 pm

This can also be seen in the Navigation Link's edit function where an incorrect wp-block-navigation__container class is used:
https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/navigation-link/edit.js#L300

This should be easier to solve in both places once #21075 is merged.

To reproduce
Steps to reproduce the behavior:

  1. Build a deeply nested navigation block
  2. Preview the post
  3. Observe the incorrect class names when inspecting a nested menu

Expected behavior
The wp-block-navigation__container should be changed to wp-block-navigation-link__container.

@talldan talldan added [Type] Code Quality Issues or PRs that relate to code quality [Block] Navigation Affects the Navigation Block labels Apr 7, 2020
@jasmussen
Copy link
Contributor

This should be easier to solve in both places once #21075 is merged.

Since that one is merged now, is it time to revisit this one?

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 [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

No branches or pull requests

3 participants