Conversation
✅ Deploy Preview for phillips-seldon ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
🚀 Storybook preview is ready. • Preview: https://68b9f094608b90f3cfec5a06-xystywsfnl.chromatic.com/ |
…tton-component-to-seldon
…ent-to-seldon' of https://github.com/PhillipsAuctionHouse/seldon into L3-11299-design-system-rw-introduce-small-button-component-to-seldon
Contributor
Author
|
Sent to design for review |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a small button size variant to the Button component, removes the deprecated ghost variant (replaced with tertiary), and enhances Storybook documentation with pseudo-state visualization and a comprehensive visual grid of all button variants.
Changes:
- Added
ButtonSizesenum withdefaultandsmalloptions, with new small button styling (32px height, constrained width) - Removed the
ghostbutton variant from types and styles, replacing all usages withtertiaryvariant - Enhanced Storybook with pseudo-state addon, new size-specific stories, and an AllVariantsGrid story showing all combinations
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/Button/types.ts | Added ButtonSizes enum (default, small) and removed ghost variant from ButtonVariants enum |
| src/components/Button/Button.tsx | Added size prop to ButtonProps interface and applied size class modifier to button elements |
| src/components/Button/index.ts | Created barrel export for Button component including ButtonSizes enum |
| src/index.ts | Exported ButtonSizes enum alongside ButtonVariants for public API |
| src/components/Button/_button.scss | Added small button styles and removed all ghost variant styling |
| src/components/Button/_button.stories.scss | Added grid layout styles for AllVariantsGrid story visualization |
| src/components/Button/Button.stories.tsx | Added SmallButtonVariant, SmallButtonWithIcons, and AllVariantsGrid stories with duplicate args issue |
| src/components/Button/Button.test.tsx | Added tests for default and small size rendering |
| src/patterns/ViewingsList/ViewingsListCard.tsx | Replaced ghost variant with tertiary in all button instances |
| package.json | Added storybook-addon-pseudo-states dependency |
| package-lock.json | Lockfile update for new storybook addon |
| .storybook/main.ts | Configured storybook-addon-pseudo-states addon |
Comments suppressed due to low confidence (1)
src/components/Button/Button.stories.tsx:224
- Duplicate args assignment for ButtonAsLinkWithPrefetch. The args are already defined at lines 78-81. This duplicate assignment at line 221-223 will override the previous one and may cause confusion. Remove either this duplicate or the earlier one at lines 78-81.
ButtonAsLinkWithPrefetch.args = {
variant: ButtonVariants.tertiary,
size: 'md',
};
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Jira ticket
L3-11299
L3-11476
Screenshots

Figma link
Figma Link - Buttons
Summary
Change List (describe the changes made to the files)
This pull request adds support for button sizing (including a new small size) to the
Buttoncomponent, improves Storybook documentation with new stories and a visual grid, and enhances testing and styling for these new features. It also introduces pseudo-state visualization in Storybook for easier UI review.Button Size Support and API Enhancements:
ButtonSizesenum withdefaultandsmalloptions, updated theButtoncomponent to accept asizeprop (defaulting todefault), and applied appropriate class names for sizing. [1] [2] [3] [4]ButtonSizesis available from bothindex.tsandButton/index.ts. [1] [2]Storybook Improvements:
storybook-addon-pseudo-statespackage and configured it to enable visualizing hover, focus, and focus-visible states in Storybook. [1] [2]Button.stories.tsxwith new stories for small buttons, small buttons with icons, and anAllVariantsGridthat visually demonstrates all combinations of variants, sizes, and states (static, hover, focus, loading, disabled). [1] [2] [3]Styling and Visuals:
Testing:
Buttoncomponent, ensuring correct class names are applied. [1] [2]Acceptance Test (how to verify the PR)
Regression Test
Evidence of testing
Things to look for during review
feat(scope): ...if aminorrelease should be triggered.phillipsclass prefix are using the prefix variabledata-testidattribute.New Components
index.tsfilecomponentStyles.scssfile.