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 menu fails to mark page ancestor css class #41597

Closed
Humanify-nl opened this issue Jun 8, 2022 · 2 comments
Closed

Navigation menu fails to mark page ancestor css class #41597

Humanify-nl opened this issue Jun 8, 2022 · 2 comments
Labels
[Block] Navigation Affects the Navigation Block [Type] Enhancement A suggestion for improvement.

Comments

@Humanify-nl
Copy link

Humanify-nl commented Jun 8, 2022

Description

There is currently no is-menu-ancestor, nor is there a is-page-ancestor css-class in Gutenberg navigation.

Page children of a page-group are not marked in the menu, making it impossible to 'mark' where the user is, when working with many pages and page-groups.

As devs are being 'forced' to use the new menu in FSE mode, with no usable fallback to the old menu screen, it would be great if it at least has all the basic functions that the old menu used to have.

This is mentioned in an earlier issue #25575 from 2020, but nothing happened with it since.

If the navigation block doesn't have link sub-menus current-page-ancestor class isn't added when viewing a child page.

This must be a bug, as it makes no sense in real life website menu's with more then 20 pages on a site.

Step-by-step reproduction instructions

  1. Add a page 'main-parent'.
  2. Add a second page 'main-child', make 'main-parent' its parent.
  3. Add the navigation block and add the link for 'main-parent'.
  4. Open the site on front, and browse to the 'main-child' page.
  5. See that the menu-item 'main-parent' is not marked with any css class.

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress 6.0
  • No Gutenberg

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

@kathrynwp kathrynwp added [Block] Navigation Affects the Navigation Block [Type] Enhancement A suggestion for improvement. labels Jun 14, 2022
@Marc-pi
Copy link

Marc-pi commented Jul 11, 2022

check #40778

@aristath
Copy link
Member

aristath commented Dec 1, 2022

Fixed in #40778

@aristath aristath closed this as completed Dec 1, 2022
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] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants