Skip to content

feat: use background color to highlight the selected navigator tree#5667

Open
shreyanshkotak wants to merge 4 commits intowebstudio-is:mainfrom
shreyanshkotak:selected-navigator-tree-background-5206
Open

feat: use background color to highlight the selected navigator tree#5667
shreyanshkotak wants to merge 4 commits intowebstudio-is:mainfrom
shreyanshkotak:selected-navigator-tree-background-5206

Conversation

@shreyanshkotak
Copy link
Copy Markdown
Contributor

Description

This updates the navigator to use Figma-style subtree highlighting instead of relying on vertical depth lines, which makes deeply nested selections easier to follow. The selected node keeps the primary selected background, its descendant subtree gets a lighter background, and the navigator hides depth bars to reduce visual noise.

Related to (#5206)

Steps for reproduction

  1. Open the Builder and create or expand a deeply nested navigator tree.
  2. Select a node that has multiple nested descendants.
  3. Expect the selected node to have the active background, its descendant subtree to have a lighter background, and the navigator to no longer rely on vertical guide lines for orientation.
background.color.to.highlight.mov

Code Review

  • hi @kof, I need you to do
    • conceptual review (architecture, feature-correctness)
    • detailed review (read every line)
    • test it on preview

Before requesting a review

  • made a self-review
  • added inline comments where things may be not obvious (the "why", not "what")

Before merging

  • tested locally and on preview environment (preview dev login: 0000)
  • updated test cases document
  • added tests
  • if any new env variables are added, added them to .env file

shreyanshkotak and others added 4 commits March 26, 2026 18:28
Highlight the selected navigator item subtree with a lighter child
background so nested descendants remain easy to identify.

Add a selected-descendant state to the shared tree component, tint
visible descendants with a lighter blue, and keep depth bars visible
with their default color while the navigator is hovered.
Disable tree depth bars when hovering the navigator while keeping the
behavior navigator-specific.

Add an opt-in TreeRoot prop for hover depth bars in the shared tree
component, and set Navigator to keep them hidden on hover so the subtree
selection highlight remains cleaner.
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.

1 participant