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

Fix compressed navigator indent highlight #13162

Merged
merged 2 commits into from
Dec 19, 2023
Merged

Conversation

msujew
Copy link
Member

@msujew msujew commented Dec 10, 2023

What it does

Fixes #13114

The idea for this fix is fairly straighforward: During the rendering process, simply ignore all tree nodes that don't contribute a separate indentation to the navigator. In the compressed tree, only the head node of the compression chain actually contributes an indentation marker, so we need to check that in the new shouldRenderIndent method.

How to test

  1. Create a workspace similar to what's outlined in File Explorer displays wrong indent guide with compact folders #13114
  2. Assert that the navigator indent highlight is being correctly calculated

Review checklist

Reminder for reviewers

@msujew msujew added tree issues related to the tree (ex: tree widget) ui/ux issues related to user interface / user experience labels Dec 10, 2023
Copy link
Contributor

@martin-fleck-at martin-fleck-at left a comment

Choose a reason for hiding this comment

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

Change looks good to me and works well, thank you very much @msujew! I just have a very nit-picky issue in one of the docs.

packages/core/src/browser/tree/tree-widget.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@martin-fleck-at martin-fleck-at left a comment

Choose a reason for hiding this comment

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

LGTM!

@msujew msujew merged commit 74a91ba into master Dec 19, 2023
13 of 14 checks passed
@msujew msujew deleted the msujew/fix-indent-highlighting branch December 19, 2023 14:36
@github-actions github-actions bot added this to the 1.45.0 milestone Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tree issues related to the tree (ex: tree widget) ui/ux issues related to user interface / user experience
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

File Explorer displays wrong indent guide with compact folders
2 participants