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

Tree sticky scroll: Support compact sticky nodes #199539

Closed
Tyriar opened this issue Nov 29, 2023 · 3 comments
Closed

Tree sticky scroll: Support compact sticky nodes #199539

Tyriar opened this issue Nov 29, 2023 · 3 comments
Assignees
Labels
feature-request Request for new features or functionality on-testplan tree-sticky-scroll Sticky Scroll in Trees

Comments

@Tyriar
Copy link
Member

Tyriar commented Nov 29, 2023

Testing #199153

For this dir structure:

image

We see this:

image

But that omits likely the most important parts which are a, b, c, d, e. So this is what I expect in this case where the maximum is hit:

image

I don't think the editor does this either (cc @aiday-mar), but some prior art in the terminal is that it prioritizes the most important parts of the prompt to show. Say you have this prompt:

1
2 <cwd>
3 $ <multi-line
4 command>

Lines will be prioritized by command input first, remaining prompt second and empty lines on either end will be trimmed, resulting in 3 > 4 > 2.

@aiday-mar
Copy link
Contributor

aiday-mar commented Nov 29, 2023

Indeed we do not do that in the editor. I think it's also maybe because generally a code hierarchy is not as deeply nested as the hierarchy in the explorer, so it was not so necessary.

@Tyriar
Copy link
Member Author

Tyriar commented Nov 29, 2023

Another idea is to compact items when they hit the maximum like breakcrumbs or compact folders in the explorer 🤔

image
image

So this:

image

Could smartly merge as needed:

image

This would also be handy for the editor to make better use of available horizontal space.

@benibenj
Copy link
Contributor

I've started work on exactly this. Compressing the nodes is a cool solution to this problem, but is a lot of work due to the way compressed trees are implemented. Won't be part of this release.

I also had a prototype which supported showing the last 5 elements instead of the first 5, however, the user experience just wasn't nice when scrolling. Also, other trees such as for example in the GHPRI extension have the first or second node as the most important one.

@benibenj benibenj modified the milestones: November 2023, On Deck Nov 29, 2023
@benibenj benibenj added tree-sticky-scroll Sticky Scroll in Trees feature-request Request for new features or functionality labels Nov 29, 2023
@benibenj benibenj changed the title Tree sticky scroll: deeply nested sticky scrolls should show the more relevant entries Tree sticky scroll: Support compact sticky nodes Nov 29, 2023
@benibenj benibenj modified the milestones: On Deck, December / January 2024 Jan 3, 2024
@aiday-mar aiday-mar added this to the December / January 2024 milestone Feb 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality on-testplan tree-sticky-scroll Sticky Scroll in Trees
Projects
None yet
Development

No branches or pull requests

4 participants
@Tyriar @benibenj @aiday-mar and others