Skip to content

Feat: Chip component 구현#74

Merged
seueooo merged 6 commits into
developfrom
feat/chip-component/#73
Jul 19, 2025
Merged

Feat: Chip component 구현#74
seueooo merged 6 commits into
developfrom
feat/chip-component/#73

Conversation

@seung365

@seung365 seung365 commented Jul 19, 2025

Copy link
Copy Markdown
Member

📌 Summary

재사용 가능한 Chip 컴포넌트를 구현하고 Storybook에 문서화했습니다.
작업 과정에서 텍스트 토큰 수정사항을 반영했습니다.

📚 Tasks

Chip 컴포넌트 구현

  • 다양한 variant와 size를 지원하는 Chip 컴포넌트 개발
image

텍스트 토큰 수정사항 반영

image

👀 To Reviewer

텍스트 토큰의 경우 수정사항 반영하였고 기본적으로 framer의 이름을 따름과 동시에 숫자로만 표시되어 있는 fixed의 경우 F를 prefix로 붙여 작명하였습니다!
ex) F16

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • 새로운 Chip UI 컴포넌트가 추가되었습니다. 다양한 색상(퍼플, 그레이)과 크기(기본, 스몰) 옵션을 지원합니다.
    • Chip 컴포넌트의 다양한 스타일과 사용 예시를 확인할 수 있는 Storybook 스토리가 추가되었습니다.
  • Style

    • 텍스트 스타일 토큰의 네이밍과 단위가 간결하고 일관성 있게 정리되었습니다.
    • 네비게이션 바 버튼 및 메뉴 항목의 타이포그래피 스타일이 최신 텍스트 토큰을 사용하도록 업데이트되었습니다.

@seung365 seung365 self-assigned this Jul 19, 2025
@seung365 seung365 requested a review from seueooo as a code owner July 19, 2025 07:58
@coderabbitai

coderabbitai Bot commented Jul 19, 2025

Copy link
Copy Markdown

"""

Walkthrough

텍스트 스타일 토큰의 네이밍과 단위가 일관성 있게 리팩토링되었고, Chip UI 컴포넌트가 새롭게 추가되었습니다. Chip 컴포넌트의 스타일, 스토리북 문서, 컴포넌트 구현이 포함되며, 기존 네비게이션 바 스타일에서 텍스트 토큰 참조도 최신화되었습니다.

Changes

파일/경로 변경 요약
shared/styles/tokens/text.ts, shared/ui/navbar/navbar-main/... 텍스트 스타일 토큰 네이밍 간소화, 단위(em→rem) 통일, 일부 브레이크포인트 및 참조 업데이트
shared/ui/chip/chip.css.ts, shared/ui/chip/index.tsx Chip 컴포넌트 및 스타일(variant, size) 신규 추가
shared/ui/chip/chip.stories.tsx Chip 컴포넌트 스토리북 문서 및 다양한 variant/size 예시 추가

Sequence Diagram(s)

sequenceDiagram
    participant Storybook
    participant Chip
    participant Styles

    Storybook->>Chip: variant, size, className, children 전달
    Chip->>Styles: chipBase, chipVariant[variant], chipSize[size] 적용
    Chip-->>Storybook: <span> 렌더링 (children 포함)
Loading

Possibly related issues

Possibly related PRs

  • Feat: 디자인 토큰 설정 #59: 기존 텍스트 테마, 컬러 테마, 폰트 시스템 초기 도입 PR로, 이번 PR의 텍스트 토큰 리팩토링과 코드적으로 직접 연결됩니다.

Suggested reviewers

  • seueooo
    """

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f7e5be6 and 5ec7bf2.

📒 Files selected for processing (1)
  • shared/styles/tokens/text.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • shared/styles/tokens/text.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: storybook-deploy
  • GitHub Check: test
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/chip-component/#73

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@seung365 seung365 changed the title Feat: chip component 구현 Feat: Chip component 구현 Jul 19, 2025
@github-actions

github-actions Bot commented Jul 19, 2025

Copy link
Copy Markdown

🚀 Storybook 배포

📖 Storybook: https://683d91ab23651aa0b399e435-kwfksihigz.chromatic.com/
🔗 Chromatic Build: https://www.chromatic.com/build?appId=683d91ab23651aa0b399e435&number=65
✅ Status: success

@github-actions

Copy link
Copy Markdown

This pull request (commit f7e5be6) has been deployed to Vercel ▲ - View GitHub Actions Workflow Logs

Name Link
🌐 Unique https://time-capsule-7fpecnv9b-hs-projects-b4a69d5f.vercel.app
🔍 Inspect https://vercel.com/hs-projects-b4a69d5f/time-capsule/AAG6FCKZ1d3mMmVCj91DGjeZ3NDf

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 3

🧹 Nitpick comments (3)
shared/styles/tokens/text.ts (1)

5-16: H1 토큰의 단위 변경이 올바르게 적용되었습니다.

lineHeightletterSpacingem에서 rem으로 일관성 있게 변경되었습니다. 다만 lineHeight: "1.6rem"이 절대값으로 설정되어 폰트 크기와 상관없이 고정된 높이를 갖게 됩니다.

