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 Component: Add ul Automatically Where Needed #25248

Closed
Copons opened this issue Sep 11, 2020 · 0 comments · Fixed by #25280
Closed

Navigation Component: Add ul Automatically Where Needed #25248

Copons opened this issue Sep 11, 2020 · 0 comments · Fixed by #25280
Assignees
Labels
[Feature] Navigation Component A navigational waterfall component for hierarchy of items. [Status] In Progress Tracking issues with work in progress

Comments

@Copons
Copy link
Contributor

Copons commented Sep 11, 2020

NavigationMenu can contains multiple lists or NavigationGroups, so it doesn't wrap its children with an ul.
On the other hand, NavigationItem is a li, so it needs to live inside an ul.
See the story for an example.

Possible solutions:

  • By traversing the NavigationMenu children, we can determine if it needs an ul and automatically add it, instead of offloading the burden to the consumer.
    Depends on Navigation Component: Store the Navigation Tree in the Context #25246 exploration.

  • Make NavigationMenu always render as an ul, and NavigationGroup as a <li><ul /></li>.
    In other words, if a menu contains only one list, it will be a simple lists; otherwise it will be a list of lists (whereas right now is a "series" of lists).

See #25057 (comment)

@Copons Copons added the [Feature] Navigation Component A navigational waterfall component for hierarchy of items. label Sep 11, 2020
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Navigation Component A navigational waterfall component for hierarchy of items. [Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants