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

Module → design-system mapping. Tokens in 00-shared/02, components in 00-shared/03, mapping method in 00-shared/04. This file adds webhook specifics only.


1. Semantic status mapping (delivery health)

Domain stateToken roleComponent usage
success (webhook-delivery-log.schema.ts:20)successAppBadge success; metric green
failed (same)dangerAppBadge danger; metric red + pulse; retry affordance
pending (same)warningAppBadge warning amber; metric amber
webhook enabled: true (webhook.schema.ts:22-23)successbadge "Active"
webhook enabled: falseneutralbadge "Paused"
no deliveries yetneutralempty state icon

Rules: color never alone - text label always present (00-shared/09).

2. Type ramp

ContentToken (00-shared/02)
Screen titles / AppBartext-lg / text-xl semibold
Webhook name (list, detail)text-md semibold
URLtext-sm monospace (fontMono), muted
Event chipstext-sm label in chip
Delivery log eventTypetext-sm monospace
Payload / responseBody code blockstext-xs monospace, surface-muted background
Metrics countstext-2xl tabular-nums

3. Spacing & layout

  • List rows: 16 dp padding, 8 dp between sections.
  • Create/edit form: AppCard 16 dp padding, field spacing 16 dp.
  • Metrics grid: 2 columns (12/24) on phone, 4 on tablet.
  • Dialog width ≤ 360 dp; bottom sheet ≤ 80% height (payload scroll).

4. Iconography

ConceptIcon
Webhook (list tile leading)globe/webhook glyph
Activecheck-circle
Pausedpause-circle
Delivery status iconsclock (pending), check (success), alert (failed)
Actionssend (test), replay (retry), eye/eye-off (secret), copy

5. Dark mode / contrast

  • Code blocks: surface-muted with text-on-surface; status badges keep token pairs - no raw hex anywhere (00-shared/02).
  • Monospace URL contrast ≥ 4.5:1 on both themes.

6. Motion tokens (00-shared/08)

InteractionToken
chip toggle, snackbar, badge cross-fadem-fast (150 ms)
screen push, sheet rise, row fade-inm-base (250 ms)
failed-count attention pulsem-slow (400 ms), disabled on motion-reduce

7. Component mapping table

Module widget (07)Base componentsShared counterpart
EventPickerChipFieldAppChips grid + AppTextField (custom input)00-shared/03 chips
SecretFieldAppTextField + icon buttons-
DeliveryLogTileAppListTile + AppBadge-
MetricsTileAppStatTile × 400-shared/03 stats
SignatureVerifyCardAppCard + monospace blocks-