Skip to content

[FEAT] DeleteButton 컴포넌트 추가 - #80

Merged
jjangminii merged 5 commits into
developfrom
feat/ui/77-delete-button
Jul 5, 2026
Merged

[FEAT] DeleteButton 컴포넌트 추가#80
jjangminii merged 5 commits into
developfrom
feat/ui/77-delete-button

Conversation

@jjangminii

@jjangminii jjangminii commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

ISSUE 🔗

close #77



What is this PR? 🔍

트래시 아이콘과 "삭제하기" 텍스트로 구성된 DeleteButton 컴포넌트를 디자인 시스템에 추가했습니다.

배경

  • 기존 구조: 디자인 시스템에 삭제 동작을 위한 전용 버튼이 없었습니다.
  • 발생 문제: 피그마 스펙(W Hug 80px, H Hug 33px, 패딩 6px, 아이콘-텍스트 gap 2px, 폰트 headline-r-14)을 그대로 구현했을 때, hug(w-fit) 방식으로는 브라우저에서 실제 렌더링된 너비가 78.72px로 나와 Figma가 보여주는 80px과 차이가 났습니다.
  • 해결 방향: hug 대신 Figma가 최종적으로 계산한 값(80×33)을 고정 크기로 박아, 렌더러 간 텍스트 측정 방식 차이와 무관하게 디자인 스펙과 정확히 일치하도록 했습니다.

DeleteButton 컴포넌트

  • 변경 요약: onClick만 받는 단순한 컴포넌트로 구현했습니다. 기본 상태는 흰 배경 + 검은 아이콘/텍스트, :active(누르고 있는 동안)에는 파란 배경(timo-blue-300) + 흰 아이콘/텍스트로 전환됩니다.
  • 이유: "클릭했을 때" 파란 상태는 클릭을 확정하는 별도 모드가 아니라 누르는 순간에만 보이는 시각 피드백이라, 별도 prop 없이 CSS :active 의사 클래스로 처리하는 게 더 단순합니다.
  • 구현 방식: 크기는 h-8.25 w-20(33×80px)로 고정하고, 내부는 flex items-center gap-0.5 p-1.5로 아이콘·텍스트를 배치합니다. TrashOnIcon은 SVG 내부 fillcurrentColor가 아니라 #3F3F3F로 고정돼 있어서, 텍스트 색상 클래스만으로는 :active 시 흰색으로 바뀌지 않습니다. 그래서 active:[&_path]:fill-white 임의 선택자로 버튼이 active 상태일 때 아이콘 내부 path의 fill을 직접 덮어썼습니다.
  • 경계 · 제약: 아이콘 SVG가 currentColor를 쓰지 않는 문제는 이 컴포넌트에서 임시로 우회했을 뿐이라, 다른 컴포넌트에서도 아이콘 색상을 상태별로 바꿔야 한다면 SVGR 설정에서 fill="currentColor"로 통일하는 방향을 별도로 검토할 필요가 있습니다.



To Reviewers

active:[&_path]:fill-white 처럼 SVG 내부 요소를 Tailwind 임의 선택자로 직접 건드리는 방식이 이 정도 스코프에서 적절한지 봐주세요. 아이콘을 currentColor 기반으로 통일하는 큰 리팩터링은 이번 PR 범위 밖입니다.

같은 브랜치 작업 중 발견한 Scrollbar.stories.tsx의 임의값 클래스(w-[340px] 등)를 Tailwind 스케일 값으로 바꾸는 커밋(1d8bbbe)도 함께 포함되어 있는데, DeleteButton과는 무관한 별도 스타일 정리라 커밋을 분리해뒀습니다.

Screenshot 📷

2026-07-02.4.54.09.mov



Test Checklist ✔

  • pnpm --filter @repo/timo-design-system check-types 통과
  • pnpm --filter @repo/timo-design-system lint 통과
  • pnpm --filter @repo/timo-design-system build:storybook 실행 → 정적 빌드 성공 확인
  • 브라우저에서 :active 상태(파란 배경 전환) 실제 확인 — 미실행: 로컬 브라우저 자동화 도구 없음
  • pnpm build — 미실행: CI에서 확인 예정

- TrashOnIcon과 "삭제하기" 텍스트로 구성된 삭제 버튼 컴포넌트를 추가했습니다
- 기본은 흰 배경, active(누르는 동안)에는 파란 배경/흰 아이콘·텍스트로 전환됩니다
- Figma 스펙(80x33)에 맞춰 고정 크기로 구현했습니다
- w-[340px], h-[200px] 등 임의값 클래스를 w-80, h-50 등 Tailwind 스케일 값으로 변경했습니다
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
timo Ready Ready Preview, Comment Jul 4, 2026 5:39pm

@github-actions github-actions Bot added the ⌚ Timo-Design-system Timo 디자인 시스템 label Jul 2, 2026
@github-actions github-actions Bot added ✨ Feature 새로운 기능(기능성) 구현 ♠️ 정민 정민양 labels Jul 2, 2026
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jjangminii, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 13 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: eaebd55a-e5c1-44b3-8493-6981926a9c63

📥 Commits

Reviewing files that changed from the base of the PR and between 11b460a and 6ed1bae.

📒 Files selected for processing (1)
  • packages/timo-design-system/src/components/index.ts

Walkthrough

DeleteButton 컴포넌트와 Storybook 스토리가 추가되고, components/index.ts에 export가 연결되었습니다. Scrollbar.stories.tsx에서는 일부 크기 클래스가 Tailwind 스케일 기반 값으로 변경되었습니다.

Changes

DeleteButton 컴포넌트 구현

