trieur.

One card, several zones

Some zones are mutually exclusive β€” keep or discard. Folders and tags are not: a link about Rust tooling belongs in dev and in to read. Turn multi on and one card can be stacked into several zones before it leaves.

With a keyboard

Hold and press several zone letters; releasing files them all. Or tap on its own β€” the shortcut β€” to latch the mode, and tap again to leave or to file.

With a thumb

Hold the round pad, or rest a finger on the card. Then sweep the card across the zones β€” each region it reaches joins the stack β€” and let go. Between zones the card comes back to the centre.

How it reads

The card gets a dashed amber outline with a breathing ring, and every stacked zone is numbered. Amber, not red: red means error or destruction, and this is neither.

Current stack

Nothing stacked. Hold and press a s d …

What the host receives

waiting…

Shortcuts

Sorting

File into a zone
a s d … or drag the card there
Accept the model's suggestion
Skip β€” back of the pile
Undo, and unlearn it
Fullscreen
the bar button; Esc leaves

Several zones at once

Stack while held
a s release to file them all
Latch the mode
a bare tap; again to leave or file
File the stack
Drop the stack
Esc

Touch

Accept the suggestion
double tap the card
Open the stack
hold the card, or hold anywhere to summon the pad
Stack, then file
sweep across zones, then let go

Escape hatches

Esc drops the stack without filing anything. Pressing the same zone twice removes it. The first zone stacked stays the primary one β€” badge 1 β€” which is what most hosts treat as the main folder.

What it changes for the host

One zone still goes through onSort(item, zone). Several go through onSortMany(item, zones), in the order they were picked. Without onSortMany, the library falls back to calling onSort once per zone β€” which is fine for a local update, and not fine if the filing has to be atomic: if the third call fails, the first two already happened.

new Deck(el, {
  items, zones,
  multi: true,
  onSort:     (item, zone)  => api.file(item.id, [zone.id]),
  onSortMany: (item, zones) => api.file(item.id, zones.map((z) => z.id)),
  onUndoMany: (item, zones) => api.unfile(item.id, zones.map((z) => z.id)),
});

el.addEventListener('trieur:pick', (e) => {
  // the stack changed β€” e.detail.zones, e.detail.multi
});

The model learns one example per zone: a card filed in three places teaches three times, and undoing unlearns all three. That is the right behaviour for folders, and it is an approximation worth knowing about β€” a genuine multi-label model would learn the combination as such.

Keyboard and gestures

Sorting

File into a zone
a s d … or drag the card there
Accept the model's suggestion
Skip β€” back of the pile
Undo, and unlearn it
Fullscreen
the bar button; Esc leaves

Several zones at once

Stack while held
a s release to file them all
Latch the mode
a bare tap; again to leave or file
File the stack
Drop the stack
Esc

Touch

Accept the suggestion
double tap the card
Open the stack
hold the card, or hold anywhere to summon the pad
Stack, then file
sweep across zones, then let go