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

[Feature request] Automatically collapse directories where all files are viewed #120

Open
julioolvr opened this issue Jul 21, 2020 · 2 comments

Comments

@julioolvr
Copy link

When I'm reviewing a big PR I usually close each directory in the tree once I'm done reviewing all files in it. But when I refresh the page (for any reason, say the person that opened the PR pushed new updates) the tree is fully expanded again. It would be very useful to be able to automatically collapse the tree to only show directories with unviewed files.

@berzniz
Copy link
Owner

berzniz commented Aug 4, 2020

Thanks for the suggestion @julioolvr

I'm wondering if storing the latest tree state in localstorage (only of the last PR viewed) will provide a better experience than automatically collapsing the tree. My thinking is that collapsing a tree because of a click somewhere else is indirect and confusing.

Will storing the latest tree state work for your use case? If so, I'm open for accepting a PR for this

@julioolvr
Copy link
Author

That's a very good point - and yeah, that'd definitely work for my use case. The code seems pretty straightforward, I'll give it a shot at creating a PR 👍

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

No branches or pull requests

2 participants