Skip to content

feat(components): refresh core controls#16

Merged
marklearst merged 1 commit into
pr/03-vitestfrom
pr/16-core-components
Jan 8, 2026
Merged

feat(components): refresh core controls#16
marklearst merged 1 commit into
pr/03-vitestfrom
pr/16-core-components

Conversation

@marklearst
Copy link
Copy Markdown
Owner

Overview
feat(components): refresh core controls

Changes

  • feat(components): refresh core controls

Copilot AI review requested due to automatic review settings January 8, 2026 03:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refreshes core control components with consistent code formatting, improved type safety, and comprehensive test coverage. The changes modernize the codebase by adopting single quotes, explicit type imports, and removing unused React imports while maintaining backward compatibility.

  • Standardized code style across all core control components (toggle, tag, spinner, checkbox, button, badge, avatar, alert, etc.)
  • Added unit tests for previously untested components (toggle, tag, spinner, checkbox, button-group, icon-button, badge, avatar, alert, spinner-overlay)
  • Enhanced component APIs with optional props (SpinnerOverlay now accepts size, opacity, and className)
  • Improved theming by replacing hardcoded colors with CSS variables in Spinner component

Reviewed changes

Copilot reviewed 45 out of 45 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/components/toggle/* Code formatting, type imports, and added comprehensive test coverage
src/components/tag/* Code formatting, type imports, and added test coverage
src/components/spinner/* Replaced hardcoded SVG colors with CSS variables and added tests
src/components/spinner-overlay/* Added configurable props (size, opacity, className) and test coverage
src/components/icon-button/* Code formatting, type imports, and added test coverage
src/components/checkbox/* Code formatting, type imports, and added test coverage
src/components/button/* Code formatting, type imports, helper function extraction, and existing tests updated
src/components/button-group/* Code formatting, type imports, and added test coverage
src/components/badge/* Code formatting, type imports, and existing tests updated
src/components/avatar/* Code formatting, removed unused import, and existing tests updated
src/components/alert/* Code formatting, type imports, and existing tests updated
src/components/*/index.ts Converted all index files from double to single quotes
src/components/*/stories.tsx Migrated from @storybook/react to @storybook/react-vite, refactored state management
src/components/index.ts Converted exports from double to single quotes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +29 to +37
type Story = StoryObj<typeof ButtonGroup>

export const Default: Story = {
render: () => (
<ButtonGroup>
<ButtonGroup.Button type="button">Normal</ButtonGroup.Button>
<ButtonGroup.Button type="button" disabled>
Disabled
</ButtonGroup.Button>
<ButtonGroup.Button type="button" isActive>
Active
</ButtonGroup.Button>
<ButtonGroup.Button type="button" isActive disabled>
Active & Disabled
</ButtonGroup.Button>
<ButtonGroup.Button type="button">Button 1</ButtonGroup.Button>
</ButtonGroup>
),
};
render: ({
normalLabel,
disabledLabel,
activeLabel,
activeDisabledLabel,
extraLabel,
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Story type on line 29 is typed as StoryObj, but the args defined in meta (lines 7-13) and used in the render function (lines 32-37) don't match the ButtonGroup component props. These are custom args only used by the story's render function. Consider creating a custom type for the story args or using StoryObj without a generic to avoid TypeScript type mismatches.

Copilot uses AI. Check for mistakes.
Base automatically changed from pr/15-table to pr/03-vitest January 8, 2026 03:51
@marklearst marklearst merged commit 9aeba25 into pr/03-vitest Jan 8, 2026
8 of 11 checks passed
@marklearst marklearst deleted the pr/16-core-components branch January 8, 2026 03:51
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