mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #872] DoubleClickInterval could be improved by taking into account last click position #636
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#636
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @carpii on GitHub (Aug 26, 2023).
Original GitHub issue: https://github.com/rivo/tview/issues/872
I have a table and click different rows with the mouse, but it does not always select the clicked row
This appears to be due to
tview.DoubleClickIntervalwhich will interpret any two clicks within 500ms to be a double-clickI can reduce this value, to make clicks more responsive, but then it makes it more difficult to intentionally double-click
Im wondering if its possible for tview to record the position of the first click, and then only consider a second click to be a double-click if its within a certain proximity to the first click?
This would allow us to keep
tview.DoubleClickIntervalinterval at 500ms, but if you click in a different area it would always be interpreted as a click?@carpii commented on GitHub (Aug 27, 2023):
Thanks @digitallyserviced
I appreciate mouse in terminal is never going to be ideal, but tview does a reasonable job of it so far.
My app is making use of lots of dynamically created pages, frames and controls, so the mouse is very convenient whilst developing. I do plan to add full keyboard support eventually, although haven't yet thought this through fully
Regarding your branch, you seem to have made a bunch of useful additions.
I wonder if you have considered isolating these changes and suggesting them as a PR?
Cheers
@carpii commented on GitHub (Aug 30, 2023):
Hiya @digitallyserviced
Thanks for the help so far.
Looks like you've done some awesome work on your fork, with lots of new features
I do have plans to dig through your fork, but the project I'm working on right now is fairly long-term, and likely to become a mature project over time.
I'm a little reluctant to switch to an undocumented fork right now, at least until I find some major show-stoppers where I have no other choice (or @rivo decides to stop maintaining the official repo).
No probs. I appreciate it probably developed over time for your own needs, and was never intended to be a public fork
Perhaps I'll end up cherry picking some isolated parts of your fork, so they can be pushed as a PR. I'll let you know if I do this though, so you can submit it from your fork and be credited for it
Yeah I understand. It's unclear whether rivo is not interested in PR's, or whether he disagrees with them (or maybe just doesn't have time to dig into them)
Cheers
@carpii commented on GitHub (Sep 1, 2023):
Thanks for the reply. I'll close this ticket, as clearly
DoubleClickIntervalis not the elegant solution I initially thought it wasSo my reason for wanting to stick with the official fork (for now) is mostly due to risk management.
@rivo has a long history of maintaining tview, and whilst there's lots of forks, many of them end up abandoned (the
cviewfork you mentioned seems to have been abandoned a couple of years ago, unless I'm mistaken).So I'd prefer not to build an app on top of a more feature-rich fork, if it means I'm painting myself into an unmaintained corner a few years down the line. I've learnt this lesson many times in my long career as a software eng!
I may end up creating my own fork eventually, but I'd prefer to be familiar with each downstream change, rather than just switch to a heavily modified fork, and be left troubleshooting every problem myself
It's primarily an accounting app, aimed at personal, freelancers, and SOHO usage.
MySQL backed, but with an emphasis on automated rule-based OFX/QIF/CV imports for its transaction source, plus a JSON-based CLI interface for batch processing, categorising, reporting etc.
Later versions may include a REST API and web frontend using the same backend JSON API, plus investment tracking.
I need this software for my own use, but whether it evolves beyond what I need, we'll see :-)