Skip to content

Add tabbed carousel to design system pages#83

Closed
jamesrochabrun wants to merge 1 commit into
mainfrom
design-system-tabs
Closed

Add tabbed carousel to design system pages#83
jamesrochabrun wants to merge 1 commit into
mainfrom
design-system-tabs

Conversation

@jamesrochabrun

Copy link
Copy Markdown
Owner

Summary

The design system page previously stacked every category (colors, typography, spacing, components, …) in one long scroll, forcing a lot of scrolling to find anything. This replaces that with a scrollable tab carousel so each category gets its own focused view — applied to both surfaces where a design system is shown.

Changes

Native browser — DesignSystemReferenceView.swift

  • Dynamic tab list built from the catalog (only sections that actually have content appear: Overview, Colors, Typography, Spacing, Radii, Effects, Components, Examples, Diagnostics).
  • Sticky horizontal pill carousel with icons + count badges; the selected highlight slides between tabs via matchedGeometryEffect, the active tab auto-centers, and panels cross-fade on switch.
  • Selection resolves safely and resets when switching design systems. Accessibility traits (.isButton / .isSelected) added.

Native browser host — DesignSystemBrowserView.swift

  • Reference catalogs now get a fixed header with the carousel pinned below (its own scroll), so you can switch tabs without scrolling back up. Loading / error / component-group / empty states keep the original scrolling layout.

Canvas web preview — EaselDesignSystemCatalogHTMLRenderer.swift

  • Mirrors the same hierarchy in the generated index.html: an accessible role="tablist" carousel (capsule pills, count badges, keyboard nav: ←/→/Home/End, prefers-reduced-motion opt-out).
  • Kept the required element IDs and the catalog-loading/rendering flow intact (per the constraint in EaselDesignSystemManager.swift); only the content layout changed.

Note on existing design systems

index.html is written at create/import time, so new design systems get the tabbed canvas automatically; existing ones need a Regenerate to pick it up in the canvas. The native browser updates immediately.

Testing

  • swift build --target EaselDesignSystems → build complete.
  • EaselChat-Package builds; EaselDesignSystemsTests (incl. both HTML-renderer tests) → all passed.
  • Extracted the embedded JS → node --check → syntax OK.

🤖 Generated with Claude Code

Replace the long vertical scroll on the design system page with a
scrollable tab carousel so colors, typography, spacing, components,
etc. each get a focused view instead of being stacked end to end.

- DesignSystemReferenceView: dynamic tab list (only sections with
  content), sticky horizontal pill carousel with a sliding selection
  highlight (matchedGeometryEffect), count badges, cross-fade between
  panels, and accessibility traits. Sections are derived from the
  catalog and selection resets when the catalog changes.
- DesignSystemBrowserView: give reference catalogs a fixed header with
  the carousel pinned below (no nested scroll); other states keep the
  existing scroll layout.
- EaselDesignSystemCatalogHTMLRenderer: mirror the same hierarchy in the
  canvas web preview with an accessible role=tablist carousel, keeping
  the required element IDs and catalog-loading flow intact.
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.

1 participant