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

WIP: collapse/uncollapse all files in tree #4131

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mtrajano
Copy link

@mtrajano mtrajano commented Dec 27, 2024

Seems like this feature is highly requested #4095 #3554

Did a quick wip pr. I got the core functionality working with files and had some questions on what can be improved in order to polish it more. I.e. What keymaps if any to add to these, should the functionality be to toggle vs collapse and uncollapse separately, and if this should be added anywhere else (right now it's just for the file tree)

Once I figure this out I can add the tests, documentations and anything else that's missing. I'm also pretty new to the language so if there's a way I can structure this better please let me know

Example of functionality working:
example

Seems like this feature is highly requested jesseduffield#4095 jesseduffield#3554

Did a quick wip pr. I got the core functionality working with files and
had some questions on what can be improved in order to polish it more.
I.e. What keymaps if any to add to these, should the functionality be to
toggle vs collapse and uncollapse separately, and if this should be
added anywhere else (right now it's just for the file tree)

Once I figure this out I can add the tests, documentations and anything
else that's missing. I'm also pretty new to the language so if there's a
way I can structure this better please let me know
@stefanhaller
Copy link
Collaborator

What keymaps if any to add to these

I could imagine - for collapsing, and = for expanding. At least they are easy to reach on a US keyboard layout. Anybody got any better ideas?

should the functionality be to toggle vs collapse and uncollapse separately

I would probably do separate ones. For toggling it wouldn't be quite clear what the exact logic would be.

and if this should be added anywhere else (right now it's just for the file tree)

Yes, in commits_files_controller.go; this handles the list of files that you see when pressing enter on a commit. I'm not aware of any other places besides these two.

@jesseduffield
Copy link
Owner

I could imagine - for collapsing, and = for expanding.

That sounds good to me

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.

3 participants