Skip to content

Spend a card's two rows on what is left to do - #206

Merged
vmillet-dev merged 1 commit into
mainfrom
preview-what-is-left
Sep 18, 2026
Merged

vmillet-dev merged 1 commit into
mainfrom
preview-what-is-left

Conversation

@vmillet-dev

Copy link
Copy Markdown
Owner

Closes #202.

A checklist card drew a flat slice of the list, so ticking the first item kept its
seat: half the preview went to something already done while the things still to do
sat behind "+N autres".

The preview is a selection now, not a slice:

  • the item a search matched keeps its place whatever its state — it is why the card
    is on screen;
  • the remaining seats go to what is undone, in stored order;
  • a list with nothing left falls back on its last items rather than going blank,
    the top of a finished list saying the least about where it ended;
  • hiddenItemCount counts what was not drawn rather than assuming a tail.

Each row now carries the position it holds in the note, so onItemToggle has no
window offset left to get wrong.

A choice worth a second opinion

When a search matched an item, the other row goes to the first undone item rather
than to the matched one's neighbour. That is the ticket's headline applied
consistently — one rule for "who gets the remaining seats" instead of two. Say so if
you would rather keep the old contiguous window whenever a search is active.

Verified

Unit: 1354/1354, four new specs that fail on the old code. E2E: 21/21 locally.
Three scenarios added to 07-checklists, and the three existing ones whose
expectations the new rule moves were updated rather than dropped.

A checklist card drew a flat slice of the list, so a ticked item kept its
seat while the things still to do sat behind '+N autres'. The preview is a
selection now: the item a search matched keeps its place whatever its
state, the remaining seats go to what is undone, and a finished list falls
back on its last items rather than going blank. Each row carries the
position it holds in the note, so ticking no longer has a window offset to
get wrong.

Closes #202
@vmillet-dev
vmillet-dev merged commit 4d83ba1 into main Sep 18, 2026
9 checks passed
@vmillet-dev
vmillet-dev deleted the preview-what-is-left branch September 18, 2026 12: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.

A card's todo preview spends its two rows on ticked items

1 participant