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 (WS / Realtime Module)

Maps every realtime component/surface to the shared design system. Sources of truth: 00-shared/02 (Design Tokens), 00-shared/03 (Component Library), 00-shared/04 (Design System Mapping), 00-shared/08 (Interaction & Motion), 00-shared/09 (Accessibility Baseline), 00-shared/10 (QA Baseline).


1. Token mapping

Real-time conceptToken / primitiveNotes
connectedcolor.success (status)from 00-shared/02 status palette
connecting / reconnectingcolor.warning + pulsepulse duration from 00-shared/08 motion tokens
offline / error-authcolor.dangerbanner uses surface.danger-container for background
idle (neutral)color.neutraldot only, no label
status dot8 dp circle, radius.roundfrom shared shape tokens
bannerAppBanner/AppOfflineBanner primitive (00-shared/03)module composes AppConnectionBanner (07 §2)
row flashm-fast (≤ 200 ms) ease-out highlightfrom 00-shared/08
toastAppSnackbarfrom 00-shared/03
live-region announcementsa11y baseline §300-shared/09

2. Component mapping

ws component (07)Built on (shared)Extends with
AppRealtimeStatusDotAppBadge/dot primitive + tooltipstate→color/motion mapping table
AppConnectionBannerAppBanner/AppOfflineBannerretry action, live-region text
AppLiveListAppList + AppSkeleton + RefreshIndicatorevent merge logic, row flash, bounded refetch
AppNotificationToastAppSnackbarpriority filter, dedup window
AppEventLogAppDataTable + AppEmptyStatemonospace stream, filter, pause
AppBottomSheet (status sheet)AppBottomSheetstate chip + last-event row
RealtimeClient— (non-visual)socket lifecycle, handshake, rooms

3. State mapping

All surfaces map the five realtime states to the shared state vocabulary (idle / loading / success / empty / error — 00-shared/03 legend):

Realtime stateShared vocabulary mapping
idleidle
connectingloading (indeterminate, non-blocking)
connectedsuccess
reconnectingloading (indeterminate) + warning tint
offlineerror (offline subtype per 00-shared/10 QA baseline)
error-autherror (auth subtype — distinct copy, no destructive tone)

4. Typography

  • Debug log: font.mono (00-shared/02), text.sm, tabular numerals for timestamps.
  • Banner/toast: text.md title + text.sm body per shared type scale.

5. Motion (from 00-shared/08)

InteractionMotion
banner in/outm-fast slide from top (16 dp)
dot pulse1 s ease-in-out loop, only in connecting/reconnecting
row flash200 ms ease-out highlight
toastm-fast fade+slide, 5 s dwell
status sheetm-base slide-up, content m-fast fade

6. Accessibility (from 00-shared/09)

  • Status never color-only: dot always paired with label/tooltip/live-region text.
  • Banner content in live region; retry button reachable by keyboard (tab order after app bar).
  • Toast auto-dismiss must not destroy meaning: bell badge persists as the durable signal.
  • Debug view: monospace rows readable with text-scale up to 200%; filter field labeled.
  • Reduced-motion: pulse and row-flash degrade to static states (00-shared/09).

7. QA alignment (from 00-shared/10)

  • Realtime surfaces follow the shared QA baseline (offline/error matrix) plus module cases in 14_QA_Checklist.md.