feat: add Storybook stories for remaining UI primitives#1
Open
Dennis-Ritchie1 wants to merge 2 commits into
Open
feat: add Storybook stories for remaining UI primitives#1Dennis-Ritchie1 wants to merge 2 commits into
Dennis-Ritchie1 wants to merge 2 commits into
Conversation
…InsufficientBalanceWarning Adds *.stories.tsx coverage for the remaining UI primitives so every component in src/components/UI/ has a default plus meaningful variants: - ConfirmModal: default, no-description, destructive, and closed states - ProgressIndicator: pending, in-progress, completed, and error states - InsufficientBalanceWarning: testnet, mainnet, and large-shortfall states (wrapped in mocked Wallet/Toast context providers) Also ignores the Storybook build output (storybook-static/). The build-storybook step already runs in .github/workflows/storybook.yml and passes locally via `npm run build-storybook`.
The Storybook CI job installs with `npm install --legacy-peer-deps`, which skips peer dependencies. esbuild was only present as a peer dep, so esbuild-register (used to evaluate .storybook/main.ts) failed with "Cannot find module 'esbuild'" in CI. Declaring esbuild directly ensures it is hoisted to top-level node_modules during the workflow build.
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.
Description
Storybook was configured with only a preview setup. Several primitives in
frontend/src/components/UI/had no stories. This PR adds story coverage so every UI primitive has a default plus meaningful variants.Changes
ConfirmModal.stories.tsx— default, no-description, destructive action, and closed states (uses@storybook/testfn()for callbacks).ProgressIndicator.stories.tsx— pending, in-progress, completed, and error states.InsufficientBalanceWarning.stories.tsx— testnet, mainnet, and large-shortfall states, wrapped in mockedWalletContext/ToastContextproviders..gitignore— ignore thestorybook-static/build output.Button.stories.tsxandInput.stories.tsxalready existed, so all five primitives (Button, Input, ConfirmModal, ProgressIndicator, InsufficientBalanceWarning) are now covered.The
build-storybookstep already runs in.github/workflows/storybook.yml, so no workflow change was needed.Acceptance criteria
npm run build-storybooksucceeds locallystorybook.yml) exercises the same buildVerification
Notes
Scope was kept strictly to the Storybook stories deliverable. Pre-existing repo-wide lint/format/test baseline issues (unrelated to these additive story files) were intentionally left untouched.