-
Notifications
You must be signed in to change notification settings - Fork 237
Add mouse "click and drag" to select text #107
base: master
Are you sure you want to change the base?
Add mouse "click and drag" to select text #107
Conversation
I have left to implement |
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 looks like a great start, @pranaygp. Thanks for jumping on this!
My main question about this pull request is related to how we handle scrolling when dragging the cursor near the edges of the window. After a quick test, it seems like we could make the UX much more intuitive by using an approach similar to what Atom does today. In particular, I think we should implement something like the autoscrollOnMouseDrag
function, which changes the scroll top position with a speed that's based on the vertical drag delta.
What do you think? Once this gets merged, I'll be happy to review #108 as well.
@as-cii I agree, that does seem a lot more intuitive. Can we still merge this (and possibly #108) while I begin to implement |
I'd prefer merging clean and well-working units into master and, if I understand correctly, #108 is somewhat orthogonal to the changes proposed in this pull request. How would you feel about changing this and then adapting #108 if necessary? I am not entirely opposed to it, but it'd be nice to have exactly what we want on master before going ahead and merging. |
Awesome, thanks for your hard work on this @pranaygp. ⚡️ |
Hey @pranaygp, sorry for the late follow-up. I noticed you pushed a commit since the last time I commented on the issue. Do you think this is ready to review now? |
@as-cii I haven't touched the codebase since that commit but iirc, it implements the edge scrolling behavior based on Atom as you recommended. However, the experience seems rather laggy. I'd love for you to try it out and perhaps recommended places I can look at improving to make it smoother |
I think we can make it way more performant by debouncing "SelectTo" dispatches since we don't need to run that logic to find row/col everytime, however that'll come at the cost of not being as responsive.
What do you think about implementing some sort or "rough estimate" to determin row/column that's faster, and we can debounce an accurate measurement to make everything faster and responsive.