feat(views): customizable quick-switch cycle + drawer order (#24) #54

Merged
makiolaj merged 17 commits from feat/quick-switch-view-config into release/v2.13.0 2026-07-01 12:09:53 +00:00
Owner

Closes #24.

Adds a Views settings section (Settings → Views) with two independent, drag-to-reorder lists:

  • Quick-switch button — reorder all four views and toggle which ones the top-right pill cycles through. Views turned off stay reachable from the drawer. A switch needs two targets, so the last two enabled views can't be turned off.
  • Navigation menu — reorder the drawer's view list (always shows all four).

This covers the maintainer-comment scope on #24: enable/disable + reorder the quick-switch, and reorder the drawer, as two separate settings.

Implementation

  • QuickSwitchConfig (order + enabled set) and a drawer order persisted in SettingsPrefs (comma-joined enum names; ! marks a disabled view). Missing views append enabled, unknowns drop — a future view auto-joins both lists.
  • The pill's next() cycles the configured enabled list; CalendarDrawer renders from the drawer order. Both threaded from CalendarHost via CalendarHostViewModel.
  • New ReorderableColumn: dependency-free, fixed-pitch drag reordering with animated neighbour displacement and a settle-on-drop (no LazyColumn, since settings are a single verticalScroll column). One DataStore write per gesture.

Tests

  • SettingsPrefsTest: persistence round-trips, parsing (append/drop/disabled markers) for both lists.
  • ViewBackStackTest: next()/cycle behaviour with a restricted, reordered list.
  • Full :app:testDebugUnitTest green; on-device verified on Pixel 10 (incl. drag feel).

release/v2.13.0 merged in; no conflicts.

🤖 Generated with Claude Code

Closes #24. Adds a **Views** settings section (Settings → Views) with two independent, drag-to-reorder lists: - **Quick-switch button** — reorder all four views and toggle which ones the top-right pill cycles through. Views turned off stay reachable from the drawer. A switch needs two targets, so the last two enabled views can't be turned off. - **Navigation menu** — reorder the drawer's view list (always shows all four). This covers the maintainer-comment scope on #24: enable/disable + reorder the quick-switch, *and* reorder the drawer, as two separate settings. ### Implementation - `QuickSwitchConfig` (order + enabled set) and a drawer order persisted in `SettingsPrefs` (comma-joined enum names; `!` marks a disabled view). Missing views append enabled, unknowns drop — a future view auto-joins both lists. - The pill's `next()` cycles the configured enabled list; `CalendarDrawer` renders from the drawer order. Both threaded from `CalendarHost` via `CalendarHostViewModel`. - New `ReorderableColumn`: dependency-free, fixed-pitch drag reordering with animated neighbour displacement and a settle-on-drop (no `LazyColumn`, since settings are a single `verticalScroll` column). One DataStore write per gesture. ### Tests - `SettingsPrefsTest`: persistence round-trips, parsing (append/drop/disabled markers) for both lists. - `ViewBackStackTest`: next()/cycle behaviour with a restricted, reordered list. - Full :app:testDebugUnitTest green; on-device verified on Pixel 10 (incl. drag feel). release/v2.13.0 merged in; no conflicts. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
makiolaj added 17 commits 2026-07-01 11:29:59 +00:00
Currently translated at 90.6% (329 of 363 strings)

Translation: Calendula/Strings
Translate-URL: https://weblate.dev.jeanlucmakiola.de/projects/calendula/strings/de/
Updated by "Remove blank strings" add-on in Weblate.

Translation: Calendula/Strings
Translate-URL: https://weblate.dev.jeanlucmakiola.de/projects/calendula/strings/
Updated by "Remove blank strings" add-on in Weblate.

Translation: Calendula/Strings
Translate-URL: https://weblate.dev.jeanlucmakiola.de/projects/calendula/strings/
Updated by "Remove blank strings" add-on in Weblate.

Translation: Calendula/Strings
Translate-URL: https://weblate.dev.jeanlucmakiola.de/projects/calendula/strings/
Updated by "Remove blank strings" add-on in Weblate.

Translation: Calendula/Strings
Translate-URL: https://weblate.dev.jeanlucmakiola.de/projects/calendula/strings/
Updated by "Remove blank strings" add-on in Weblate.

Translation: Calendula/Strings
Translate-URL: https://weblate.dev.jeanlucmakiola.de/projects/calendula/strings/
Update translation files
All checks were successful
Translations / check (pull_request) Successful in 5s
CI / ci (pull_request) Successful in 7m20s
bf10deaf5c
Updated by "Remove blank strings" add-on in Weblate.

Translation: Calendula/Strings
Translate-URL: https://weblate.dev.jeanlucmakiola.de/projects/calendula/strings/
Merge pull request 'Translations update from Weblate' (!45) from weblate-bot/calendula:weblate-calendula-strings into main
All checks were successful
Release — F-Droid repo + Gitea release / detect (push) Successful in 4s
Release — F-Droid repo + Gitea release / release (push) Has been skipped
69460bc35a
Reviewed-on: #45
Add a "Views" settings section that lets users pick which views the
top-bar quick-switch button cycles through and drag to reorder them,
plus an independent drag-to-reorder for the navigation drawer's view
list. Two separate configs: a view turned off in the quick-switch
cycle is still reachable from the drawer, which always lists every view.

- QuickSwitchConfig (order + enabled set) and a drawer order persisted
  in SettingsPrefs (comma-joined enum names; "!" marks a disabled view).
  Missing views append enabled and unknown names drop, so a future view
  defaults into both lists.
- The pill cycles through the configured enabled views in order; the
  drawer renders CalendarDrawer from the drawer order. Both threaded
  from CalendarHost via CalendarHostViewModel.
- New ReorderableColumn: dependency-free, measurement-driven drag
  reordering for the short grouped-card settings lists (no LazyColumn,
  since settings are a single verticalScroll column). Commits one write
  per gesture.
- The switch needs two targets, so the last two enabled views can't be
  turned off.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rework ReorderableColumn: the first cut measured each row, but grouped
cards have position-dependent padding, so slot heights varied and rows
snapped to the wrong places with no animation. Now rows are a fixed
uniform pitch, the target slot is the whole-pitches dragged, neighbours
slide aside with a spring, and the held row settles onto its slot before
the order commits. Add a lift (scale + shadow) on the held row and
cancel an in-flight settle if a new drag pre-empts it.

GroupedRow gains gapBelow so the reorderable list can own uniform
inter-row spacing.

On-device verified on Pixel 10.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Merge remote-tracking branch 'origin/release/v2.13.0' into feat/quick-switch-view-config
All checks were successful
Translations / check (pull_request) Successful in 5s
CI / ci (pull_request) Successful in 8m18s
b5895b190e
makiolaj merged commit 08905990cc into release/v2.13.0 2026-07-01 12:09:53 +00:00
makiolaj deleted branch feat/quick-switch-view-config 2026-07-01 12:09:54 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: makiolaj/calendula#54