Add Storybook stories for TemplateCard, TemplateModal, SquareProjectCard, HighlightText, and Carousel components #3075
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
This PR adds Storybook stories for 5 components in the projects section that were identified during a codebase audit as missing story coverage:
Each story file includes a Default story plus variations covering different states (loading, starred, no image, long text, etc.) and edge cases.
Related Issues
N/A - This was an audit task to improve Storybook coverage.
Type of Change
Testing
bun run lint- no new errors introduced (only pre-existing warnings)Button.stories.tsxandProjectCard.stories.tsxImportant: Stories should be verified by running
bun run storybookbefore merging.Human Review Checklist
bun run storybookand verify all new stories render without errorscreateMockProject()helper creates validProjectobjects matching the type from@onlook/models@storybook/nextjs-viteis correct (existing stories use@storybook/react)Additional Notes
Link to Devin run: https://app.devin.ai/sessions/94a68939bd264295950093d331442e52
Requested by: unknown ()
Important
Add Storybook stories for
TemplateCard,TemplateModal,SquareProjectCard,HighlightText, andCarouselcomponents with various scenarios.TemplateCard.stories.tsx: Stories forTemplateCardwith variations like default, new, starred, no image, long text, and multiple cards.TemplateModal.stories.tsx: Stories forTemplateModalPresentationwith variations like default, new, starred, no image, creating state, and closed.SquareProjectCard.stories.tsx: Stories forSquareProjectCardPresentationwith variations like default, no image, recently updated, search highlight, long name, and multiple cards.HighlightText.stories.tsx: Stories forHighlightTextwith variations like default, no search query, match at start/end, multiple matches, case-insensitive, and special characters.Carousel.stories.tsx: Stories forCarouselwith variations like default, no overflow, large/small gap, custom scroll amount, many items, varying sizes, and different container widths.Button.stories.tsxandProjectCard.stories.tsx.bun run storybookto ensure all stories render without errors.This description was created by
for 5ad930e. You can customize this summary. It will automatically update as commits are pushed.