Skip to content

refactor(stories): combine stories into one preview - #306

Draft
H4ad wants to merge 8 commits into
chore/remove-tailwindfrom
refactor/de-duplicate-stories
Draft

refactor(stories): combine stories into one preview#306
H4ad wants to merge 8 commits into
chore/remove-tailwindfrom
refactor/de-duplicate-stories

Conversation

@H4ad

@H4ad H4ad commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

This should reduce the amount of snapshots from 505 to 41, limited only to Preview stories.

H4ad and others added 8 commits June 15, 2026 12:02
Tailwind's base/Preflight layer was masking real styling issues (#294).
Remove the Tailwind toolchain from the monorepo:

- delete the @signozhq/tailwind-config package
- drop tailwindcss, @tailwindcss/vite, @tailwindcss/postcss and
  tailwindcss-animate from the docs app
- remove the workspace references to tailwind-config (typescript-config,
  root packageExtensions, release-please, CODEOWNERS)

Refs #294
The Button/DataTable loading spinner used the `animate-fast-spin` utility
generated by Tailwind's @theme layer, so it stopped animating once Tailwind
was removed (and in any non-Tailwind consumer).

Ship the keyframe + class per component in plain CSS files imported by the
components, so they are injected with the component CSS:

- Button: `button-animate-fast-spin` (override: --button-animate-fast-spin)
- DataTable: `table-animate-fast-spin` (override: --table-animate-fast-spin)

Distinct class names avoid a shared-class cascade collision. Plain CSS is
required because CSS Modules hash @Keyframes names but not the name inside an
`animation` var() fallback, which silently breaks the animation. The override
tokens are documented via the token-doc extractor.

Refs #294
Drop the Tailwind Vite/PostCSS pipeline from Storybook and import the design
tokens as plain CSS instead:

- remove the @tailwindcss/vite plugin from .storybook/main.js
- delete postcss.config.js (@tailwindcss/postcss)
- rewrite index.css to import @signozhq/design-tokens directly and wire body
  to the tokens (no reset — issues should surface, not be masked); drop the
  inert [data-theme-color] blocks (nothing sets that attribute)
- drop the now-invalid 'use with Tailwind' section from intro.mdx

Refs #294
The theme/mode toolbar used Tailwind utility classes (broken once Tailwind was
removed) and then inline styles. Move all styling into modeDecorator.css and
drive dark mode from a state-controlled .sb-mode-controls--dark modifier.
A reusable skill that converts Tailwind utility classNames in Storybook
story files to inline React style objects. The codemod (codemod/convert.mjs)
handles the deterministic bulk; codemod/REFERENCE.md documents the mapping
spec and how to resolve the judgment cases it flags (dark:/gradients/standard
palette colors). Used to migrate the docs stories off Tailwind.
Migrate all Storybook stories off Tailwind utility classNames to inline React
style objects (via the tailwind-to-inline-styles codemod + a manual pass for
judgment cases). Covers HTML elements, component props (icons → size + style),
gradients (→ linear-gradient), dark: pairs (→ semantic design-token vars), and
standard palette demo colors (→ hex). Stories now render without Tailwind,
so they don't break when the Tailwind removal (#294) lands.
@H4ad
H4ad requested a review from a team as a code owner June 15, 2026 15:51
@H4ad
H4ad marked this pull request as draft June 15, 2026 15:52
@H4ad
H4ad force-pushed the chore/remove-tailwind branch from 5b34308 to dd0b767 Compare July 2, 2026 21:55
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