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

Extends 00-shared/04 with module components. Every widget → token → Flutter mapping.


1. Screen → M3 component map

ScreenPrimary widgetsM3 roles
S1/S2 gridTimetableGrid, TimetableSlotCard, DayHeader, TimeGutter, WeekNavigator, FABsurfaceContainerLow cells, surface gutters, primaryContainer drop-target
S3 room viewTimetableGrid (read-only), AppSectionHeadersurfaceContainerLow
S4 editorAppBottomSheet/AppDialog, pickers, TimePicker, FilledButtonsurfaceContainerHigh, fill surfaceVariant, focus primary, error error
S5 conflictConflictBannererrorContainer/onErrorContainer
S6 week navWeekNavigator, text buttonssecondaryContainer "Today"

2. Conflict / slot color semantics (module canon)

StateToken pairRationale
Slot (normal)surfaceContainerLow/onSurface, e-1neutral card
Slot (hover, desktop)surfaceContainerHigh, e-2affordance
Slot (conflict — client-derived same-grid overlap)errorContainer/onErrorContainer border + event_busy icon + labelerror role (09 §9 color-blind rule)
Drop target (valid)primaryContainer/onPrimaryContaineraction = primary
Drop target (invalid)errorContainer outlinerejected
Conflict bannererrorContainer/onErrorContainer02 §1

Always paired with icon + text — never color-only.

3. Typography

UseTokenWidget
Screen titleheadlineMediumgrid AppBar
Slot subjecttitleSmallTimetableSlotCard
Slot teacher · roombodySmallTimetableSlotCard
Times (gutter, slot, editor)mono (FontFeature.tabularFigures, 02 §2)TimeGutter, cards, time fields
Day headerslabelLargeDayHeader
Conflict textlabelMediumConflictBanner
Empty/error copybodyMediumAppEmptyState/AppErrorState

4. Spacing & layout tokens

TokenValueUse
Grid cell min96 × 48 dp (09 §5 touch targets)grid cells
Time gutter48 dp fixedTimeGutter
Day header48 dpDayHeader
Card padding12TimetableSlotCard
Sheet cornerr-xl 16 top (phone)S4
Dialog cornerr-lg 12S4 desktop
Screen padding16 / 24 (tablet+) (04 §6)grids

5. Elevation

ComponentToken
Grid cells / slot cardse-0 / e-1
Slot hover (desktop)e-2
Drag ghost (desktop)e-4
S4 sheet / dialoge-5 / e-4
FABe-3

6. Icons (Material Symbols outlined; filled for status — 02 §7)

IconUse
calendar_monthtimetable nav destination, empty state
addFAB "Add slot"
event_busyconflict badge + banner
meeting_roomroom chip on slot cards
scheduletime gutter icon (proposed)
chevron_left/rightWeekNavigator
today"Today" button
person / groupsteacher/class scope icons
content_copyDuplicate slot action
edit / deleteslot actions (planned)

All icons have tooltip or Semantics.label (09 §7).

7. Module-level theming rules

  1. Conflict styling ONLY via TimetableSlotCard conflict state + ConflictBanner — single source of truth.
  2. Times always mono + tabularFigures — scannable schedule reading.
  3. Destructive actions (planned) always error token — never custom red.
  4. Day order fixed Mon→Sat (timetable.schema.ts:7-14) — no Sunday slot; a Sunday column must never be rendered.
  5. Drop-target affordance only on desktop (drag exists there); mobile long-press never shows drag affordances (10 §1).