-
-
Notifications
You must be signed in to change notification settings - Fork 11
feat: add mouse support #49
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
base: main
Are you sure you want to change the base?
Conversation
|
My god, this is great! |
|
Please take another look! The bubblezone dependency requires Go 1.23.0. When I ran go get github.com/lrstanley/bubblezone, it automatically upgraded. |
dlvhdr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! I left some suggestions for you to think about. Let me know what you think and how we should proceed.
7755272 to
bf5dd1b
Compare
|
I fixed the conflicts with a rebase and then I would recommend to set |
- Click on files in the tree to select them - Scroll wheel works in both file tree and diff viewer panes - Drag the border between panes to resize sidebar
- Add bubblezone dependency for zone-based click detection - Mark UI zones (searchbox, filetree, searchresults, diffviewer) - Replace coordinate-based checks with zone.InBounds() - Use zone.Pos() for relative coordinates in click handlers - Keep hybrid approach for sidebar resize (coordinate-based) - Update FileNode to implement new tree.Node interface
Add SetCursorNoScroll method to filetree that updates selection without scrolling the viewport. Use it in handleFileTreeClick so the view stays in place when clicking a visible file.
Consolidate duplicate root-hidden checks into a single reusable method. Also fixes inconsistency where one check used '.' and another used dirIcon+'.' - now all use the correct dirIcon+'.' check.
When user drags sidebar width below 10px, automatically hide it. Pressing 'e' to show the tree again resets to default width (26).
Allow dragging the sidebar back open by clicking and dragging the thin vertical line that remains when sidebar is hidden.
Add constants for sidebar constraints and scroll speed: - sidebarMinWidth (20) - sidebarHideWidth (10) - scrollLines (3) Also add comment explaining Width(0) for grab line.
bf5dd1b to
dad63d1
Compare
|
I resolved the conflicts, please take another look. |


Summary