Conversation
|
here is preview : gituidynamicsizeworking.webm |
|
@Hari-Oggy Thanks for the PR! @extrawurst @naseschwarz I’m wondering whether we should go for the manual solution presented in this PR or rather for an automatic one that doesn’t require manual intervention, but would make customization impossible. What do you think? |
|
@extrawurst @naseschwarz Friendly ping: what do you think about whether the left column’s width should be resized automatically by |
|
In this PR, GitUI automatically manages the left column's width while still allowing users to manually adjust both width and height. This approach provides a responsive layout with user customization options. Screencast.from.2025-10-23.10-15-02.webmThe preview shows two versions:
|
@cruessler what automated solution would that be? |
|
@extrawurst Sorry for the long delay! I was thinking of responsive web design where the layout is completely determined by CSS or of tiling window managers that arrange windows automatically according to the space available. I think there might be different use cases here that made me hesitate:
I admit that this might not be the strongest argument for completely automatic layout. If you think it’s a good idea to provide the manual level of control proposed in this PR, I’m happy to start the actual review! |
|
If I might chime in...
EDIT Builds on top of |
|
Small issue: Up/Down arrows are reversed. E.g. Alt+down with "Unstaged changes" in focus increases size of the "Staged changes". |
|
Another little issue: On the |
a81f0cb to
f27434a
Compare
|
@savchenko Thanks for catching these! Both issues have been fixed — Alt+Up/Down now resize the correct section, and Alt+Left/Right works properly in the Commit column. |
alerque
left a comment
There was a problem hiding this comment.
The code for this looks great at a first blush, but I haven't actually test driven it yet.
Just as a first pass though do you have any feedback on why implementing this with a new hand rolled set of keybindings and actions is better or how it compares to using something like ratatui-hypertile for the purpose?
|
This PR was opened before ratatui-hypertile existed (Oct 2025), so I implemented the resizing manually. Since GitUI already has its own keybinding and action system, I kept it consistent with that instead of introducing a new dependency. Also, this change is limited to resizing a fixed set of panels, so a simple local implementation felt sufficient. Happy to revisit this if you think using ratatui-hypertile would be a better fit. |
|
@Hari-Oggy Thanks for the explanation, and that makes sense, both historically and in the context of the code base. I just happened to have run across the hypertile widget shortly before ending up here doing reviews — and incidentally having my own project that needs something similar, so I was evaluating approaches. Even if perhaps moving to hypertile down the road might make sense I do think starting out this way with something that addresses the need as directly and simply as possible is probably a good way to start. |
|
Would the next logical step be to make sure this same change gets evenly applied to other similar pane scenarios, e.g. obsoleting the manual adjustment in #2772? |
This Pull Request fixes/closes #2669.
It changes the following:
Constraint::Percentagevalues with configurable stateI followed the checklist:
make checkwithout errorshere is preview:
gituidynamicsizeworking.webm