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

Maps every Exams surface to the shared design tokens (00-shared/02_Design_Tokens.md) and components (00-shared/03). Nothing in the module introduces new tokens; semantic color mapping is defined here.


1. Semantic color mapping (status → color role)

SemanticColor role (light / dark)Used for
Exam draftsurfaceVariant / onSurfaceVariantExamStatusBadge.draft, chip, filter selected-off
Exam activeprimary / primaryContainerExamStatusBadge.active, Coverage bar active state
Exam completedsecondary / secondaryContainerExamStatusBadge.completed, GradeChip
Exam publishedtertiary / tertiaryContainer + Icons.verifiedExamStatusBadge.published, publish success state, publishedAt chips
Marks savedtertiary checkrow save-state icon
Marks failed / max violationerror / errorContainerfailed row, inline errors, MarksTextField error outline
Overlap / invalid config warningtertiary banner (passingMarks > maximumMarks, OQ-6)SlotHeaderCard warning, S4 conflict dialog
Grade absent / not markedonSurfaceVariant mutedreport-card unmarked rows
Coverage complete (100%)tertiaryMarksSummaryBar full state
Coverage partialprimaryMarksSummaryBar progress

Status enum source: examination.schema.ts:28-33; type enum examination.schema.ts:15-20.

2. Typography mapping (Ty, 00-shared/02 §2)

ElementToken
Screen titles (Exams, Results)titleLarge
Exam name (card/detail)titleMedium (card) / headlineMedium (detail)
Slot subject, roster student nametitleMedium / bodyLarge
Meta lines (dates, class, counts)bodySmall / bodyMedium onSurfaceVariant
Marks values, percentages, totalslabelLargedisplaySmall mono tabular
Badges/chipslabelSmall / labelMedium
Form labelslabelLarge onSurfaceVariant
Empty/error titlestitleMedium; body bodyMedium

3. Spacing (Sp, 00-shared/02 §3)

UseToken
Screen padding (phone)Sp.16
Screen padding (tablet+)Sp.24
Card internal paddingSp.16 (large), Sp.12 (rows)
Vertical rhythm between sectionsSp.24 (detail), Sp.16 (forms)
Row gaps (marks row)Sp.12; field-to-label Sp.8
Badge/chip paddingSp.4/Sp.8, Sp.4/Sp.10

4. Elevation (El, 00-shared/02 §5)

SurfaceToken
AppBar (S1/S2/S3)El-e1
Cards (ExamCard, SlotHeaderCard, ReportCard)El-e1
Publish dialogEl-e3
Floating sheets (grade sheet, conflict sheet)El-e3

5. Radius (R, 00-shared/02 §4)

ElementToken
Cards (list/detail)r-lg (16)
Rows, coverage tilesr-md (12)
Inputs, marks fieldr-md
Badges/chipsr-full
MarksSummaryBarr-full

6. Iconography

IconUse
Icons.assignment / fact_checklist empty state, module icon
Icons.addFAB "New exam" / "Add subject"
Icons.edit / Icons.deletedetail menu
Icons.campaign / Icons.verifiedpublish button / published badge
Icons.check_circle (tertiary)row saved
Icons.error_outlinefailed row
Icons.cloud_off / Icons.cloud_queueoffline queued row
Icons.scheduleslot time
Icons.sharereport card share (proposed)
Icons.warning_amberpublish/conflict/overlap dialogs

Icons never carry meaning alone (paired with labels, 00-shared/09).

7. Dark/light mapping

  • Token-only theming; no hardcoded colors. Status colors invert through the same role tokens (primaryContainerprimary handling per 00-shared/02 §7).
  • Published badge: tertiaryContainer (light) / tertiary-tinted container (dark).
  • Unmarked report-card rows: onSurfaceVariant at 60% opacity in dark.
  • Screenshots/QA: 14_QA_Checklist.md §dark includes badge contrast spot-checks.

8. Component-to-shared mapping

Module componentBuilt onShared variants reused
ExamStatusBadge, ExamTypeChip, GradeChipAppBadge/AppChip
ExamCard, ExamSubjectCard, CoverageTile, SlotHeaderCard, ResultRowCardAppCardpressed/hover state layers
MarksTextFieldAppTextField (compact numeric variant)error/disabled states
PublishDialog, delete confirm, conflict sheetAppDialogbarrierDismissible lock while submitting
MarksSummaryBarcustom progress primitive (shared)Semantics(liveRegion)
Skeleton/empty/error/offlineAppSkeleton, AppEmptyState, AppErrorState, AppOfflineBanneras-is

9. Tokens never used

Icons.* decorative animation beyond Mo set; danger-only surfaces for non-destructive actions; any elevation above El-e3 inside the module.