-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat: mouse support via bubblezone #22
feat: mouse support via bubblezone #22
Conversation
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.
func (i item) Title() string { return i.title } | ||
func (i item) Description() string { return i.desc } | ||
func (i item) FilterValue() string { return i.title } | ||
func (i item) Title() string { return zone.Mark(i.title, i.title) } |
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.
Not sure what OS/shell you're dev'ing on but on WSL, I'm only able to click on the process description to select the process to kill. The title is unclickable.
I think ideally, someone could click on either title/description for a process and be brought to the confirmation screen.
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.
Hmm im on linux(popos), zsh shell(kitty terminal) and both are clickable, title and desc
I only have mac/linux at this time so hard for me to test windows/wsl
} | ||
} | ||
// If ok is clicked | ||
} else if zone.Get("ok").InBounds(msg) { |
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.
With the zones, it'd also be nice to use the active button style for the hover state.
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.
This was something I looked into for a bit, but not sure zone supports it out of the box. I did not investigate for too long but it didnt look like zone provided anything for hover
It might be nice as another investigation/feature to implement supporting hover, either with zone or some custom custom solution
f090f26 adds help context for mwheel scroll If we wanted to customize the help menu more, we may need to just build our own, im just adding additional keys I think hover should be another investigation/pr, I dont think zone supports its out of the box Clicking title OR description works to select the port on my machine(Linux/PopOS). Im am not able to test on WSL. This could be fine for now and have someone with WSL/Windows investigate it further as I am not able to @savannahostrowski let me know if you think this is good or if there should be other fixes |
Hey - I think that this looks good. Thanks for added the mwheel to the help menu. I'm cool with hover being investigated in another PR. Re. clicking the title/description, I'm testing on WSL and it's a bit finicky. Not sure why yet. Mousewheel + enter works great though. I think we can merge as is and I can poke around a bit more on my end. |
Resolves #1
Uses bubblezone(https://github.com/lrstanley/bubblezone)
Some minor changes needed to support mouse via zone, Gruyere needs to be set to fullscreen mode for zone to work(see: lrstanley/bubblezone#11)
Also refactored some title/view rendering to play nicely with bubblezone