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

[DashboardLayout] Show nested navigation in mini-drawer #4276

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

apedroferreira
Copy link
Member

@apedroferreira apedroferreira commented Oct 18, 2024

Initially was just trying to refactor sidebar navigation to use the same navigation cache and utilities as the PageContainer component.

But this required adding nested navigation to the sidebar for consistency with the warnings we show when there are duplicated navigation items, because the navigation links should match in all variants of the sidebar.

TODO:

Inspiration:

@apedroferreira apedroferreira added the enhancement This is not a bug, nor a new feature label Oct 18, 2024
@apedroferreira apedroferreira self-assigned this Oct 18, 2024
@apedroferreira apedroferreira changed the title Use navigation utils for sidebar selected item [DashboardLayout] Refactor sidebar selected item logic Oct 18, 2024
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 18, 2024
@apedroferreira apedroferreira changed the title [DashboardLayout] Refactor sidebar selected item logic [DashboardLayout] Show nested navigation in mini-drawer Oct 28, 2024
@oliviertassinari oliviertassinari added component: DashboardLayout component: layout This is the name of the generic UI component, not the React module! labels Nov 8, 2024
@douglaszaltron
Copy link

Nice!

@apedroferreira
Copy link
Member Author

Status: right now with useActivePage there's no way to identify a particular item when its properties are the exact same as another. This would be necessary to identify an item instead of another and show that item only as selected in the sidebar.

If multiple items could be shown as selected simultaneously this would not be an issue, otherwise we need to find a solution. Maybe we could generate item ids every time the navigation is changed, but this could be a bit expensive as we'd have to go through the whole navigation tree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: layout This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature PR: out-of-date The pull request has merge conflicts and can't be merged
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

4 participants