feat: enhance split (side-by-side) diff viewer rendering#40
Conversation
Signed-off-by: shatrughan mishra <shatrughanm485@gmail.com>
internal/tui/view.go
Outdated
| } | ||
|
|
||
| // Threshold for split-view: 120 chars available | ||
| const splitViewThreshold = 120 |
There was a problem hiding this comment.
Ok, this looks much better, there are a few things you can do to greatly improve the UX:
- reduce the
splitViewThreshold, 120 is too wide, 80 should be good enough.
Then, in a follow-up PR, add these features:
- add a vertical line to separate the diffs, use the same color as the border colors from the panels, if you struggle with this one I can help you with it.
- add line numbers
- add a keybind to manually switch from split view to unified view (which also stays the fallback if the screen is narrow, judged by
splitViewThreshold
There was a problem hiding this comment.
Just to confirm should i only reduce the splitviewthreshold to 80 in this pr and Implement the separator line numbers and keybind improvements in a follow-up PR after this one is merged?
There was a problem hiding this comment.
yes, reduce the splitViewThreshold to 80 in this PR and work on the rest in a follow-up PR
|
@shatrughantwt if you want to continue working here, you can close #38 |
|
On second though: it should be fine to only do this in this PR - reduce the |
Signed-off-by: shatrughan mishra <shatrughanm485@gmail.com>
Signed-off-by: shatrughan mishra <shatrughanm485@gmail.com>
Signed-off-by: Ayush <mail@ayuch.dev>
Description
Fixes #36
This PR enhances the TUI diff viewer by improving the split (side-by-side) view rendering.
Changes
The viewer now works reliably with colored diff output.
TODO: