Skip to content

Feat/improve ux nav menu#13483

Open
Anderson-Andre-P wants to merge 5 commits into
flutter:mainfrom
Anderson-Andre-P:feat/improve_ux_nav_menu
Open

Feat/improve ux nav menu#13483
Anderson-Andre-P wants to merge 5 commits into
flutter:mainfrom
Anderson-Andre-P:feat/improve_ux_nav_menu

Conversation

@Anderson-Andre-P

Copy link
Copy Markdown
Contributor

Improves the sidebar navigation UX with two visual changes:

  1. Increased indentation of nested nav items — the margin-left of collapsed sub-lists was too small, making the
    hierarchy hard to read. Increased from 0.675rem to 1.75rem for clearer visual nesting.
  2. Active page highlight — the previously active item had only a very subtle background (4% opacity black/white) that
    was hard to notice. The li containing the current page now receives a light blue background (color-mix with the site
    primary color at 12% opacity) and a 3px solid blue left border, making it immediately clear which page the user is
    on.

Both changes use existing CSS variables (--site-primary-color) to respect light and dark mode automatically.


Issues fixed by this PR (if any):

None.


PRs or commits this PR depends on (if any):

None.

@Anderson-Andre-P Anderson-Andre-P requested review from a team and sfshaza2 as code owners June 9, 2026 22:50

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the sidebar styling to highlight active navigation links and increases the indentation of nested lists. The review feedback points out a visual hover bug, layout shift, and browser compatibility issues introduced by using :has() on the container, suggesting styling the anchor tag directly instead. Additionally, it recommends replacing margin-left with margin-inline-start to ensure proper RTL layout support.

Comment thread sites/docs/lib/_sass/components/_sidebar.scss
Comment thread sites/docs/lib/_sass/components/_sidebar.scss Outdated
Anderson-Andre-P and others added 2 commits June 9, 2026 21:08
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

@Anderson-Andre-P Anderson-Andre-P left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Moved background, border, and padding directly to the a tag, removing the :has() block. Added padding-inline-start: calc(0.4rem - 3px) to compensate for the border width and keep text aligned with inactive items.

@flutter-website-bot

Copy link
Copy Markdown
Collaborator

Staged preview of the updated docs.flutter.dev site (updated for commit cecabaa):

https://flutter-docs-prod--docs-pr13483-feat-improve-ux-nav-me-k8f9yxi4.web.app

@flutter-website-bot

Copy link
Copy Markdown
Collaborator

Staged preview of the updated flutter.dev site (updated for commit cecabaa):

https://flutter-dev-230821--www-pr13483-feat-improve-ux-nav-me-m9xdw2gd.web.app

@parlough parlough self-requested a review June 10, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants