Skip to content

Tagの修正 - #126

Merged
ore0 merged 10 commits into
mainfrom
fix/tag
Aug 15, 2025
Merged

Tagの修正#126
ore0 merged 10 commits into
mainfrom
fix/tag

Conversation

@ore0

@ore0 ore0 commented Aug 14, 2025

Copy link
Copy Markdown

概要

以下のFBに基づいて修正を実施。
https://www.notion.so/goodpatch-design-div/Tag-3ab1d525cb6747b2b9c8215816e8bf7a?v=22aa8f8826858042bf3d000ce653a7a6&source=copy_link

以下のFBは対応不要のためスルー

  • childrenはlabelに変更したい
  • variantの並び順を優先度に合わせてFigmaに揃えた方が良い?(solid/subtle/outline)

変更内容

  • スタイルの調整
    • width
    • height
    • カラー
    • フォントウエイト
    • 角丸
  • テストの調整
  • Storybookの調整
  • Figma Connect
  • registryの文言調整

動作確認

  • pnpm lint を実行
  • pnpm build:package を実行してパッケージが正常にビルドされることを確認
  • pnpm test を実行してテストがすべて成功することを確認

関連 Issue

ore0 added 4 commits August 15, 2025 01:45
- タグコンポーネントのストーリーで子要素のテキストを「Tag」から「ラベル」に変更
- ストーリーの引数を使用して、タグのバリアント、サイズ、ステータスを指定
- TagコンポーネントをFigmaに接続
- プロパティのマッピングを定義
- コード例をFigma用に設定
- Tagコンポーネントの基本レンダリングテストを追加
- カスタムコンテンツのレンダリングテストを追加
- カスタムクラス名の適用テストを追加
- バリアントスタイルの適用テストを追加
- サイズバリアントの適用テストを追加
- ステータスバリアントの適用テストを追加
- 複数のプロパティの適用テストを追加
- アクセシビリティ属性のサポートテストを追加
- エッジケースのテストを追加
- タグのスタイルを改善
- タグのサイズに関するクラス名を更新
- タグの説明文を修正
@ore0
ore0 requested review from Copilot and touyou and removed request for Copilot August 14, 2025 17:14
@vercel

vercel Bot commented Aug 14, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sparkle-design Ready Preview Comment Aug 15, 2025 5:21am

@ore0 ore0 changed the title Fix/tag Tagの修正 Aug 14, 2025
@ore0
ore0 requested a review from Copilot August 14, 2025 17:15

This comment was marked as outdated.

ore0 added 3 commits August 15, 2025 02:18
- ステータスバリアントの期待値に「bg-」プレフィックスを追加
- outlineバリアントの期待値を "border-neutral-500" から "bg-neutral-500" に変更
- outlineバリアントの期待値を"bg-neutral-500"から"bg-white"に変更
- カスタムクラスの期待値を"primary-500"から"border-primary-500"に修正

This comment was marked as outdated.

@touyou touyou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

一点質問しました!どちらもそれ以外はLGTMです!

Comment thread src/components/ui/tag/index.tsx Outdated
Comment on lines +16 to +18
sm: "py-0 px-2 h-5 character-1-bold-pro",
md: "py-0.5 px-2 h-6 character-1-bold-pro",
lg: "py-1 px-2 h-8 character-2-bold-pro",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

q: Figmaのdev mode見るとmin-widthがついているようなのですがこれは対応しますか?
逆にhはline-height基準でFigmaは作られていそうなので合わせて意図通りかは確認しておきたいです!

Image

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

質問ありがとうございます!
めちゃくちゃ大事なポイントでした。

以下の対応を行いました!

  • min-widthの指定
  • heightの除去
  • 折り返しのサポート

Figmaに合わせて固定幅が指定されたときに文字がoverflowする問題を解消して折り返し処理を行うように修正しています。

- タグのサイズに最小幅を追加しました。
@ore0
ore0 requested review from Copilot and touyou August 15, 2025 05:08

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

This PR implements Tag component styling adjustments based on feedback, including color, font weight, border radius updates, and improved testing and documentation.

  • Style adjustments including color scheme changes from base-* to neutral-*, font weight changes to bold, and border radius changes to rounded-notice
  • Test modernization from custom TestContainer to standard React Testing Library
  • Storybook improvements with better story structure and Japanese content

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
item.json Updated component description to better reflect Tag's purpose
index.tsx Core styling changes: colors, typography, sizing, and border radius
index.test.tsx Complete test refactor using React Testing Library with improved coverage
index.stories.tsx Enhanced Storybook stories with proper args forwarding and Japanese labels
index.figma.tsx New Figma Connect integration file for design-code sync

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

- サイズバリアントの期待値を最小幅に変更
- 結合プロパティのテストで期待値を更新

@touyou touyou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

折り返しも確認できました!LGTMです🙆‍♂️

Image

@ore0
ore0 merged commit 299589d into main Aug 15, 2025
3 checks passed
@ore0
ore0 deleted the fix/tag branch August 15, 2025 05:28
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