Skip to content

WebUI: Add checkboxes for easy selection on mobile #22892

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

userwiths
Copy link
Contributor

Closes #22701

Without checkboxes, mobile users cannot search and then select multiple tasks to delete.

I assume tasks refers to torrents until told otherwise.

Summary

Adds a setting that when turned ON renders a left most column that represents a checkbox in the torrents table

The state of this checkbox updates on torrent select/deselect to highlight the currently selected torrents

Checking/Unchecking the box allows for easier management of multiple torrents through a touch-screen device where selecting multiple non sequential torrents is more difficult than when using a mouse.

Notes

  1. The condition for updating a row's content relies on a change in the response its getting from the server. Here we try to change that by introducting the jsManaged (boolean) attribute in to the column object, which would be false by default, but in case it is true we will trigger the column's updateTd regardless of change in server response.
  2. DynamicTable.selectAll & DynamicTable.deselectAll did not trigger the event (onSelectedRowChanged) that selectRow and its related do, might have been done with performance in mind, dont have that much torrents to test with. Made it fire the events in order to be able to detect selection of all torrents.
  3. Added an early return on the touchstart event of dynamicTableDiv. On desktop all was good, but on mobile this event fires together with the checkbox click and effectively deselects the selected row causing the checkbox to "blink" on for a second and then become unchecked again.

@userwiths userwiths force-pushed the feat/add-checkboxes-22701 branch from 2e6d301 to 538116e Compare June 20, 2025 11:19
@glassez
Copy link
Member

glassez commented Jun 21, 2025

I wouldn't expect WebUI exclusive feature touches main (server) app in any way. Why not store this setting at the WebUI side?

@glassez glassez requested a review from a team June 21, 2025 13:36
Adds a setting that when turned `ON` renders a left most column that represents a checkbox in the torrents table

The state of this checkbox updates on torrent select/deselect to highlight the currently selected torrents

Checking/Unchecking the box allows for easier management of multiple torrents through a touch-screen device where selecting multiple non sequential torrents differs from using a mouse.
@userwiths userwiths force-pushed the feat/add-checkboxes-22701 branch from 538116e to 5629b07 Compare June 22, 2025 15:18
@userwiths
Copy link
Contributor Author

Agreed, latest version introduces this option only in the WebUI and does not change any server/app files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebUI: Add checkboxes (so mobile users can search and then select multiple tasks to delete)
2 participants