Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

10 — Interaction Specification (Communication Module)

Precise interactions: navigation, gestures, feedback, motion. Tokens/motion from 00-shared/08 (m-fast/m-base), a11y baseline from 00-shared/09, API conventions from 00-shared/07.


1. Navigation

FromGesture/CTAToBackend relevance
Feed rowtapDetail (sheet mobile / pane tablet)no fetch — carry item (06 §2.1 gap)
Feed FABtapComposeauthors only (planned)
Feed tabtap For me | Allsame screen, refilterclient-side filter (announcement.service.ts:56-60)
AnnouncementCard menutapRead receipts (authors)GET /announcements/:id/reads
Compose Publishtap (loading)success pop → feedPOST create + POST publish (08 §3)
Thread tiletapThread detailGET /threads/:id

Back semantics: sheets dismiss; pages pop; deep link to detail needs GET :id (planned).

2. Feed interactions

  • Pull-to-refresh: RefreshIndicator, 500 ms min spinner; refetch list, preserve scroll position.
  • Unread dot: 8 dp amber dot, semantics "Unread"; removed optimistically when the user reads the item (before server confirms — rollback on error).
  • Draft rows (author): amber-free; "Draft" badge; tap → detail with "Publish" CTA.
  • Long-press row: AppMenu (authors): "View receipts". (No delete — no API.)
  • Tablet: row tap updates right pane; active row highlighted; Back restores list focus.

3. Detail interactions

  • Mark as read: filled button; on tap → optimistic checkmark + POST /announcements/:id/read (announcement.repository.ts:20-33); success → snackbar (suppressed if silent preference (proposed)); 404 → snackbar + pop (announcement.service.ts:100).
  • Auto-read on open: (proposed) toggle in settings; default off until product decision (06 §8 OQ-2).
  • Attachments: tap → external browser (list is URL strings, create-announcement.dto.ts:45-49); no in-app viewer.
  • Audience line: pure metadata display; no drill-down (no audience API).

4. Compose interactions

  • Field focus flow: title → body → audience; TextInputAction.next chain; body multiline with toolbar.
  • Audience change: selecting a type re-renders value control; picking all clears value; custom picker is search-as-you-type over users (user search API needed — (planned)).
  • Recipient preview: (planned) — count chip below audience ("120 people will see this"); computed client-side only when custom (targetUserIds known); otherwise (planned) server estimate.
  • Dirty-guard: leaving composer with edits → confirm dialog "Discard draft?".
  • Publish flow: Publish = save + publish sequentially (08 §3); button becomes spinner; double-tap disabled; failure keeps draft + error snackbar + retry.
  • Draft save: implicit on publish failure; explicit "Save draft" secondary button.

5. Receipts sheet interactions

  • Segmented Read/Unread (AppSegmentedControl): instant refilter, no refetch.
  • Pull-to-refresh + auto-refresh every 30 s while open (proposed).
  • Rows: plain tiles; tap user → profile (forward-looking).
  • ALL-audience degradation: counts hidden, list only (09 §3).

6. Threads (secondary)

  • Send bar: TextField + send button; optimistic bubble; error → red tick + retry.
  • Unread badge on thread tile; PATCH /threads/:id/read on open (IMPLEMENTATION_PLAN.md:112).
  • Realtime via WS (planned) (IMPLEMENTATION_PLAN.md:119).

7. Motion & feedback map

InteractionMotionFeedback
Feed loadlist fade m-baseskeletons
New item appearsslide-in m-base
Detail opensheet slide-up m-base / page push m-base
Mark readinstant checkmark (no delay)snackbar on error only
Publishbutton spinner m-fast; success pop m-basesnackbar "Published"
OfflineAppOfflineBanner + native retry

8. Offline & error policy

StatePolicy
offline, feedserve last-fetched cache + banner (forward-looking)
offline, mark readqueue receipt POST; flush on reconnect (forward-looking) — safe: $addToSet idempotent (announcement.repository.ts:27-31)
offline, composeblock publish; keep form state in memory; warn
401global → login redirect (JWT guard, announcements.controller.ts:11)
404 mark read / readssnackbar + pop to list
500generic error state + retry

9. A11y essentials

  • Unread dot: semantics "Unread" (never color-only).
  • Audience chips: Semantics(label: "Audience: Grade 10").
  • Receipts counts announced on change (live region).
  • Compose errors: inline + focus first invalid + live region (00-shared/09).