Resume-editing banner when a template sheet is dismissed unpublished #53

Closed
opened 2026-07-24 18:10:45 +02:00 by cloudbot · 0 comments
Collaborator

Goal

When the user backs out of a template entry sheet without hitting
Publish, show a small banner pinned to the bottom of the screen (above
the OS nav buttons) offering to resume the draft. Tapping the banner
reopens the sheet with the draft's field values restored exactly as
left. The banner also offers an explicit dismiss/discard control that
throws the draft away.

Motivation

Today (per #33's shell) closing the sheet — via back button or Cancel —
discards all entered field values with no recovery path. Backing out
accidentally (or getting interrupted) currently means redoing the whole
entry. A persistent resume affordance turns "accidental back-out" from
data loss into a one-tap recovery.

Acceptance criteria

  • Backing out of a template sheet (system back; Cancel once it
    exists) without publishing leaves the draft persisted (via #35's
    EntryDraftEntity/sync machinery) and shows a bottom-pinned banner
    instead of silently discarding.
  • Banner is positioned above LogbookBottomNav and the OS
    nav-bar/gesture area (respecting safeDrawingPadding()), and
    renders from the root scaffold (LogbookTabsScaffold in
    LogbookApp.kt) so it survives the sheet's own composition being
    torn down.
  • Banner persists across tab switches and app restarts as long as
    the underlying draft exists (not just for the current app
    session) — reflects EntryDraftEntity state, not in-memory
    ViewModel state.
  • Tapping the banner reopens EntrySheet for that draft's template
    with all field values restored as they were left.
  • Banner includes an explicit dismiss/discard control (e.g. a close
    affordance) that deletes the draft outright and hides the banner,
    distinct from just tapping away.
  • If multiple drafts are ever left open sequentially, behavior for
    more than one outstanding draft is defined (e.g. most-recent-wins,
    or a stacked/queued banner) — needs a design call during planning,
    not left implicit.
  • Publishing a resumed draft, or discarding it, clears the banner.

Non-goals / constraints

  • Does not change what "discard on Cancel" means for #33's own open
    question — that's answered by this issue superseding it (Cancel no
    longer means hard-discard once this lands).
  • Does not implement draft persistence itself — that's #35; this issue
    only consumes it.
  • No new field-type UI, no changes to FieldRenderer (#34's scope).
  • Visual/motion design should follow design/tokens.md and the
    existing ConflictBanner.kt pattern (warm banner colors, chip
    actions) rather than introducing a new one from scratch, but is not
    pinned to the same inline-in-scroll-body layout — this is a bottom
    overlay.
  • Depends on #33 (entry sheet shell — real EntrySheet/
    EntrySheetViewModel, in progress on feat/entry-sheet-shell).
  • Depends on #35 (draft autosave debounce → sync — persisted
    EntryDraftEntity state to resume from).
  • Supersedes the open question in Tasks/00033/00033-plan.md:139-142
    about whether Cancel/back needs a discard confirmation.
  • Milestone M5 · Entry Sheet.
## Goal When the user backs out of a template entry sheet without hitting Publish, show a small banner pinned to the bottom of the screen (above the OS nav buttons) offering to resume the draft. Tapping the banner reopens the sheet with the draft's field values restored exactly as left. The banner also offers an explicit dismiss/discard control that throws the draft away. ## Motivation Today (per #33's shell) closing the sheet — via back button or Cancel — discards all entered field values with no recovery path. Backing out accidentally (or getting interrupted) currently means redoing the whole entry. A persistent resume affordance turns "accidental back-out" from data loss into a one-tap recovery. ## Acceptance criteria - [ ] Backing out of a template sheet (system back; Cancel once it exists) without publishing leaves the draft persisted (via #35's `EntryDraftEntity`/sync machinery) and shows a bottom-pinned banner instead of silently discarding. - [ ] Banner is positioned above `LogbookBottomNav` and the OS nav-bar/gesture area (respecting `safeDrawingPadding()`), and renders from the root scaffold (`LogbookTabsScaffold` in `LogbookApp.kt`) so it survives the sheet's own composition being torn down. - [ ] Banner persists across tab switches and app restarts as long as the underlying draft exists (not just for the current app session) — reflects `EntryDraftEntity` state, not in-memory ViewModel state. - [ ] Tapping the banner reopens `EntrySheet` for that draft's template with all field values restored as they were left. - [ ] Banner includes an explicit dismiss/discard control (e.g. a close affordance) that deletes the draft outright and hides the banner, distinct from just tapping away. - [ ] If multiple drafts are ever left open sequentially, behavior for more than one outstanding draft is defined (e.g. most-recent-wins, or a stacked/queued banner) — needs a design call during planning, not left implicit. - [ ] Publishing a resumed draft, or discarding it, clears the banner. ## Non-goals / constraints - Does not change what "discard on Cancel" means for #33's own open question — that's answered by this issue superseding it (Cancel no longer means hard-discard once this lands). - Does not implement draft persistence itself — that's #35; this issue only consumes it. - No new field-type UI, no changes to `FieldRenderer` (#34's scope). - Visual/motion design should follow `design/tokens.md` and the existing `ConflictBanner.kt` pattern (warm banner colors, chip actions) rather than introducing a new one from scratch, but is not pinned to the same inline-in-scroll-body layout — this is a bottom overlay. ## Related - Depends on #33 (entry sheet shell — real `EntrySheet`/ `EntrySheetViewModel`, in progress on `feat/entry-sheet-shell`). - Depends on #35 (draft autosave debounce → sync — persisted `EntryDraftEntity` state to resume from). - Supersedes the open question in `Tasks/00033/00033-plan.md:139-142` about whether Cancel/back needs a discard confirmation. - Milestone M5 · Entry Sheet.
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.

Depends on
Reference
utilities/Logbook#53
No description provided.