-
Notifications
You must be signed in to change notification settings - Fork 36.3k
Hide twisties and indentation when tree nodes have flat hierarchy #277923
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
Conversation
Co-authored-by: dmitrivMS <[email protected]>
…o hierarchy" This reverts commit 5b39a71.
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @TylerLeonhardtMatched files:
|
|
🤖 Copilot has tried out this change! Members of the team can view the recording here or download the Playwright trace here (run) |
|
🤖 Copilot has tried out this change! Members of the team can view the recording here or download the Playwright trace here (run) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements the hiding of twistie icons and indentation in tree views when there are no nested items, specifically for the QuickInputTree component. This saves horizontal space when all items are at the top level.
Key Changes
- Flat hierarchy detection: The
setTreeDatamethod now detects when items have no children by checking ifitem.children?.lengthexists during tree element creation - Visual treatment: Applied CSS rules to hide twistie icons and indent containers when the
quick-input-tree-flatclass is present - Bug fix: Corrected missing parentheses in
Emitterconstructor call
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/vs/platform/quickinput/browser/tree/quickInputTreeController.ts | Added flat hierarchy detection logic and constant, fixed Emitter syntax, and toggles CSS class based on nested items |
| src/vs/platform/quickinput/browser/media/quickInput.css | Added CSS rules to hide twistie and indent elements when flat hierarchy class is applied |
src/vs/platform/quickinput/browser/tree/quickInputTreeController.ts
Outdated
Show resolved
Hide resolved
…er.ts Co-authored-by: Copilot <[email protected]>
|
@copilot change this: |
Change condition from `if ((item.children?.length ?? 0) > 0)` to `if (item.children && item.children.length > 0)` for better clarity. Co-authored-by: dmitrivMS <[email protected]>
Done in d7e8e78 |
|
@dmitrivMS Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub. You can ask me to try again later by mentioning me in a new comment. If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: Sorry for the inconvenience! |

Fixes #259879