Settings page: add Sync Templates button and Back button #60

Closed
opened 2026-07-26 16:33:05 +02:00 by cloudbot · 0 comments
Collaborator

Goal

Add two affordances to the Settings sheet
(ui/settings/SettingsSheet.kt): a "Sync Templates" button that manually
triggers a template refresh, and a Back button to close the sheet from
within the UI.

Motivation

Settings currently has no way to leave except the Android system back
gesture (no SheetHeader/back chip like other sheets use), and there's no
manual way to force a template sync — it only happens as part of automatic
cache refresh (CacheRefreshEngine).

Acceptance criteria

  • Settings adopts SheetHeader (as used by EntrySheet/PersonInfoSheet)
    with onBack closing the sheet, replacing the current bare title text
  • A "Sync Templates" button triggers TemplateRepository.refreshTemplates()
    and shows some success/failure/in-progress feedback to the user
  • Existing biometric-lock section is unaffected

Non-goals / constraints

  • Not changing automatic cache refresh behavior
  • Not adding other new settings in this issue

app/src/main/java/family/marquezkeenan/logbook/ui/settings/SettingsSheet.kt,
ui/sheet/SheetChrome.kt, data/templates/TemplateRepository.kt,
data/cache/CacheRefreshEngine.kt

## Goal Add two affordances to the Settings sheet (`ui/settings/SettingsSheet.kt`): a "Sync Templates" button that manually triggers a template refresh, and a Back button to close the sheet from within the UI. ## Motivation Settings currently has no way to leave except the Android system back gesture (no `SheetHeader`/back chip like other sheets use), and there's no manual way to force a template sync — it only happens as part of automatic cache refresh (`CacheRefreshEngine`). ## Acceptance criteria - [ ] Settings adopts `SheetHeader` (as used by `EntrySheet`/`PersonInfoSheet`) with `onBack` closing the sheet, replacing the current bare title text - [ ] A "Sync Templates" button triggers `TemplateRepository.refreshTemplates()` and shows some success/failure/in-progress feedback to the user - [ ] Existing biometric-lock section is unaffected ## Non-goals / constraints - Not changing automatic cache refresh behavior - Not adding other new settings in this issue ## Related `app/src/main/java/family/marquezkeenan/logbook/ui/settings/SettingsSheet.kt`, `ui/sheet/SheetChrome.kt`, `data/templates/TemplateRepository.kt`, `data/cache/CacheRefreshEngine.kt`
Sign in to join this conversation.
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
utilities/Logbook#60
No description provided.