Skip to content

Conversation

@dankeboy36
Copy link
Contributor

@dankeboy36 dankeboy36 commented Oct 14, 2025

Closes: #548


scm-tree.mov
problems-tree.mov
  • I used the names label and description to match the VS Code TreeItem API.
  • I named the actions slot after <vscode-collapsible> for consistency.
  • I have shamelessly stolen the styles for the description, actions, and decorations, etc., from VS Code.
  • I kept the action and <vscode-toolbar-button> implementations independent from the tree, but included an example to show that integration is possible. The demo now mirrors the SCM view, including actions, decorators, descriptions, and text overflow handling.
  • I changed the icon container to allow <vscode-icon> with action-icon to produce nicer hover UX. The tree can still handle oversized icons.

@dankeboy36 dankeboy36 force-pushed the fix/548/expose-tree-item-parts branch from a0d19f6 to 2b89f7f Compare October 14, 2025 19:50
@dankeboy36 dankeboy36 changed the title fix: expose tree-item parts for customization fix: add description and actions slot to tree item Oct 14, 2025
@dankeboy36 dankeboy36 marked this pull request as draft October 15, 2025 09:52
@dankeboy36 dankeboy36 force-pushed the fix/548/expose-tree-item-parts branch 3 times, most recently from 3613c91 to 3f4537b Compare October 15, 2025 14:15
@dankeboy36 dankeboy36 marked this pull request as ready for review October 15, 2025 14:20
@dankeboy36 dankeboy36 force-pushed the fix/548/expose-tree-item-parts branch from 3f4537b to 6cfe7fb Compare October 15, 2025 14:29
@dankeboy36 dankeboy36 changed the title fix: add description and actions slot to tree item fix: expose tree item decoration lane Oct 15, 2025
@dankeboy36
Copy link
Contributor Author

Hello, I wanted to check if this or a similar fix can be accepted. Thanks for your time

@bendera
Copy link
Member

bendera commented Oct 27, 2025

Hi! Originally, I planned for the new tree component to be as simple as possible. There are so many variations of it in VSCode that I’m not even sure it can be unified at all. In the previous version, I tried to standardize it based on the Timeline and Explorer widgets, but the API ended up being overly complicated and not flexible enough. That’s why, in the new version, I decided to leave the implementation of the content, text formatting, and interactions up to the user.

On the other hand, your pull request reflects the VSCode Tree API, so it does make sense in that regard. However, I haven’t had time for weeks to review it thoroughly and with a clear head. And I don’t want to merge any changes until I fully understand how it works.

@bendera bendera mentioned this pull request Oct 27, 2025
@dankeboy36
Copy link
Contributor Author

to review it thoroughly and with a clear head. And I don’t want to merge any changes until I fully understand how it works

Hi, thanks for the reply. I totally understand your point about keeping the tree simple.

If there’s anything I can do to make it easier for you to review it, like moving styles to the example or splitting the change into smaller parts, please let me know. You should also have write access if you want to adjust the PR directly.

If it takes more time on your side, I can always fork the repo and keep working there.

Copy link
Member

@bendera bendera left a comment

Choose a reason for hiding this comment

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

I've left few comments.

@bendera
Copy link
Member

bendera commented Nov 10, 2025

Btw., I haven't mentioned it but great job and thanks for the effort you put in!

@dankeboy36
Copy link
Contributor Author

I've left few comments.

Great review, thanks for the links. I learned a lot.

Since the last round, I also adjusted the icon container. I wanted to support action-icon inside the icon slot with the same hover UX, but the previous layout was fixed to 16px and too restrictive. If these changes look good to you, I’m happy to update the public docs as well (https://vscode-elements.github.io/components/tree/#icons).

Please take a look and check out the updated Problems view demo. Thanks for your time

@dankeboy36 dankeboy36 force-pushed the fix/548/expose-tree-item-parts branch from e4d2aa4 to f631698 Compare November 28, 2025 14:51
@dankeboy36
Copy link
Contributor Author

I have squashed the commits to be able to see the change since the last review. I went through the monaco styles once more and created a native VS Code vs Elements comparison:

Native VS Code Dark+:
Screenshot 2025-11-28 at 15 58 46
Screenshot 2025-11-28 at 15 58 53
Screenshot 2025-11-28 at 15 59 00

VS Code Elements Dark+:
Screenshot 2025-11-28 at 15 45 59
Screenshot 2025-11-28 at 15 45 39
Screenshot 2025-11-28 at 15 45 45


Native VS Code Light+:
Screenshot 2025-11-28 at 15 59 14
Screenshot 2025-11-28 at 15 59 19
Screenshot 2025-11-28 at 15 59 27

VS Code elements Light+:
Screenshot 2025-11-28 at 15 45 18
Screenshot 2025-11-28 at 15 45 29
Screenshot 2025-11-28 at 15 55 52

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.

vscode tree styling limitations

2 participants