feat(app): the library: a grid of studyset cards, search and archive

The library tab becomes a grid of studyset cards (up to 400 dp wide, all
equally tall), starred ones first, and the archive as a section of its own
below, closed until opened and counting what rests there. It lists the top
level: studysets without a parent, those whose parent is gone, and those in
a cycle (ADR 0004). Each card's progress follows the studysets and every
change of a card, here or synced, and is worked out again after a study
session; a slow, older working out never overwrites a newer one.

- Search: a field below the app bar filters by title and secondary title,
  opens the archive while it finds something there, and says when nothing
  matches; closing it shows everything again.
- Creating and editing: a sheet with the title, the secondary title (typed
  in capitals, as every surface shows it) and the colour, picked from the
  palette's twenty, whose names are localised; a new studyset is cobalt,
  and an existing one keeps its colour, even one only a newer app version
  knows, until another is picked. Create waits for a title. Closing the
  sheet with changes asks first. It can't be swiped away: a bottom sheet
  swiped away closes without asking its PopScope (Flutter issue 152120,
  still open), so such sheets have no drag handle and close by their close
  button, the back gesture or a tap beside them, which all ask.
- Archiving doesn't ask, since nothing is lost; it offers to undo, as does
  unarchiving. Deleting asks, then deletes the studyset with its cards, each
  blanked first.
- The create button floats in compact windows and slides away while
  reading onwards; from medium windows on it sits in the app bar.

The old list and its title-only dialog are gone; the studyset screen's
tests create studysets through the sheet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-01 00:53:51 +02:00
commit e2e088ce92
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -16,6 +16,6 @@ void main() {
await tester.tap(find.text('Open library'));
await tester.pumpAndSettle();
expect(find.text('No studysets yet.'), findsOneWidget);
expect(find.text('No studysets yet'), findsOneWidget);
});
}