Switchの修正 - #116
Merged
Merged
Conversation
- スイッチコンポーネントの型定義を改善 - 不要な説明文を削除 - コードの構造を整理
- サムネイルのスタイルからdisabled状態のスタイルを削除 - disabled状態のスタイルをvariantsに追加し、適切に適用
- スイッチの基本レンダリングテストを追加 - サイズバリアントに関するテストを追加 - 状態管理に関するテストを追加 - ユーザーインタラクションに関するテストを追加 - 無効状態に関するテストを追加 - アクセシビリティに関するテストを追加 - カスタムプロパティに関するテストを追加 - エッジケースに関するテストを追加
- スイッチコンポーネントのFigmaとの接続を設定 - 自動生成されたプロパティマッピングを追加 - コード例をFigmaに表示するための関数を追加
- スイッチコンポーネントの対応状況を「✅」に変更
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Pull Request Overview
The Switch component has undergone a comprehensive refactoring to modernize its implementation, improve accessibility, and align with the project's design system. The changes include a complete rewrite of the component structure, enhanced testing coverage, improved color scheme consistency, and updated documentation.
- Updated Switch component implementation from forwardRef pattern to function component
- Enhanced color scheme to use semantic color tokens (neutral/primary instead of gray/blue)
- Added comprehensive test suite with 342 lines covering all component behaviors
- Modernized registry configuration and Figma Connect integration
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/ui/switch/index.tsx | Complete component rewrite with enhanced props interface and semantic color tokens |
| src/components/ui/switch/index.test.tsx | New comprehensive test suite covering all component functionality |
| src/components/ui/switch/index.stories.tsx | Updated Storybook configuration with improved prop handling |
| src/components/ui/switch/index.figma.tsx | New Figma Connect integration file |
| src/components/ui/switch/item.json | Simplified registry item configuration |
| registry.json | Massive reorganization of component registry structure |
| public/r/switch.json | Updated public registry configuration |
| public/r/tooltip.json | New tooltip component registry entry |
| public/r/registry.json | Mirror of main registry updates |
Comments suppressed due to low confidence (1)
src/components/ui/switch/item.json:11
- Missing closing bracket for the files array. The JSON structure is incomplete.
}
- インポート文の整形 - コードの一貫性を向上
ore0
approved these changes
Aug 13, 2025
5 tasks
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.
概要
以下の指摘事項の修正と微調整
https://www.notion.so/goodpatch-design-div/Switch-273ecd0afd1048db8c9015f3bb9895d2?source=copy_link
変更内容
動作確認
pnpm lintを実行pnpm buildを実行してプロジェクトが正常にビルドされることを確認pnpm testを実行してテストがすべて成功することを確認関連 Issue