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

Concrete interaction rules for the Houses module. Motion tokens (m-fast, m-base) and gesture standards from 00-shared/08 (Interaction & Motion); accessibility from 00-shared/09; offline behaviour from 00-shared/10.


1. Navigation interactions

FromGestureResultRule
List cardtappush /houses/:idhaptic light on phones
List FABtapopen editor sheet (create)gated houses.create
Detail edit menutapopen editor sheet (update, prefilled)gated houses.update
Detail delete menutapopen DeleteHouseDialog (07 §7)gated houses.delete
Member rowtappush /students/:idcross-module; deep link back
AppBar backswipe-back / buttonpopstandard

2. Editor sheet interactions

ActionBehaviour
Open (create)sheet slides up m-base (320 ms); focus Name
Open (update)same; fields prefilled from loaded house
Color swatch tapselects; ring indicator m-fast; haptic light
Custom hex inputvalidates on blur; invalid → field error + shake m-fast
Submit (Enter / button)single-flight; button spinner; fields disabled
409 conflictConflictFieldError under Code + shake + focus + live-region
Dismiss with dirty formdiscard-confirm dialog (first time only, then silent)
Successsheet closes m-base; list/detail refetch (response-driven, 13 §6)

3. List interactions

ActionBehaviour
Pull-to-refreshrefetch page 1 (keep scroll position)
Paginationfooter AppPagination; disabled Prev on page 1, Next when !meta.hasNext (pagination-query.dto.ts:52-53)
Card presselevation + m-fast; pressed state ≤ 200 ms perceived

4. Detail interactions

ActionBehaviour
Pull-to-refreshrefetch house + members section independently (13 §4)
Members refresh iconrefetch students join only; spinner on count badge
Delete confirmdestructive button error; confirm → DELETE → snackbar "House deleted" → pop to list; failure → snackbar + dialog stays

5. Motion budget

ElementToken (00-shared/08)
Card appear staggerm-fast (≤4 rows)
Sheet slide / dialog scalem-base
Field error shakem-fast
Colour swatch selectionm-fast, 120 ms
Cross-screen pushplatform default; no custom hero except HouseHeader color bridge (list card swatch → detail banner, m-base)

6. Offline & degraded mode (00-shared/10 §2)

ModeBehaviour
List cachedrender cached houses + AppOfflineBanner; refresh disabled
Detail cachedshow from list cache; members section shows stale join or hidden
Mutationblocked; FAB/menu disabled with tooltip "You're offline"
Conflict while offlinequeued? No - mutations never queue; user retries manually

7. Permission-gated interactions

PermissionVisibleHidden behaviour
houses.read absentnothingempty state + "contact your admin" (06 §1.3)
houses.create absentno FAB-
houses.update/delete absentno card menu-
403 on direct deep linkAppEmptyState + backnever auto-redirect loop

Source: permissions.constants.ts:46-49; server RBAC not wired - client gating only (AGENTS.md).

8. a11y interaction notes (00-shared/09)

  • All interactive elements ≥ 48 dp hit area; cards expose onTap semantics.
  • Focus order: header → members → meta; menus traversable by keyboard.
  • Error announcements via live region, never visual-only.
  • Color swatches carry labels; selection announced ("Color Red selected").