Page carousel navigation with long-press jumps #60

Closed
opened 2026-08-31 17:55:58 +02:00 by robert · 1 comment
robert commented 2026-08-31 17:55:58 +02:00 (Migrated from git.butzei.de)

Goal

A single flat ring of pages, wrapping at both ends, with two shortcuts so nothing is more than two presses away.

Acceptance criteria

  • Up and Down move to the previous and next enabled page, wrapping at both ends
  • Long Up jumps to page 1; long Down jumps to the map
  • Select starts and pauses; long Select stops with confirmation; Back exits with confirmation while riding
  • Navigation page inserts itself into the ring only when a route is loaded
  • Disabled and auto-hidden pages are skipped without a visible flicker
  • Current page persisted across app restarts
  • Long-press does not also fire the short-press action
  • Buttons stay responsive while map frames are arriving

Files

  • watchapp/src/c/main.c
  • watchapp/src/c/carousel.c

Notes

See docs/DESIGN.md section 5. Chosen over a Back-toggles-groups model because Back not going back is surprising on Pebble and risks accidental exits.

## Goal A single flat ring of pages, wrapping at both ends, with two shortcuts so nothing is more than two presses away. ## Acceptance criteria - [ ] Up and Down move to the previous and next enabled page, wrapping at both ends - [ ] **Long Up jumps to page 1**; **long Down jumps to the map** - [ ] Select starts and pauses; long Select stops with confirmation; Back exits with confirmation while riding - [ ] Navigation page inserts itself into the ring only when a route is loaded - [ ] Disabled and auto-hidden pages are skipped without a visible flicker - [ ] Current page persisted across app restarts - [ ] Long-press does not also fire the short-press action - [ ] Buttons stay responsive while map frames are arriving ## Files - `watchapp/src/c/main.c` - `watchapp/src/c/carousel.c` ## Notes See docs/DESIGN.md section 5. Chosen over a Back-toggles-groups model because Back not going back is surprising on Pebble and risks accidental exits.
Owner

Closed by PR #85 (merged): carousel.c (renamed in place from #8's page_view.c, git history preserved) implements the real DESIGN.md section 5 button model — Up/Down step to the next visible page with a cold-boot all-hidden fallback, long Up jumps to page 1 (bypassing the visibility skip on purpose, an explicit request always wins), long Down is a documented no-op (no map page exists yet), and Select/long-Select/Back are wired to #11's real ride_state_/ride_link_ functions with a shared confirmation-prompt model for stop-vs-exit. Active page persisted via a second persist key. Verified live in emery+gabbro emulators: heap flat across every transition (107512\u2192107512), 0 bytes leaked at exit, persistence survives a reinstall.\n\nHonestly scoped: nav-page insertion (no route-loaded state exists) and the "disabled" half of page-skipping (no #61 settings surface yet) are both documented as not-yet-backed-by-real-data rather than faked. Page rendering is still #8's one-TextLayer placeholder — the template renderer (HERO1/HERO2/QUAD/GRID6) is #59's job.

Closed by PR #85 (merged): carousel.c (renamed in place from #8's page_view.c, git history preserved) implements the real DESIGN.md section 5 button model — Up/Down step to the next visible page with a cold-boot all-hidden fallback, long Up jumps to page 1 (bypassing the visibility skip on purpose, an explicit request always wins), long Down is a documented no-op (no map page exists yet), and Select/long-Select/Back are wired to #11's real ride_state_*/ride_link_* functions with a shared confirmation-prompt model for stop-vs-exit. Active page persisted via a second persist key. Verified live in emery+gabbro emulators: heap flat across every transition (107512\u2192107512), 0 bytes leaked at exit, persistence survives a reinstall.\n\nHonestly scoped: nav-page insertion (no route-loaded state exists) and the "disabled" half of page-skipping (no #61 settings surface yet) are both documented as not-yet-backed-by-real-data rather than faked. Page *rendering* is still #8's one-TextLayer placeholder — the template renderer (HERO1/HERO2/QUAD/GRID6) is #59's job.
Sign in to join this conversation.
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
robert/PedalPebble#60
No description provided.