Skip to content

Design system hardening: charts, drawer, tokens, skeleton#117

Merged
jaymantri merged 22 commits intomainfrom
ajay/design-system-hardening
Mar 5, 2026
Merged

Design system hardening: charts, drawer, tokens, skeleton#117
jaymantri merged 22 commits intomainfrom
ajay/design-system-hardening

Conversation

@jaymantri
Copy link
Contributor

@jaymantri jaymantri commented Mar 5, 2026

Summary

  • New: Skeleton -- group-synced subtractive shimmer, adapts to any surface color
  • New: DatePicker -- single/range, time inputs, locale, keyboard nav
  • Charts -- 6 new types, ARIA aligned to WAI-ARIA Graphics Module, unified Skeleton loading
  • Drawer -- nested stacking, outline borders, action sheet, a11y
  • Storybook -- controls on all 52 components, ~80 redundant stories removed
  • Tokens -- alpha surfaces, dark mode refinements
  • Repo -- scrubbed internal URLs, public-ready docs

Test plan

  • Storybook visual QA (all components)
  • Dark mode spot check (Skeleton, Button secondary, Drawer)
  • Chart keyboard nav (arrow keys, Escape, Enter)
  • Drawer configs (nested, snap points, action sheet, side panels)

…upport

Compound component (Root, Header, Navigation, Grid, Controls, ControlItem,
Footer) built on WAI-ARIA date picker grid pattern. Supports single and range
selection, optional time inputs, locale-aware formatting via Intl, controlled
or uncontrolled month navigation, accessibility label overrides, and custom
day cell rendering. Includes Fieldset --fieldset-gap CSS variable for
per-instance gap customization.

Made-with: Cursor
Fix TimeInput blur phantom value creation, range time swap on reverse
click and text input paths, aria-selected for in-range dates, impure
state updater in goToMonth, and nav button disabling at min/max bounds.
Add today indicator style, single commit path for Enter key, and tests
for keyboard navigation, hover preview, input validation, and time
preservation across date reordering.

Made-with: Cursor
Add Scatter, Split, BarList, Funnel, Waterfall, and Sankey chart
components. Remove LiveDot, LiveValue, and ActivityGrid. Consolidate
Ranking into BarList.

Keyboard accessibility: Enter/Space activation across all charts via
useChartScrub onActivate callback, memoized handlers, tooltip
positioning on arrow-key navigation, and focus-visible rings on all
interactive chart elements.

Fix broken shimmer animation on skeleton loading states (gradient
instead of flat background-color). Rename pie-fade-in keyframe to
chart-fade-in. Gate ariaLiveContent on showTooltip in StackedArea and
Composed charts. Replace Split chart pop-in tooltip with legend swap
on hover for zero layout shift.

Add 8 Playwright keyboard interaction tests and a Bar chart test story.
Fix pre-existing test locator issues (strict mode, color-contrast).

Made-with: Cursor
- Reorder demo page h2 sections alphabetically (Calendar before Card)
- Reorder chart h3 sub-sections alphabetically (Bar through Waterfall)
- Add consistent 128px spacing between all h2 sections (9 missing
  spacers, 3 wrong margin values)
- Fix Sankey layout scale factor to subtract padding before dividing
  by value sum, preventing initial placement overflow
- Rewrite resolveCollisions to cascade shifts from bottom up (d3-sankey
  approach) — the previous implementation only shifted the topmost node,
  leaving bottom nodes past the plot height after relaxation
- Decouple stage headers from label visibility so stages always render
  when the stages prop is provided
- Position middle-column Sankey labels at node center instead of
  node.y0 - 6 to prevent overlap with neighboring link strokes
- Shorten demo "Infrastructure" label to "Infra" to stay within the
  40% label-width threshold at typical container widths

Made-with: Cursor
The component functions as a date picker (inputs, controls, footer)
rather than a bare calendar grid. Rename aligns with its actual role
and clarifies that products compose it inside their own popover or
dialog. Reorders demo page to maintain alphabetical section order.

