Skip to content

Sweep a selection band with the right button - #300

Merged
vmillet-dev merged 2 commits into
mainfrom
board-band-select
Sep 22, 2026
Merged

vmillet-dev merged 2 commits into
mainfrom
board-band-select

Conversation

@vmillet-dev

Copy link
Copy Markdown
Owner

Closes #248.

The board had selection one card at a time, through the tick in the card's corner. A held right click dragged across the surface now delimits a selection area, the same way the left one delimits a folder.

The existing gesture does not move. The left button still draws a folder — it had the background first, and it is the one that creates something.

Two things the decision settles:

  • Zones are not selectable. A band picks up cards only, so "delete the selection" cannot mean two different things. A zone keeps its own gestures — move, resize, its ⋯ menu — and selecting a whole folder's notes stays Selecting a folder's notes takes one click per note #249's job, from that menu.
  • The existing selection bar acts on the result, so move / file / tag / copy / delete come for free. Ctrl+click already added to a selection on both views, so the modifier half of the ticket needed nothing.

And the one it opened: the application has no context menu anywhere, so contextmenu is simply suppressed on the surface. Without it the browser's own menu opens at the end of every sweep, right where the pointer was lifted. A right click that never travels still does nothing.

Two details worth the review

  • Which cards a band swept is measured off the screen, not computed. A card filed into a zone flows and has no coordinates of its own — there is nothing in the model to test a rectangle against, and the DOM is the only place a zone's cards have a position at all. overlaps is the arithmetic, half-open on the far edges like contains, and touching is enough.
  • The band is the one gesture that runs while editable is false: it writes nothing to the board, it only ticks what is already drawn.

The band is drawn in amber against the folder band's neutral outline — the left button draws a region that will exist, the right one sweeps a selection that will not.

1429 front-end tests (ten new: five on the arithmetic, five driving the pointer) and the full e2e suite green locally — 21/21, with five new scenarios including one that proves the left button still makes a folder.

The left button still draws a folder — it had the background first, and
it is the gesture that creates something. Which cards a band swept is
measured off the screen: a filed card flows and has no coordinates.
@vmillet-dev
vmillet-dev merged commit ac5e217 into main Sep 22, 2026
11 checks passed
@vmillet-dev
vmillet-dev deleted the board-band-select branch September 22, 2026 00:02
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.

The board selects one card at a time, and never a folder

1 participant