Skip to content

Fold folders up into parent if alone in directory #288

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

Merged
merged 17 commits into from
Sep 27, 2020

Conversation

WizardOhio24
Copy link
Contributor

Closes #192.
Folds folders up into their parent if they are the only item it their directory. For example:
Before:
before_screenshot
After:
after_screenshot

@extrawurst
Copy link
Collaborator

@WizardOhio24 thanks for tackling this! Very appreciated. But on a first glance I do not see any tests. can you cove this new implementation with a few tests?

@WizardOhio24
Copy link
Contributor Author

Will do

@WizardOhio24
Copy link
Contributor Author

Tests added, let me know if there's anything else that should be added/changed

@extrawurst
Copy link
Collaborator

I think we need more unittests for the selection moving code, there is still some strange bug with collapsing a folded up path:

Screenflick Movie 70

@WizardOhio24
Copy link
Contributor Author

I didn't consider the right and left arrow keys for navigation (only up/down), thanks for pointing that out. It should be an easy fix.

@WizardOhio24
Copy link
Contributor Author

Bug fixed and right/left navigation tests added.
It was left navigation which was going to the previous index, rather than using the new method (available_selections) in up/down navigation.

@extrawurst
Copy link
Collaborator

Really cool thanks!

@extrawurst extrawurst merged commit adb6025 into gitui-org:master Sep 27, 2020
@extrawurst
Copy link
Collaborator

@WizardOhio24 damn just found another bug: left used to jump up to the current parent directory. now it seems to only move up one

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.

Compact Treeview
2 participants