refactor(stories): combine stories into one preview - #306
Draft
H4ad wants to merge 8 commits into
Draft
Conversation
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
marked this pull request as draft
June 15, 2026 15:52
H4ad
force-pushed
the
chore/remove-tailwind
branch
from
July 2, 2026 21:55
5b34308 to
dd0b767
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should reduce the amount of snapshots from 505 to 41, limited only to
Previewstories.