shared/ui/chip/index.tsx (1)

26-26: named export를 고려해보세요.

프로젝트의 일관성과 tree-shaking을 위해 named export를 사용하는 것을 권장합니다.

-export default Chip;
+export { Chip };
shared/ui/chip/chip.css.ts (1)

5-14: 기본 스타일이 잘 정의되었습니다.

flexbox 레이아웃과 적절한 크기 설정이 좋습니다. 다만 padding 값을 간소화할 수 있습니다.

-  padding: "0px 4px 0px 4px",
+  padding: "0 4px",
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 08ed822 and f7e5be6.

📒 Files selected for processing (5)
  • shared/styles/tokens/text.ts (2 hunks)
  • shared/ui/chip/chip.css.ts (1 hunks)
  • shared/ui/chip/chip.stories.tsx (1 hunks)
  • shared/ui/chip/index.tsx (1 hunks)
  • shared/ui/navbar/navbar-main/navbar-main.css.ts (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (3)
shared/ui/chip/index.tsx (2)
shared/ui/chip/chip.css.ts (3)
  • chipVariant (16-25)
  • chipSize (27-40)
  • chipBase (5-14)
shared/utils/cn.ts (1)
  • cn (3-5)
shared/ui/chip/chip.css.ts (2)
shared/styles/tokens/color.ts (1)
  • colorTheme (1-62)
shared/styles/tokens/text.ts (1)
  • textTheme (4-139)
shared/ui/chip/chip.stories.tsx (1)
shared/styles/tokens/color.ts (1)
  • colorTheme (1-62)
🔇 Additional comments (10)
shared/styles/tokens/text.ts (1)

76-138: F 시리즈 토큰들이 일관성 있게 구현되었습니다.

새로운 명명 규칙과 rem 단위 사용이 올바르게 적용되었습니다. 토큰 구조가 깔끔하고 유지보수하기 좋습니다.

shared/ui/navbar/navbar-main/navbar-main.css.ts (2)

43-43: 텍스트 토큰 참조가 올바르게 업데이트되었습니다.

caption15에서 F15로의 토큰 명명 변경이 정확히 반영되었습니다.


90-90: 텍스트 토큰 참조 업데이트가 완료되었습니다.

caption16에서 F16으로의 변경이 적절하게 적용되었습니다.

shared/ui/chip/index.tsx (2)

5-9: 타입 정의가 잘 구성되었습니다.

PropsWithChildren을 확장하고 keyof typeof를 사용하여 타입 안전성을 보장하는 좋은 패턴입니다.


11-24: 컴포넌트 구현이 깔끔하고 효율적입니다.

기본값 설정, className 조합, 그리고 전체적인 구조가 React 모범 사례를 잘 따르고 있습니다.

shared/ui/chip/chip.css.ts (2)

16-25: variant 스타일이 테마 토큰을 올바르게 활용했습니다.

색상 대비가 충분하고 브랜딩에 적합한 색상 조합을 사용했습니다.


27-40: size variant가 텍스트 토큰을 효과적으로 재사용하고 있습니다.

F12와 F14 토큰을 사용하여 일관된 타이포그래피를 구현했습니다. 토큰의 모든 속성을 개별적으로 적용하는 것이 정확합니다.

shared/ui/chip/chip.stories.tsx (3)

6-62: Storybook 설정이 매우 포괄적이고 잘 구성되었습니다.

메타데이터, 컨트롤, 한국어 문서화, 그리고 다크 배경 데코레이터까지 모든 요소가 잘 갖춰져 있습니다.


68-106: 개별 스토리들이 모든 조합을 적절히 커버하고 있습니다.

각 variant와 size 조합에 대한 스토리가 명확하고 일관성 있게 정의되었습니다.


108-125: AllVariants 스토리가 컴포넌트 개발에 매우 유용합니다.

모든 조합을 한눈에 볼 수 있는 종합 뷰를 제공하여 시각적 테스트와 개발 효율성을 높입니다.

Comment thread shared/styles/tokens/text.ts
Comment thread shared/styles/tokens/text.ts
Comment thread shared/styles/tokens/text.ts
@seung365 seung365 linked an issue Jul 19, 2025 that may be closed by this pull request
@github-actions

Copy link
Copy Markdown

This pull request (commit 5ec7bf2) has been deployed to Vercel ▲ - View GitHub Actions Workflow Logs

Name Link
🌐 Unique https://time-capsule-7nhe5gkst-hs-projects-b4a69d5f.vercel.app
🔍 Inspect https://vercel.com/hs-projects-b4a69d5f/time-capsule/9JBdPPnPwETNS4A4ww8b5UcvoAKg

@seueooo seueooo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

굿굿 고생하셨슴다!!!

@seueooo seueooo merged commit 132b6e0 into develop Jul 19, 2025
8 checks passed
@seueooo seueooo deleted the feat/chip-component/#73 branch July 19, 2025 16:31
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.

[Feature]: Chip 컴포넌트 구현

2 participants