Made-with: Cursor
Remove Figma URLs from source comments, move FIGMA_FILE_KEY to env var,
add .env.example, add homepage/bugs to package.json, and gitignore
ephemeral plan directories and Cursor-generated environment.json.

Made-with: Cursor
Replace "Grid" with "consuming product" in boundary, publishing,
and build-component docs to keep Origin product-agnostic.

Made-with: Cursor
@vercel
Copy link

vercel bot commented Mar 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
origin-storybook Ready Ready Preview, Comment Mar 5, 2026 5:06am

Request Review

jaymantri added 10 commits March 4, 2026 18:39
Replace internal deployment URL with api.example.com in Drawer
demo data and stories.

Made-with: Cursor
Add Tokens section explaining generated files, note internal-only
Figma scripts, and soften font requirement language.

Made-with: Cursor
The library was never imported — all animation in Origin is pure CSS.

Made-with: Cursor
…leanup

Add analyticsName tracking to all 15 chart components. Rename props for
consistency (showGrid->grid, onHover->onActiveChange, scrub->interactive,
onClickItem->onClickDatum). Add interactive, animate, onActiveChange, yDomain,
and loading/empty props where missing. Standardize ChartWrapper usage with ref
forwarding, extract useMergedRef utility, add keyboard navigation to Pie and
Uptime, replace class toggles with data-* attributes, and move inline styles
to SCSS. Re-create LiveDot and LiveValue components. Add 24+ Storybook stories
covering all new features.

Made-with: Cursor
Replace single-prop-flip variant stories with args-driven controls
across all components. Primary stories now expose boolean, enum, and
number props in the Controls panel. Removes ~80 redundant stories
that duplicated what a control toggle already demonstrates.

Made-with: Cursor
…overage

Switch popup from CSS border to outline for clean edge-to-edge
rendering matching Base UI. Add aria-hidden to Handle, replace raw
buttons with Button components in stories, rewrite ActionSheet with
grouped card pattern, add IndentEffect story, and expand Playwright
CT coverage to side panels, nested drawers, and indent effect.

Made-with: Cursor
Skeleton.Group uses the Temani Afif CSS technique: each skeleton's
::before escapes to the Group wrapper via mask clipping, creating a
unified shimmer sweep across all grouped elements. Works on iOS Safari
(no background-attachment: fixed dependency). Alpha surface tokens
ensure the shimmer adapts to any background color.

Made-with: Cursor
Replace custom skeleton CSS in Chart (loadingSkeleton, chartSkeleton,
barListSkeleton, splitSkeleton) and Table (skeleton, skeleton-pulse)
with imports of the Skeleton component. Removes ~100 lines of
duplicated shimmer CSS and unifies loading visuals across all
components on the same alpha tokens and timing.

Made-with: Cursor
Charts: upgrade 11 interactive chart SVGs from role="img" to
role="graphics-document document" with aria-roledescription per chart
type. Add role="graphics-symbol img" with aria-label to navigable data
points in Bar, Waterfall, Scatter, Split, and Uptime. Add aria-live
polite regions to Sankey, Funnel, Waterfall, Split, and Uptime for
screen reader tooltip announcements.

Fixes: remove unused eslint-disable in DatePicker, remove useless null
assignment, collapse Drawer calc to fix stylelint operator-no-newline,
move Skeleton TestRef to test-stories for Playwright CT compatibility.

Made-with: Cursor
When interactive is false, the chart is a static graphic — role="img"
is the correct ARIA role. Sparkline delegates to LineChart with
interactive={false} and expects role="img".

Made-with: Cursor
The Sparkline fixtures used Chart.Line without interactive={false},
so LineChart defaulted to interactive mode and rendered
role="graphics-document document" instead of the expected role="img".

Made-with: Cursor
@jaymantri jaymantri merged commit d7fc0ca into main Mar 5, 2026
7 checks passed
@jaymantri jaymantri deleted the ajay/design-system-hardening branch March 5, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants