Skip to content

docs: Migrate Icons, Illustrations, and Patterns into gamut Storybook - #36

Merged
aresnik11 merged 3 commits into
ajr-migrate-atomsfrom
ajr-migrate-icons
Oct 23, 2026
Merged

aresnik11 merged 3 commits into
ajr-migrate-atomsfrom
ajr-migrate-icons

Conversation

@aresnik11

Copy link
Copy Markdown
Contributor

Summary

Co-locates the Icons, Illustrations, and Patterns catalog stories into their own packages (gamut-icons, gamut-illustrations, gamut-patterns) as stories-as-tests, regrouped under a Media & Assets sidebar section, and removes the old styleguide versions. This matches how the component stories already migrated into gamut/src render and run under addon-vitest.

What changed

  • New co-located stories under Media & Assets:
    • gamut-patterns/src/Patterns.stories.tsx → Media & Assets/Patterns
    • gamut-illustrations/src/Illustrations.stories.tsx → Media & Assets/Illustrations
    • gamut-icons/src/Mini.stories.tsx → Media & Assets/Icons/Mini
    • gamut-icons/src/Regular.stories.tsx → Media & Assets/Icons/Regular
  • Each file keeps its Default story (tested + a11y) plus the visual catalog galleries tagged !test so addon-vitest skips them while they still render in Storybook.
  • The Regular icon category groupings (Interface / Learning Environment / Vendor / Skills) are now inlined in the story, replacing the old shared constants.tsx.
  • Storybook config (packages/.storybook/main.ts) now scans gamut-icons/src, gamut-illustrations/src, and gamut-patterns/src.
  • Per-package build config: each package tsconfig.json excludes **/*.stories.tsx from the build (so tsc --emitDeclarationOnly ignores them) and adds the ~storybook/blocks path so ImageGallery resolves.
  • Removed the styleguide Atoms/{Patterns,Illustrations,Icons} stories, their wrapper .mdx docs, the Icons About.mdx dev guide, and the now-unused constants.tsx.

Testing

  1. yarn test:stories Patterns Illustrations Mini Regular — all four Default stories pass (incl. a11y).
  2. yarn storybook and confirm Media & Assets shows Patterns, Illustrations, and Icons/Mini + Icons/Regular, each with a working Default controls panel (icon/pattern/illustration select) and the full visual catalog galleries.
  3. Confirm the old Atoms/Patterns, Atoms/Illustrations, and Atoms/Icons entries are gone.
  4. yarn nx build gamut-icons && yarn nx build gamut-illustrations && yarn nx build gamut-patterns — builds succeed and dist contains no story files.

PR Checklist

  • Related to designs:
  • Related to JIRA ticket: [ABC-123]
  • Changeset added (or empty changeset if no release)
  • I have run this code to verify it works
  • This PR includes unit tests for the code change
  • This PR includes testing instructions tests for the code change
  • Package previews from this PR are passing end-to-end tests in all relevant consuming repositories

aresnik11 and others added 2 commits October 16, 2026 16:53
Co-locate the catalog stories within gamut-icons, gamut-illustrations,
and gamut-patterns under Media & Assets, scanning those package src
dirs from the Storybook config. Exclude stories from each package build
and resolve ImageGallery via the ~storybook/blocks path. Remove the old
styleguide stories, docs, and the now-unused icon category constants.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@aresnik11
aresnik11 marked this pull request as ready for review October 20, 2026 13:35
@aresnik11
aresnik11 requested a review from a team as a code owner October 20, 2026 13:35

@LinKCoding LinKCoding left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good to me!

I don't remember if there was a ticket to fix the playground links, but it's in the back of my mind

@aresnik11
aresnik11 added this pull request to stack #48 October 23, 2026 19:39
@aresnik11
aresnik11 merged commit 74156ac into main Oct 23, 2026
1 check passed
@aresnik11
aresnik11 deleted the ajr-migrate-icons branch October 23, 2026 19:40
@codecov

codecov Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.71%. Comparing base (1c7601e) to head (567e679).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/gamut-icons/src/Regular.stories.tsx 0.00% 30 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@                  Coverage Diff                  @@
##           ajr-migrate-atoms      #36      +/-   ##
=====================================================
- Coverage              88.96%   88.71%   -0.26%     
=====================================================
  Files                    277      355      +78     
  Lines                   5947     6149     +202     
  Branches                2011     1987      -24     
=====================================================
+ Hits                    5291     5455     +164     
- Misses                   646      684      +38     
  Partials                  10       10              
Flag Coverage Δ
pull-request 88.71% <0.00%> (-0.26%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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