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

Module-specific interactions layered on shared 00-shared/08. Covers every input modality on phone/tablet/desktop.


1. Phone / touch

GestureBehaviourWhere
Tapopen parent/child, submit forms, toggle switches, open menusall
Tap on CTAsubmitting-aware disabled re-tap (00-shared/08 §6)forms, sheets
Long-pressAppMenu on list rows / child cardsparents list, linked children
Double-tapnone
Swipe left/rightno destructive swipe on links (irreversible server-side) — keep confirm
Pull downrefresh lists (bypasses cache)parents list, detail, my children
Pinch/dragnone
Hardware backpop sheet/dialog first; then previous screen; on root → shellall
Edge swipedrawer (shell)
Hapticssuccess lightImpact; link/unlink confirm heavyImpact; menu open selectionClick; error mediumImpact (08 §3)mutations

2. Keyboard / desktop / mouse

InputBehaviour
Tabform order = visual order; focus ring primary (2 dp)
Entersubmits active form (create/edit/link); confirms focused dialog button
Esccloses sheet/dialog/menu; clears search; focus returns to trigger
Nnew guardian (parents list)
Ctrl/Cmd+Entersubmit from text areas
Arrowsnavigate user/student picker results
Right-clickcontext menu (same as long-press)
Hoverrow tint m-fast, tooltip after 500 ms; card elevation hint
Focuslogical FocusTraversalGroup; modal sheets trap focus

3. Haptics (mobile)

EventHaptic
Guardian linked / profile savedlightImpact
Unlink confirmheavyImpact
Open row menuselectionClick
Validation error / 4xxmediumImpact
Ruleoff when system disabled; none on web/desktop (08 §3)

4. Motion language (module extension of 08 §4)

TransitionDuration/curveUsed by
Route push list→detailm-base slideparents list, my children
Hero avatar list→detailm-slow flightparent/child cards
Link sheetm-base bottom slidelink guardian
Unlink row removalm-base fade-outdetail children list
Warning banner expandAnimatedSize m-baseduplicate/primary warnings
Child switcher changeAnimatedSwitcher fade m-fastmy children
Skeleton→contentcross-fade m-slowall loads

Reduced-motion: fades + instant only; no stagger, no hero (08 §4).

5. Micro-interactions catalogue

InteractionDetail
Submit pressedCTA loading swap m-base, double-tap locked
Switch toggle (pickup/primary)m-fast thumb + icon morph; warning banner slides in if conflict
Duplicate link attemptchip row shake (reduced-motion: none) + AppBanner(warning)
Unlinkdialog scale+fade m-base; on confirm heavyImpact + row fade + snackbar
Children count badgescale pop m-fast on refresh change
Pull-to-refreshprimary spinner; lightImpact on completion

6. Frustration controls (shared 08 §6 + module)

  • All presses respond < 100 ms with m-fast ripple.
  • Every network action shows pending state (CTA spinner / skeleton).
  • Submit disabled while pending — no double-submit (double link rows are a real risk, OQ-2).
  • Rate-limit → countdown, no auto-retry.
  • Errors persist until corrected/dismissed; never flash.
  • User picker sheet: debounced q search (300 ms, users.service.ts:90-115), Enter selects first result, Esc closes.
  • Student picker in link sheet: search by admission number or name; selection replaces field with chip; change reopens picker.
  • Deep links: studylyon://parents/:id → detail (admin); studylyon://students/:id → child if linked (forward-looking); studylyon://my/children → switcher.
  • Clipboard: none in this module (no codes/keys).

8. Validation of interaction to server semantics

  • "Switch primary" never patches a link — no link PATCH endpoint (student-parent-link.service.ts:16-41); the interaction performs delete+recreate and its copy must not imply an update.
  • "Unlink" maps exactly to DELETE /parents/link/:linkId soft delete (student-parent-link.service.ts:38-41); 404 → treat-as-removed.
  • Primary toggles warn but are not blocked client-side — the server permits multi-primary (OQ-5); UI should never silently enforce what the server won't.
  • Search field on the parents list is client-side filtering only (server ignores q, parent.service.ts:58-61) — interaction spec forbids pretending it queries the server.