Skip to content

test(gamut): port the color stack's story edits for Modal, Menu and Tabs - #75

Closed
dreamwasp wants to merge 1 commit into
cass-gmt-1825-color-preview-rebuildfrom
cass-gmt-1825-color-test-port
Closed

dreamwasp wants to merge 1 commit into
cass-gmt-1825-color-preview-rebuildfrom
cass-gmt-1825-color-test-port

Conversation

@dreamwasp

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #73 (the color stack preview). Ports the remaining story edits from the color stack that #73 didn't carry over, so the story files use the role names and no palette primitives.

Base is cass-gmt-1825-color-preview-rebuild (#73), not main: main doesn't have the role tokens yet.

What changed

  • Modal.stories.tsx: background-primary → surface-default; text-disabled → text-subtle (three places); beige placeholder boxes → surface-sunken.
  • Menu.stories.tsx: hyper text → action-primary; navy fill → surface-sunken; white background → surface-raised.
  • Tabs.stories.tsx: yellow background → surface-sunken.

Already on #73, no change here

  • Alert/Alert.test.tsx: the color tests (ink per variant, floating edge, inline borderless).
  • Modals/Dialog.stories.tsx: text-subtle for disabled text.
  • Modals/Modal.test.tsx: rewritten test file.
  • Tips/InfoTip/InfoTip.stories.tsx: text-subtle and surface-default.

Not changed

  • Flyout: the stack had no test or story edits for it.
  • The palette-to-role picks above are my choice. Designers should check the Menu and Tabs demo backgrounds.

Testing

  • npx jest for Alert, Modals, Menu: 39 tests pass.
  • npx vitest run --project=storybook for the six components' stories (Alert, Dialog, Modal, Menu, MenuItem, Tabs, Flyout, InfoTip): 89 tests pass.
  • eslint and prettier clean on the three changed files.

🤖 Generated with Claude Code

Modal.stories: background-primary → surface-default, text-disabled →
text-subtle (disabled text sits on the surface, per PR 34), and the
beige placeholder boxes → surface-sunken.

Menu.stories and Tabs.stories: palette primitives (hyper, navy, white,
yellow) → roles. Flyout had no story or test edits on the stack.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@dreamwasp
dreamwasp requested a review from a team as a code owner November 12, 2026 13:54

@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.

When running the tests
npx jest still has some of the "wrap in act()warnings that can be addressed laternpx vitest` shows some warnings too, but I haven't seen these before:

In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.
This will cause a hydration error.%s table
^ Maybe something to ticket out

There are two syntax errors that need fixing though, both these have duplicate skillsoftTheme being imported:
packages/.storybook/components/Elements/DocsContainer.tsx
packages/.storybook/theming/GamutThemeProvider.tsx

After fixing that, SB loaded just fine (in one session I got a "max load" error and the server cut off, but I haven't seen that again)

@dreamwasp

Copy link
Copy Markdown
Contributor Author

Superseded: this commit is now in the full preview, #73.

@dreamwasp dreamwasp closed this Nov 13, 2026
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