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 (Attendance Module)

Gesture, keyboard, haptic, and motion contract for the attendance surfaces. Bases: 00-shared/08_Interaction_&_Motion.md (global) + 00-shared/02 §6 (motion tokens). Conflicts resolve in favor of this file for attendance screens.


1. Grid gesture map (S2)

GestureTargetAction
TapStatusChipCycle status: Present → Absent → Late → Present (06 §2); disabled while in-flight
Taprow (not chip)Open StatusChipPopover (full options + times + remarks)
Long-pressrowEnter multi-select; row becomes checkbox row; batch bar appears (selectionClick haptic)
Long-press + dragrowsRange-select (contiguous) — phone ergonomic equivalent of shift-click
Swipe leftrowQuick-mark absent (with row-confirm haptic; disabled in selection mode) — mirrors global swipe pattern (00-shared/08 §1); keep ≤ 2 swipe actions
Swipe rightrowQuick-mark present (same guard)
TapMarkedCountBar status chipFilter grid to that status (toggle; "All" resets)
Pull downgridRefresh: re-fetch class attendance + roster (bypasses cache, 00-shared/06 §3.3)
Back gesturegrid with selectionExit selection first (never pop screen while selecting)

Gesture arbitration rules: chip tap vs row tap — chip has priority on its own hit area (48 dp); long-press on chip = popover (not selection); long-press on row body = selection. No double-tap anywhere on the grid (reserved globally for media, 00-shared/08 §1).

2. Batch & sheet gestures

  • Sheet (S3) drag-handle to dismiss = cancel; back/Esc = cancel; barrier tap = cancel (batch is not destructive by itself).
  • "Apply" while a status chip in sheet is highlighted = immediate submit (no second tap).
  • UndoBar action = one tap, 4 s window, m-base slide-in under batch bar.

3. Keyboard & desktop (S2/S4/S7)

KeyAction
Pset focused row → present
Aset focused row → absent
Lset focused row → late (popover for checkIn)
H / V / Dhalf_day / leave / holiday
Enteropen popover for focused row
Spacetoggle selection of focused row
Shift+clickrange-select in multi-select mode
Escexit selection → close popover → close sheet (priority order)
Ctrl+Kglobal search (unchanged, 00-shared/08 §2)
←/→month navigation in S4
Tabgrid table traversal (row-wise: chip → popover → next row)

Right-click (desktop) on chip = popover (mirror of long-press, 00-shared/08 §2). Hover: Mo.m-fast surface tint + tooltip on chips after 500 ms.

4. Motion language (module-specific)

InteractionToken
Chip status flipMo.m-fast (150 ms, easeOutCubic) color morph + AnimatedSwitcher icon
Chip save confirm (settle)brief Mo.m-instant scale pulse (120%) on chip
Batch bar / selection entryMo.m-base slide-up, 250 ms easeInOutCubic
Sheet (S3/popover)platform sheet default (Mo.m-base)
MarkedCountBar count changeAnimatedSwitcher Mo.m-fast; no layout shift (00-shared/08 §4)
Heatmap day cell fill (after a mark lands)Mo.m-fast color fill from neutral → status
UndoBarMo.m-base slide-in; auto-dismiss fade Mo.m-fast
Grid row entrance (first load)Mo.m-entrance stagger 40 ms (skipped on refetch; off in reduced-motion)

Reduced-motion: everything Mo.m-instant fades, no stagger, no pulse (00-shared/08 §4).

5. Haptics

EventHaptic
Chip status change appliedlightImpact()
Batch applied (N rows)lightImpact()
Mark failed / error snackbarmediumImpact()
Long-press selection entryselectionClick()
Overwrite-conflict bannermediumImpact() (once per batch, not per row)
Sweep-all-absent confirmheavyImpact() only when overwriting marked rows

Rules: haptics off with system setting; none on web/desktop (00-shared/08 §3).

6. Micro-interactions

  • Chip "was: absent" label — transient 2 s text under chip after overwrite; fades Mo.m-fast; announced once (live region).
  • MarkedCountBar pulse — one-time Mo.m-fast scale pop when the day hits "all marked" (100% state) — celebratory but subtle; skipped in reduced-motion.
  • Unmarked chip (dashed) — pressing it = first mark; chip "solidifies" (Mo.m-fast) once saved.
  • 409 collision — snackbar + grid refresh; if the row was being edited in the popover, reopen with server values (never discard user's pending input silently).

7. Anti-patterns (explicitly forbidden)

  • No double-submit: submit buttons disabled while pending (00-shared/08 §6).
  • No full-screen flashes or color-only status changes (00-shared/09 §9).
  • No haptic spam on batch (one per batch, not per row).
  • No swipe actions in selection mode (ambiguous with range-select).
  • No parallax/stagger on reduced-motion devices.