-
Notifications
You must be signed in to change notification settings - Fork 68
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
Select rows by dragging #128
Comments
This would likely conflict with scrolling gesture on touchscreens. If there is a way to implement it without breaking scroll then I'm not opposed to it. |
It looks like we can check
In principle, this works due to "Implicit pointer capture", as described in the Pointer Events spec: https://w3c.github.io/pointerevents/#dfn-implicit-pointer-capture Can you check if it behaves correctly on your touch enabled devices? Other than that, there's also the question of how to handle row reordering during drag-to-select. This could be tricky if the table is sorted by highly dynamic columns, such as UL/DL speeds. Or should the rectangle be drawn, as a form of feedback to the user? Transmission-qt and qBittorrent don't draw the rectangle. |
I don't have any non android touch devices so my testing will not expand the coverage. I'm mostly curious about windows touch laptops and the like.
Yes, latter makes sense, it would be consistent with shift clicks. Drawing a rectangle is relevant for selecting objects on 2d plane, we only have one dimension here so highlighted rows give enough feedback. |
I think we can make it an opt-in feature with a setting. |
I guess that could work as a last resort, though I'm not a big fan of this solution, because when using a mouse, this feature will always be useful (can't think of a scenario where it isn't) and when using a touchscreen it will likely never be useful (unless we come up with some kludge solution involving long-tapping to initiate the drag-to-select behavior or whatever, which would then conflict with the context menu which is also triggered by a long tap). Anyway, I'm currently a bit stuck trying to find a sane approach to scrolling the list automatically when the pointer device comes near the edges of the container. |
Drag to select is not really something I've seen used in UI for lists. I've seen it in tables where cells are selectable, but those are 2D, it makes sense there. Scrolling behavior would likely be a pain to implement. In fact it's likely generally impossible to implement ergonomically with scrolling speed varying by how much you extend the pointer out of the container. If you get past the window border you won't get any events at all. I'm not sure it's worth putting a lot of effort into auto scrolling. |
I revisited this problem today, and it occurred to me that keyboard-less multi selection could be facilitated via a dedicated column:
In general, this should be far easier to implement than drag-to-select and would likely work better on mobile devices/touch screens. |
This looks like a better idea, assuming it can be made intuitive. Also I'm not sold on checkmark look maybe just a filled blue circle like a radio button.
Like ctrl-click, right? I.e. not affecting selected status of other rows.
For this to be intuitive it needs visual feedback, for example the circle gradually filling while you are holding mouse button. That will give user the hint that it's different from a simple click.
I like this too (although needs a bit more work to have custom header cell rendering). |
Yes, like Ctrl-click. I'll play with it when I get the time to see if I can come up with something that looks and feels good. I wonder if it would be better to have the entire cell's rectangular area act as the selection button, though, so that you don't have to precisely aim for the smallish circle. With a mouse it's not that bad, but with a touch screen it could be annoying if you missed the circle and your meticulously crafted multi-selection got replaced with the tapped row in an instant 😂 |
You will be limited by row height anyway, it should be at least 4-5em for comfortable touch area but that is too sparse for desktop UI. |
Looks good. |
Unfortunately, due to a bug in Mantine's |
Mantine 7 changed the styling system and has other breaking changes. I'm not sure when I'll get around to updating to v7. |
- allows for multi-selection without using a keyboard - covers the use case of Issue openscopeproject#128
I managed to find a workaround for that bug, seems to work fine in Win 10 Edge webview (Tauri) - other browsers not tested. I've pushed a branch in my fork, feel free to take a look and provide feedback.
There's also a small issue I've found with the multi-selection behavior, but it may be out of scope here because it can also be reproduced with the existing keyboard-based multi-select:
|
This feature comes in handy when you need to perform an action on multiple rows but don't have a keyboard around.
Using only the mouse, I don't think it's currently possible to select more than a single row, because that requires the use of the Ctrl or Shift keys.
Drag to select is present in transmission-qt and qBittorrent.
I am going to experiment a bit with how this could potentially be implemented, but I can't provide any time estimates, so it's still up for grabs for anyone else willing to give it a go.
The text was updated successfully, but these errors were encountered: