Skip to content

Switchの修正 - #116

Merged
touyou merged 8 commits into
mainfrom
fix/switch
Aug 14, 2025
Merged

Switchの修正#116
touyou merged 8 commits into
mainfrom
fix/switch

Conversation

@touyou

@touyou touyou commented Jul 28, 2025

Copy link
Copy Markdown
Member

概要

以下の指摘事項の修正と微調整
https://www.notion.so/goodpatch-design-div/Switch-273ecd0afd1048db8c9015f3bb9895d2?source=copy_link

変更内容

  • 項目整理
  • フォーカスとdisabledの色修正
  • Storybook調整
  • registry更新
  • テスト追加
  • Figma Connect
  • ドキュメント整理

動作確認

  • pnpm lint を実行
  • pnpm build を実行してプロジェクトが正常にビルドされることを確認
  • pnpm test を実行してテストがすべて成功することを確認

関連 Issue

touyou added 6 commits July 28, 2025 14:12
- スイッチコンポーネントの型定義を改善
- 不要な説明文を削除
- コードの構造を整理
- サムネイルのスタイルからdisabled状態のスタイルを削除
- disabled状態のスタイルをvariantsに追加し、適切に適用
- スイッチの基本レンダリングテストを追加
- サイズバリアントに関するテストを追加
- 状態管理に関するテストを追加
- ユーザーインタラクションに関するテストを追加
- 無効状態に関するテストを追加
- アクセシビリティに関するテストを追加
- カスタムプロパティに関するテストを追加
- エッジケースに関するテストを追加
- スイッチコンポーネントのFigmaとの接続を設定
- 自動生成されたプロパティマッピングを追加
- コード例をFigmaに表示するための関数を追加
@touyou
touyou requested a review from ore0 July 28, 2025 05:26
@touyou touyou self-assigned this Jul 28, 2025
Copilot AI review requested due to automatic review settings July 28, 2025 05:26
@vercel

vercel Bot commented Jul 28, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Project Deployment Preview Comments Updated (UTC)
sparkle-design Ready Preview Comment Aug 14, 2025 1:56am

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.
    }

Comment thread src/components/ui/switch/index.tsx
Comment thread src/components/ui/switch/index.tsx
- インポート文の整形
- コードの一貫性を向上
@touyou
touyou merged commit b2a8ff8 into main Aug 14, 2025
3 checks passed
@touyou
touyou deleted the fix/switch branch August 14, 2025 01:57
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.

3 participants