10 — Interaction Specification (Attendance Module)
- 1. Grid gesture map (S2)
- 2. Batch & sheet gestures
- 3. Keyboard & desktop (S2/S4/S7)
- 4. Motion language (module-specific)
- 5. Haptics
- 6. Micro-interactions
- 7. Anti-patterns (explicitly forbidden)
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)
| Gesture | Target | Action |
|---|---|---|
| Tap | StatusChip | Cycle status: Present → Absent → Late → Present (06 §2); disabled while in-flight |
| Tap | row (not chip) | Open StatusChipPopover (full options + times + remarks) |
| Long-press | row | Enter multi-select; row becomes checkbox row; batch bar appears (selectionClick haptic) |
| Long-press + drag | rows | Range-select (contiguous) — phone ergonomic equivalent of shift-click |
| Swipe left | row | Quick-mark absent (with row-confirm haptic; disabled in selection mode) — mirrors global swipe pattern (00-shared/08 §1); keep ≤ 2 swipe actions |
| Swipe right | row | Quick-mark present (same guard) |
| Tap | MarkedCountBar status chip | Filter grid to that status (toggle; "All" resets) |
| Pull down | grid | Refresh: re-fetch class attendance + roster (bypasses cache, 00-shared/06 §3.3) |
| Back gesture | grid with selection | Exit 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).
UndoBaraction = one tap, 4 s window,m-baseslide-in under batch bar.
3. Keyboard & desktop (S2/S4/S7)
| Key | Action |
|---|---|
P | set focused row → present |
A | set focused row → absent |
L | set focused row → late (popover for checkIn) |
H / V / D | half_day / leave / holiday |
Enter | open popover for focused row |
Space | toggle selection of focused row |
Shift+click | range-select in multi-select mode |
Esc | exit selection → close popover → close sheet (priority order) |
Ctrl+K | global search (unchanged, 00-shared/08 §2) |
←/→ | month navigation in S4 |
Tab | grid 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)
| Interaction | Token |
|---|---|
| Chip status flip | Mo.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 entry | Mo.m-base slide-up, 250 ms easeInOutCubic |
| Sheet (S3/popover) | platform sheet default (Mo.m-base) |
| MarkedCountBar count change | AnimatedSwitcher 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 |
| UndoBar | Mo.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
| Event | Haptic |
|---|---|
| Chip status change applied | lightImpact() |
| Batch applied (N rows) | lightImpact() |
| Mark failed / error snackbar | mediumImpact() |
| Long-press selection entry | selectionClick() |
| Overwrite-conflict banner | mediumImpact() (once per batch, not per row) |
| Sweep-all-absent confirm | heavyImpact() 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-fastscale 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.