-
Notifications
You must be signed in to change notification settings - Fork 272
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
Improve Commit Details View File Tree for deeply nested directory structures. #337
Comments
Hi @niccolomineo, The current behaviour is by design, and is consistent with the Visual Studio Code Explorer View (which also doesn't have horizontal scrollbar, and just truncates the content horizontally). This pattern is relatively common for many file-tree-like views across different software products. Without a horizontal scroll bar it's difficult to intelligently abbreviate file-tree-like content, as everything is important (e.g. the folder structure, file name, additions / deletions, action buttons). There is no universal solution of what should be hidden first, so many products simply truncate the content (as does Git Graph). For example (assuming the current behaviour without a horizontal scroll bar), if I were to change it so that the buttons always appeared on the right and didn't overflow, this would mean that the filename / additions / deletions would have to be truncated if the content overflows - in which case the buttons are meaningless if you don't know what file they're for. Currently in Git Graph there are two ways that help to minimise / eliminate horizontal truncation in the File View side of the Commit Details View:
Additionally, when I first implemented the Commit Details View and decided to truncate horizontal content if it overflows, I kept monitoring for any users reporting that they worked in repositories that are deeply nested, where the current truncation may be less than ideal. In the ~14 months since, and over 500,000 users, not a single other user has raised it as an issue to me (you're the first). Up until now, that was a very good indication to me that the current, very simple, horizontal truncation approach was sufficient for the majority of users, and it wasn't worth adding significant complexity to the code for something that wasn't deemed necessary by users. If it's possible, it would be great if you could reply with a screenshot of an affected Commit Details File View, as it would give me a sense of the structure of the repository and how you work. I don't care about the file names themselves (you can blur or paint them out if they're confidential), I'm just interested in the structure. Visual Studio Code recently introduced a folder grouping mechanism that reduces the horizontal and vertical consumption of file trees by inlining nested directories with only one child directory - perhaps this is something I could do to help reduce the horizontal usage of the Commit Details File View (in File Tree Mode). I'm definitely keen to improve the Commit Details File View for deeply nested repositories, I just think it's best to try to find a solution that reduces the horizontal content if possible, so that as much of the content is visible without having to truncate horizontal content or scroll at all. |
Hi, For the sake of completeness, I can scroll the explorer sidebar horizontally (not sure why you cannot): Btw, keep up with the great work on this extension. I use it in my daily work and it really opened to magic actions the normal git + VSCode combination wouldn't allow me to perform. Thank you! |
@niccolomineo, that's really interesting that you have a horizontal scrollbar on the Explorer sidebar, I just checked on a MacOs Catalina computer and I also don't get one on it either (my screenshot was on Windows). In any case, the perspective I was trying to convey was that I think there are some interesting solutions that may be better for the user than sacrificing the filename/icons, or adding a horizontal scroll bar. I'll explore these possible solutions and reply back with my findings and implementation, as I definitely want to address this current limitation on deeply nested repositories asap. I'd be keen if you're able to find a screenshot at some point of the repository you were facing this issue with. |
…splay deeply nested directory structures, such that folders with a single child folder are compressed into a single combined folder element.
I've enhanced the Commit Details View File Tree renderer to better display deeply nested directory structures, such that folders with a single child folder are compressed into a single combined folder element. This:
This will be available in v1.25.0, which will be released in the next day or so. I'll get more feedback on these changes from a variety of users after the release, to see if the implemented solution meets the needs of deeply nested directory structures. I'm more than happy to make further changes should it be necessary. Please let me know how you find the enhanced renderer after the release, once you find the affected repository you work on. |
Hi, hope all is well. Is there a release date slated for 1.25.0? |
Hi @niccolomineo, I’ve been very unwell the last few weeks. I’d initially planned to release Git Graph 1.25.0 two weeks ago after implementing this feature, however I wasn’t well enough to do my final testing for the release. This weekend I felt slightly better, so I managed to complete my final testing of Git Graph 1.25.0. I intend to release it tomorrow. Apologies for the delay in getting this functionality released. |
In git-graph's commit tree, if you have a file located in a directory that's a leaf of a deep enough tree, the icons next to the filename get cut beyond the right cell margin.
Steps to Reproduce
Steps to reproduce the behaviour:
Expected Behaviour
I should be able to see and click on each of those icons. Having a horizontal scrollbar for that table cell could help.
Environment
The text was updated successfully, but these errors were encountered: