Skip to content

Feat/#49 Tooltip, Checkbox, Chip 컴포넌트 추가 - #51

Merged
optshj merged 4 commits into
devfrom
feat/#49
Jul 7, 2026
Merged

optshj merged 4 commits into
devfrom
feat/#49

Conversation

@optshj

@optshj optshj commented Jul 6, 2026 •

Copy link
Copy Markdown
Member

#️⃣연관된 이슈

📝작업 내용

  • Tooltip 컴포넌트를 추가했습니다.
    • shadcn/tooltip 기반으로 제작되었습니다. shadcn/tooltip
    • TooltipProvider를 app/provider/index.tsx 에 추가했습니다.
    • HelpTooltip 컴포넌트는 기본적으로 ? 아이콘을 갖고있으며, hover시 children의 메시지를 노출합니다.
      내부 API는 TooltipContent와 동일합니다
image
// HelpTooltip 사용법
<HelpTooltip side="right" sideOffset={8}>도움말 문구에요</HelpTooltip>
<HelpTooltip>다른 사람에게 보여지는 이름이에요.</HelpTooltip>
// Tooltip 사용법
 <Tooltip>
  <TooltipTrigger asChild>
    <Button variant="secondary">{side}</Button>
  </TooltipTrigger>
  // side : 기본값 top, top / right / bottom / left
  // sideOffset : Trigger와 Content의 간격, 기본값 0
  <TooltipContent side={side} sideOffset={8}>{side} 방향 툴팁</TooltipContent>
</Tooltip>
  • Checkbox 컴포넌트를 추가했습니다.
<Checkbox defaultChecked onCheckedChange={(checked) => console.log(checked)} />
  • Chip 컴포넌트를 추가했습니다.
    • 추후 확장성을 고려해 variant와 size를 지정해두었습니다.
    • 디자인에 대한 variant명은 Button 컴포넌트와 통일 시키려 합니다.
// variant의 기본값은 tertiary, tertiary / ghost 
// size의 기본값은 default, default / sm
<Chip variant="ghost" size="sm">태그</Chip>

💬리뷰 요구사항(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

Summary by CodeRabbit

  • New Features

    • 체크박스, 칩, 툴팁 UI 컴포넌트가 새로 추가되었습니다.
    • 칩은 크기/스타일 변형과 링크형 렌더링을 지원합니다.
    • 툴팁은 도움말 아이콘 트리거와 위치 조정을 지원합니다.
    • 더 연한 회색 아이콘 색상 토큰이 추가되었습니다.
  • Documentation

    • 체크박스, 칩, 툴팁에 대한 스토리북 예제가 추가되어 다양한 상태를 쉽게 확인할 수 있습니다.

@optshj optshj linked an issue Jul 6, 2026 that may be closed by this pull request
1 task
@optshj optshj self-assigned this Jul 6, 2026
@optshj optshj added the ✨ Feature 기능 구현 label Jul 6, 2026
@coderabbitai

coderabbitai Bot commented Jul 6, 2026 •

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Checkbox, Chip, Tooltip 디자인 시스템 컴포넌트가 새로 추가되었으며, 각 컴포넌트에 대한 Storybook 스토리와 index 재-export가 함께 포함됩니다. Providers 트리에 TooltipProvider가 삽입되었고, globals.css에 새 아이콘 색상 토큰이 추가되었습니다.

Changes

디자인 시스템 컴포넌트 추가

Layer / File(s) Summary
Checkbox 컴포넌트 및 스토리
src/shared/ui/checkbox/Checkbox.tsx, src/shared/ui/checkbox/index.ts, src/shared/ui/checkbox/Checkbox.stories.tsx
Radix CheckboxPrimitive.Root 기반 Checkbox 컴포넌트를 추가하고 인디케이터/체크 아이콘, 스타일 조합을 구현하며, index에서 재-export하고 상태별 스토리를 제공합니다.
Chip 컴포넌트 및 스토리
src/shared/ui/chip/Chip.tsx, src/shared/ui/chip/index.ts, src/shared/ui/chip/Chip.stories.tsx
cva 기반 chipVariants와 asChild를 지원하는 Chip 컴포넌트를 추가하고 index에서 재-export하며, variant/size/아이콘/asChild 조합 스토리를 구성합니다.
Tooltip 컴포넌트, Providers 연동 및 스토리
src/shared/ui/tooltip/Tooltip.tsx, src/shared/ui/tooltip/index.ts, src/shared/ui/tooltip/Tooltip.stories.tsx, src/app/provider/index.tsx, src/app/style/globals.css
Radix 기반 HelpTooltip, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent를 추가하고 index 재-export, 전역 Providers에 TooltipProvider를 삽입, 관련 방향별 스토리와 아이콘 색상 CSS 변수를 추가합니다.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related issues

Poem

토끼가 코드밭을 콩콩 뛰며,
체크박스에 체크를 콕 찍고,
칩 하나 물고 방향을 살피며,
툴팁 속삭임에 귀 기울이네 🐰
새 컴포넌트들 모두 심었으니,
스토리북 정원에 꽃이 피네! 🌸

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 Tooltip, Checkbox, Chip 컴포넌트 추가라는 핵심 변경 사항을 정확하고 간결하게 요약합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#49

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

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

@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: 2

🧹 Nitpick comments (3)
src/shared/ui/chip/Chip.tsx (1)

13-16: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

default/sm 사이즈의 패딩 값이 동일함

size variant의 default와 sm 모두 px-1.5 py-0.5로 패딩이 동일하고 텍스트 크기(text-label2 vs text-caption1)만 다릅니다. 의도된 설계라면 문제없지만, "크기" variant라는 이름에 비해 실제 크기 차이가 폰트 크기로 국한되어 있어 추후 디자인 요구사항(더 작은 패딩 등)이 추가될 때 혼동을 줄 수 있습니다.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/shared/ui/chip/Chip.tsx` around lines 13 - 16, The Chip size variants
currently use the same padding for both default and sm, so the visible size
difference in Chip.tsx is only the text style. Review the size variant
definitions in Chip and decide whether sm should have smaller spacing; if so,
update the variant classes so default and sm differ in padding as well as
typography, and keep the sizing tokens consistent across the component.
src/shared/ui/checkbox/Checkbox.tsx (1)

15-15: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

name, value 등 폼 관련 prop 전달 확인

CheckboxPrimitive.Root를 그대로 spread하므로 name, value, required 등의 폼 관련 prop은 이미 전파됩니다. 특별한 이슈는 없으나, 컴포넌트 JSDoc(6~14번째 줄)에 폼 통합 관련 prop 설명이 없어 사용자가 놓치기 쉽습니다.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/shared/ui/checkbox/Checkbox.tsx` at line 15, The Checkbox component
already forwards form-related props through CheckboxPrimitive.Root, but its
JSDoc does not document that behavior. Update the documentation for Checkbox and
its prop description so users can see that name, value, required, and similar
form integration props are supported and passed through, and keep the guidance
aligned with the CheckboxPrimitive.Root spread in Checkbox.tsx.
src/shared/ui/tooltip/Tooltip.tsx (1)

19-21: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

HelpTooltip 트리거 버튼에 접근 가능한 이름이 없습니다.

CircleQuestionMark 아이콘만 표시되고 텍스트 대체(aria-label 등)가 없어, 스크린리더 사용자는 이 버튼의 목적을 알 수 없습니다.

🛠️ 제안 수정
-        <button type="button" data-slot="tooltip-trigger" className="text-icon-gray-light hover:bg-element-gray-light rounded-full p-1.5">
+        <button
+          type="button"
+          aria-label="도움말"
+          data-slot="tooltip-trigger"
+          className="text-icon-gray-light hover:bg-element-gray-light rounded-full p-1.5"
+        >
           <CircleQuestionMark size={12} />
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/shared/ui/tooltip/Tooltip.tsx` around lines 19 - 21, The HelpTooltip
trigger button in Tooltip lacks an accessible name, so add a screen-reader label
to the button using its existing tooltip-trigger element and CircleQuestionMark
icon. Update the Tooltip component’s trigger button to expose a clear purpose
with an aria-label (or equivalent accessible text) that describes the help
action, while keeping the visual icon unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/shared/ui/checkbox/Checkbox.tsx`:
- Around line 19-32: The checked-state styles in Checkbox are using a
non-existent variant, so they never apply. Update the className in Checkbox.tsx
to use an existing checked selector such as data-[state=checked]:... or add the
missing data-checked custom variant in the global styles, and make sure the
checked styling is aligned with the Checkbox component’s actual state source.

In `@src/shared/ui/tooltip/Tooltip.tsx`:
- Around line 86-96: Update Tooltip.Content styling in Tooltip to use the actual
Radix state attributes exposed by the component: replace the non-matching
data-open and data-closed animation selectors with data-[state=closed], and add
data-[state=instant-open] so immediate openings also animate. Keep the existing
delayed-open behavior and make the change in the className block inside
Tooltip.Content.

---

Nitpick comments:
In `@src/shared/ui/checkbox/Checkbox.tsx`:
- Line 15: The Checkbox component already forwards form-related props through
CheckboxPrimitive.Root, but its JSDoc does not document that behavior. Update
the documentation for Checkbox and its prop description so users can see that
name, value, required, and similar form integration props are supported and
passed through, and keep the guidance aligned with the CheckboxPrimitive.Root
spread in Checkbox.tsx.

In `@src/shared/ui/chip/Chip.tsx`:
- Around line 13-16: The Chip size variants currently use the same padding for
both default and sm, so the visible size difference in Chip.tsx is only the text
style. Review the size variant definitions in Chip and decide whether sm should
have smaller spacing; if so, update the variant classes so default and sm differ
in padding as well as typography, and keep the sizing tokens consistent across
the component.

In `@src/shared/ui/tooltip/Tooltip.tsx`:
- Around line 19-21: The HelpTooltip trigger button in Tooltip lacks an
accessible name, so add a screen-reader label to the button using its existing
tooltip-trigger element and CircleQuestionMark icon. Update the Tooltip
component’s trigger button to expose a clear purpose with an aria-label (or
equivalent accessible text) that describes the help action, while keeping the
visual icon unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3cfe4d3b-442d-41f2-b3b5-84d36bef8654

📥 Commits

Reviewing files that changed from the base of the PR and between 90801af and d2b8c61.

📒 Files selected for processing (11)
  • src/app/provider/index.tsx
  • src/app/style/globals.css
  • src/shared/ui/checkbox/Checkbox.stories.tsx
  • src/shared/ui/checkbox/Checkbox.tsx
  • src/shared/ui/checkbox/index.ts
  • src/shared/ui/chip/Chip.stories.tsx
  • src/shared/ui/chip/Chip.tsx
  • src/shared/ui/chip/index.ts
  • src/shared/ui/tooltip/Tooltip.stories.tsx
  • src/shared/ui/tooltip/Tooltip.tsx
  • src/shared/ui/tooltip/index.ts

Comment on lines +19 to +32
className={cn(
// Base
'peer border-border-subtle text-icon-gray-lighter relative flex size-4 shrink-0 items-center justify-center rounded-xs border transition-colors outline-none',
'after:absolute after:-inset-x-3 after:-inset-y-2',
// checked
'data-checked:border-border-primary data-checked:bg-element-primary data-checked:text-icon-inverse',
// focus
'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3',
// invalid
'aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary aria-invalid:ring-3',
// disabled
'group-has-disabled/field:opacity-50 disabled:cursor-not-allowed disabled:opacity-50',
className
)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check whether a custom Tailwind variant for data-checked is defined
rg -n "data-checked" src/app/style/globals.css
rg -n "custom-variant" src/app/style/globals.css

Repository: YAPP-Github/28th-Web-Team-1-FE

Length of output: 208


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## Checkbox component\n'
sed -n '1,120p' src/shared/ui/checkbox/Checkbox.tsx

printf '\n## Tailwind/globals references\n'
rg -n "data-checked|data-\\[state=checked\\]|`@custom-variant`|CheckboxPrimitive|aria-checked" src . -g '!node_modules' -g '!dist' -g '!build' || true

printf '\n## Tailwind package/version hints\n'
rg -n "\"tailwindcss\"|`@tailwindcss`|tailwindcss" package.json pnpm-lock.yaml yarn.lock package-lock.json . -g '!node_modules' -g '!dist' -g '!build' || true

Repository: YAPP-Github/28th-Web-Team-1-FE

Length of output: 13708


data-checked:는 현재 정의돼 있지 않습니다
src/app/style/globals.css에는 @custom-variant data-checked (...)가 없어서 이 스타일은 체크 상태에 적용되지 않습니다. data-[state=checked]:...로 바꾸거나 data-checked variant를 추가해야 합니다.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/shared/ui/checkbox/Checkbox.tsx` around lines 19 - 32, The checked-state
styles in Checkbox are using a non-existent variant, so they never apply. Update
the className in Checkbox.tsx to use an existing checked selector such as
data-[state=checked]:... or add the missing data-checked custom variant in the
global styles, and make sure the checked styling is aligned with the Checkbox
component’s actual state source.

Comment on lines +86 to +96
className={cn(
// 기본 레이아웃 및 색상
'bg-black-75 text-text-bolder-inverse text-caption1 z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-sm p-2',
// 열림/닫힘 애니메이션
'data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',
// 방향별 슬라이드 모션
'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
// kbd 조합 시 스타일
'has-data-[slot=kbd]:pr-1.5 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm',
className
)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate the tooltip component and relevant Radix usage.
git ls-files | rg '^src/shared/ui/tooltip/Tooltip\.tsx$|^package\.json$|^pnpm-lock\.yaml$|^yarn\.lock$|^package-lock\.json$'

echo '--- Tooltip.tsx outline ---'
ast-grep outline src/shared/ui/tooltip/Tooltip.tsx --view expanded || true

echo '--- Tooltip.tsx relevant lines ---'
nl -ba src/shared/ui/tooltip/Tooltip.tsx | sed -n '1,220p'

echo '--- Search for data-open/data-closed usage in repo ---'
rg -n --hidden --glob '!**/node_modules/**' 'data-(open|closed):|data-\[state=closed\]|data-\[state=delayed-open\]|Tooltip\.Content|TooltipContent' src package.json . || true

echo '--- Radix tooltip dependency versions ---'
python3 - <<'PY'
import json, pathlib
for p in ['package.json','pnpm-lock.yaml','yarn.lock','package-lock.json']:
    path = pathlib.Path(p)
    if path.exists() and p == 'package.json':
        data=json.loads(path.read_text())
        deps={**data.get('dependencies',{}), **data.get('devDependencies',{}), **data.get('peerDependencies',{})}
        for k,v in deps.items():
            if '`@radix-ui/react-tooltip`' in k or 'tailwindcss' in k:
                print(p, k, v)
PY

Repository: YAPP-Github/28th-Web-Team-1-FE

Length of output: 896


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect package metadata for Radix tooltip if present.
python3 - <<'PY'
import json, pathlib
path = pathlib.Path('package.json')
if path.exists():
    data = json.loads(path.read_text())
    for section in ['dependencies', 'devDependencies', 'peerDependencies', 'resolutions', 'overrides']:
        items = data.get(section, {})
        for k, v in items.items():
            if 'radix-ui/react-tooltip' in k or 'tailwindcss' in k:
                print(section, k, v)
PY

# Show any imported Radix tooltip symbols in the component file.
rg -n 'radix-ui/react-tooltip|Tooltip' src/shared/ui/tooltip/Tooltip.tsx

Repository: YAPP-Github/28th-Web-Team-1-FE

Length of output: 2403


🌐 Web query:

Radix UI Tooltip.Content data-state delayed-open instant-open closed data-open data-closed documentation

💡 Result:

In Radix UI, the Tooltip.Content component utilizes a data-state attribute to expose its current visibility and transition status for styling purposes [1][2]. The possible values for data-state are "closed", "delayed-open", and "instant-open" [1][2]. Data-State Values: 1. closed: The tooltip is currently not visible [1][2]. 2. delayed-open: The tooltip is open after the configured delay duration [1][2]. 3. instant-open: The tooltip is open immediately, typically triggered by keyboard interaction or after a preceding tooltip has already opened [1][3][2]. Styling Usage: You can target these states in your CSS or styling framework to apply transitions, animations, or other visual changes [1][3]. Because these attributes exist on the Tooltip.Content element at runtime, they are ideal for defining entry and exit animations [3][2]. Example CSS targeting these states:.TooltipContent[data-state='delayed-open'],.TooltipContent[data-state='instant-open'] { animation: fadeIn 200ms ease; }.TooltipContent[data-state='closed'] { animation: fadeOut 200ms ease; } Note: Radix UI does not use separate attributes like data-open or data-closed; the data-state attribute is the standard implementation across their primitives for representing these conditions [4][5]. When styling, you can also combine data-state with other exposed attributes like data-side (top, right, bottom, left) and data-align (start, center, end) to create complex, collision-aware animations [1][3][2].

Citations:


data-[state=closed]로 바꾸고 instant-open도 포함하세요

Tooltip.Content는 closed | delayed-open | instant-open만 노출하므로 data-open/data-closed는 매칭되지 않습니다. 닫힘 애니메이션은 data-[state=closed]로 옮기고, 즉시 열림 상태도 애니메이션하려면 data-[state=instant-open]을 함께 추가하세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/shared/ui/tooltip/Tooltip.tsx` around lines 86 - 96, Update
Tooltip.Content styling in Tooltip to use the actual Radix state attributes
exposed by the component: replace the non-matching data-open and data-closed
animation selectors with data-[state=closed], and add data-[state=instant-open]
so immediate openings also animate. Keep the existing delayed-open behavior and
make the change in the className block inside Tooltip.Content.

@leeleeleeleejun leeleeleeleejun 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.

👍🏻👍🏻

@optshj
optshj merged commit ded7a1f into dev Jul 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 기능 구현

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Tooltip, CheckBox, Chip 컴포넌트 추가

2 participants