feat(pdf-import): search the PDF creator's flashcard list #835

Merged
raisondetredev merged 1 commit from refs/pull/835/head into main 2026-08-11 15:54:37 +02:00
raisondetredev commented 2026-08-11 15:54:28 +02:00 (Migrated from codeberg.org)

Adds the browser's search affordance to the PDF import screen's
Flashcards sidebar: a header icon that reveals a full-width query row
below it, filtering the sections in place.

Matching is a case-insensitive substring test over the card's plain-text
front and back — the same two fields the browser's SQL filter matches,
and the only searchable ones the sidebar's content-less stream carries.
Cards are filtered before bucketing, so a page or chapter whose cards all
drop out disappears with them rather than showing a 0 counter.

While a query is active, sections render force-expanded — a hit inside a
collapsed page would otherwise read as "no results". Collapses made
during a search go to a search-scoped set, so the chevrons stay live and
the persisted collapse state is restored when the search closes; the
collapse-all / expand-all buttons step aside meanwhile.

The header now always renders (it used to appear only with an outline or
2+ sections) so the icon is always reachable, and the sections memo keys
on the query.

Adds the browser's search affordance to the PDF import screen's Flashcards sidebar: a header icon that reveals a full-width query row below it, filtering the sections in place. Matching is a case-insensitive substring test over the card's plain-text front and back — the same two fields the browser's SQL filter matches, and the only searchable ones the sidebar's content-less stream carries. Cards are filtered before bucketing, so a page or chapter whose cards all drop out disappears with them rather than showing a 0 counter. While a query is active, sections render force-expanded — a hit inside a collapsed page would otherwise read as "no results". Collapses made during a search go to a search-scoped set, so the chevrons stay live and the persisted collapse state is restored when the search closes; the collapse-all / expand-all buttons step aside meanwhile. The header now always renders (it used to appear only with an outline or 2+ sections) so the icon is always reachable, and the sections memo keys on the query.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
project-halkyon/halkyon-learn!835
No description provided.