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

11 — Design System Mapping (Users Module)

Maps the module's components/screens to the token set (00-shared/02_Design_Tokens.md) and M3 widget mapping (00-shared/04_Design_System_Mapping.md).


1. Theme & tokens used

TokenUsage in this module
primary/onPrimaryFAB "Add user", primary CTAs (Start import, Save)
success (= secondary)active status badge, import success counts
warning (= tertiary)suspended badge accent, partial-import banner
errorsuspended badge variant, delete/erase dialog actions, import error counts
primaryContainerinvited badge, selected role chips, info banners
surfaceVariantfilter chips unselected, input fills
inverseSurfacesnackbars
mono (00-shared/02 §2)row numbers in import error list, erased-*@anonymized.invalid display, member ids
r-sm…r-fullbadges r-sm, cards/inputs r-md, dialogs r-lg, avatar r-full
e-0…e-5list rows e-0, cards e-1, FAB e-3, dialogs e-4
m-* motionper 10_Interaction_Specification.md §4

2. Status colour mapping (semantic, icon+label — 00-shared/09 §9)

Status (user.schema.ts:7-12)Badge tokenIconLabel
activesuccess containercheckActive
inactiveoutlined neutralcircle-offInactive
suspendederror/tertiarybanSuspended
invitedprimaryContainermailInvited

Never color-only; every badge pairs icon + text (00-shared/09 §9). Dark-mode variants per token table (00-shared/02 §1).

3. Flutter widget mapping (module-specific)

Module componentFlutter
UserListTileListTile + CircleAvatar (initials) + MenuAnchor
StatusBadgecustom Container pill (radius r-sm) + Icon + Text
RoleChipsFilterChip row (Wrap)
FilterBarSearchBar + Wrap of chips + ActionChip clear-all
ImportWizardcustom AppStepper (00-shared/03); step content via AnimatedSwitcher
CsvPreviewTableDataTable (desktop) / ListView of ListTiles (phone)
ImportErrorListdense ListTile rows, mono row number, Badge count
PreferencesPanelSwitchListTile ×3, RadioListTile ×3, DropdownButtonFormField
AvatarUploaderGestureDetector avatar + showModalBottomSheet (pick/crop)
TypedConfirmDialogAlertDialog + TextField + destructive FilledButton

4. Layout tokens

  • List row height ≥ 56 (00-shared/02 §3); dense error rows ≥ 48.
  • Screen padding 16/24 (00-shared/04 §6); card gap 12; section gap 24.
  • Master-detail breakpoint 840 dp (00-shared/04 §6); filters collapse to a bottom sheet on phone (< 600 dp).

5. Iconography

Material Symbols outlined, 24 dp default (00-shared/02 §7); status icons filled variant. Icons used: person_add (FAB), upload_file (import), download (template/errors), edit, block (suspend), delete_forever, shield_person (erasure), notifications, palette (theme), photo_camera (avatar). All with labels/tooltips (00-shared/02 §7).

6. Typography mapping

ElementToken
Screen title "Users"headlineMedium
Row title (displayName)titleMedium
Row subtitle (email)bodyMedium onSurfaceVariant
Badge textlabelMedium
Import countsdisplaySmall (headline numbers) + bodyMedium captions
Error row messagebodyMedium error-container tint
Row numbers / idsmono

7. Theming rules (enforced, 00-shared/04 §7)

  1. No literal colors — token references only.
  2. No literal spacing — AppSpacing grid.
  3. No literal durations — AppMotion.
  4. Dark mode first-class (badge contrast ≥ 4.5:1 text, ≥ 3:1 UI 00-shared/09 §2).
  5. Tenant branding overrides primary only — status colors stay semantic.

8. Responsive behaviour

ClassLayout
Phone < 600 dpsingle pane; filters in bottom sheet; FAB
Tablet 600–839 dplist + expanded row info; filter chips inline
Landscape/desktop ≥ 840 dpmaster-detail; pager; hover states; keyboard shortcuts (10_Interaction_Specification.md §2)

9. Empty/error/loading tokens