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

Module-specific interactions on top of 00-shared/08_Interaction_&_Motion.md. Tokens m-* per 00-shared/02 §6; all durations/curves from there.


1. Touch gestures (phone/tablet)

GestureBehaviourWhere
Tap rowNavigate to detail (phone) / select in pane (≥ 840 dp); ripple m-fastUsers list
Long-press rowAppMenu: View · Edit · Deactivate/Activate · Delete · GDPR eraseList rows
Swipe left (row)Reveal ≤ 2 actions: Deactivate, Delete (00-shared/08 §1, keep ≤ 2)List rows (phone)
Pull downRefresh list (resets to page 1, bypasses cache)List
Tap FABNew user (scale-in m-entrance; hide on scroll-down)List
Back gesturePop; from detail → list (state preserved)All

2. Desktop/web (mouse + keyboard)

InputBehaviour
Hover row2% surface darken + tooltip on status badge (m-fast)
Right-click rowSame context menu as long-press
Ctrl+KGlobal search (shell-level)
NNew user (list focused, no input focused)
IImport CSV (list focused)
/Focus search field
EscClose dialog/sheet/menu; from search → clear + unfocus
EnterSubmit focused form; in dialogs = primary action (typed confirms require typing first)
Arrow keysNavigate list rows (desktop master-detail); menus
Ctrl+EnterSubmit edit form from any text area

3. Haptics (mobile)

EventHaptic
Create/update successlightImpact
409 conflict / import errors shownmediumImpact
Long-press menuselectionClick
Pull-to-refresh completelightImpact
Delete/erase confirmheavyImpact
Import complete (all rows)lightImpact; partial success: mediumImpact

Haptics disabled per system setting; none on desktop (00-shared/08 §3).

4. Motion language

InteractionMotion
List → detailSlide forward m-base; hero avatar flight m-slow (00-shared/08 §4)
Skeleton → rowsCross-fade m-slow, no pop
Status badge changeColor/size transition m-fast; icon morph AnimatedSwitcher
Filter chips togglem-fast color transition
Import step changeFade + slight rise m-slow; stepper indicator slide m-base
Import progressDeterminate LinearProgressIndicator m-instant value updates (no pulse)
Error table expandAnimatedSize m-base, never layout pop
Dialog (delete/erase)Scale+fade m-base; scrim m-base
Snackbar (undo/confirm)m-base slide

Reduced motion: all transitions ≤ m-instant fades; no stagger, no hero (00-shared/09 §8).

5. Micro-interactions

InteractionDetail
Search typingDebounce 300 ms; clear (×) button fades in with input
Result count"42 users" live-region update after search completes
Status toggleSwitch flips immediately; server round-trip; rollback on error + snackbar
FABAppears m-entrance scale; hides on scroll-down, shows on scroll-up
Import startButton → spinner ("Importing…"); anti-double-submit (00-shared/08 §6)
Import row error clickExpands inline message (already visible) — no modal for single errors
Avatar uploadOverlay spinner on avatar; success check morph; revert on failure
Infinite scrollBottom spinner fade-in m-instant; "end of list" footer

6. Import progress interaction (long-running)

Since POST /users/import is synchronous (users.service.ts:233-282):

  1. Phase 1 — parsing (client, local): indeterminate? No — determinate fake-local parse with real row count (isolate reports progress every ~200 rows).
  2. Phase 2 — upload: determinate byte progress (dio onSendProgress).
  3. Phase 3 — server processing: indeterminate spinner labeled "Server is importing N rows — this can take a minute".
  4. Phase 4 — result: determinate summary (imported/failed counts, m-entrance entrance).

Rule: never display a fake percentage for phase 3 (honest labeling, OQ-6). Cancel button only during phases 1–2 (local); phase 3 cannot be cancelled (server commits row-by-row).

7. Frustration controls

  • Every interactive element responds within 100 ms (00-shared/08 §6).
  • All network actions show pending state (button spinners, row overlay).
  • Double-tap FAB → guarded (already navigating); double-submit guarded.
  • Import phase-3 offers "You'll be notified when done" (planned) — today the request blocks the UI; keep the screen focused and show elapsed time.