Layer / File(s) Summary
DeleteButton 컴포넌트 및 export
packages/timo-design-system/src/components/button/delete-button/DeleteButton.tsx, packages/timo-design-system/src/components/index.ts
onClick prop을 받는 DeleteButtonPropsTrashOnIcon을 표시하는 DeleteButton 컴포넌트가 추가되고, cn으로 조합된 클래스가 active: 상태에서 색상/아이콘 fill을 변경합니다. components/index.ts에서 DeleteButton이 re-export됩니다.
DeleteButton Storybook 스토리
packages/timo-design-system/src/components/button/delete-button/DeleteButton.stories.tsx
centered 레이아웃과 배경색 옵션을 가진 메타, 더미 onClick을 사용하는 Default 스토리가 추가되었습니다.

Scrollbar 스토리 클래스 조정

Layer / File(s) Summary
스크롤 영역 크기 클래스 변경
packages/timo-design-system/src/components/layout/scrollbar/Scrollbar.stories.tsx
세로/가로 스크롤 프리뷰의 컨테이너 및 아이템 크기가 arbitrary 값(w-[340px] 등)에서 Tailwind 스케일 클래스(w-80 등)로 변경되었습니다.

Estimated code review effort: 2 (Simple) | ~10분

Sequence Diagram(s)

sequenceDiagram
  participant Consumer
  participant DeleteButton
  participant TrashOnIcon
  Consumer->>DeleteButton: onClick prop 전달
  DeleteButton->>TrashOnIcon: 아이콘 렌더링
  Consumer->>DeleteButton: 클릭 이벤트 발생
  DeleteButton-->>Consumer: onClick 실행
Loading

Suggested reviewers: yumin-kim2, ehye1

공식 문서: Storybook Args/CSF, React button 타입, Tailwind arbitrary values 참고가 도움이 됩니다.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Scrollbar.stories.tsx의 Tailwind 클래스 정리는 DeleteButton 목적과 무관한 별도 변경입니다. DeleteButton 관련 변경만 남기고, Scrollbar 스토리 수정은 별도 PR로 분리하세요.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 DeleteButton 추가라는 핵심 변경을 간결하게 잘 담고 있습니다.
Description check ✅ Passed 설명이 DeleteButton 추가와 배경, 구현 방향을 잘 다뤄 변경 내용과 일치합니다.
Linked Issues check ✅ Passed 주요 요구사항인 DeleteButton 구현, 스토리, export 추가를 충족합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ui/77-delete-button

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 2, 2026

Copy link
Copy Markdown

Storybook Preview

항목 링크
Storybook 열기
Chromatic 빌드 확인

마지막 업데이트: 2026-07-04 17:40 UTC

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Timo Performance Report

Bundle Size — timo-web
라우트 크기 First Load JS
/ 0 B 🟡 205.49 kB
/focus 0 B 🟡 205.49 kB
/home 0 B 🟡 205.49 kB
/login 0 B 🟡 205.49 kB
/onboarding 0 B 🟡 205.49 kB
/settings 0 B 🟡 205.49 kB
/settings/account 0 B 🟡 205.49 kB
/settings/policy 0 B 🟡 205.49 kB
/statistics 0 B 🟡 205.49 kB
/today 0 B 🟡 205.49 kB

공유 번들: 205.49 kB
🟢 < 200kB  |  🟡 < 350kB  |  🔴 ≥ 350kB (First Load JS · gzip)

Lighthouse — timo-web

⚠️ Lighthouse 결과를 가져오지 못했습니다.

Image Optimization — timo-web

public/ 디렉토리에 이미지가 없습니다.

측정 커밋: fafec58

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

🤖 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
`@packages/timo-design-system/src/components/button/delete-button/DeleteButton.tsx`:
- Around line 4-6: DeleteButtonProps currently only exposes onClick, but the
requested API also needs disabled for proper button state control. Update
DeleteButtonProps in DeleteButton to include a disabled prop, and make sure the
DeleteButton component forwards it to the underlying button element and handles
the disabled styling/accessibility consistently. Use DeleteButtonProps and
DeleteButton as the symbols to locate and update the prop contract.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5819e34e-b7a9-414d-bf91-09dfc0df7c0d

📥 Commits

Reviewing files that changed from the base of the PR and between 293536e and 1d8bbbe.

📒 Files selected for processing (4)
  • packages/timo-design-system/src/components/button/delete-button/DeleteButton.stories.tsx
  • packages/timo-design-system/src/components/button/delete-button/DeleteButton.tsx
  • packages/timo-design-system/src/components/index.ts
  • packages/timo-design-system/src/components/layout/scrollbar/Scrollbar.stories.tsx

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

미리 승인하겠습니다-!! 간단한 경로 수정만 확인해 주세염

…n/DeleteButton.stories.tsx

Co-authored-by: 김민아 <kmina121777@naver.com>
- ./DeleteButton 상대경로를 @components/button/delete-button/DeleteButton alias로 변경했습니다
…button

# Conflicts:
#	packages/timo-design-system/src/components/index.ts

@yumin-kim2 yumin-kim2 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.

피그마와 브라우저 렌더링 오차 원인을 짚어서 고정 크기로 해결하신 판단이 좋았습니당👍
그리고 정민님 코드를 통해 [&_path]:fill-white로 SVG 내부까지 직접 스타일링할 수 있다는 걸 알게되었네요.! 수고하셨습니다아~~

@jjangminii
jjangminii merged commit beb1d3f into develop Jul 5, 2026
12 of 13 checks passed
@jjangminii
jjangminii deleted the feat/ui/77-delete-button branch July 5, 2026 03:44
@kimminna kimminna mentioned this pull request Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 새로운 기능(기능성) 구현 ⌚ Timo-Design-system Timo 디자인 시스템 ♠️ 정민 정민양

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 삭제하기 버튼(DeleteButton) 컴포넌트 구현

3 participants