Skip to content

[FEAT] AddTaskButton 컴포넌트 구현#72

Merged
kimminna merged 12 commits into
developfrom
feat/ui/71-add-task-button
Jul 2, 2026
Merged

[FEAT] AddTaskButton 컴포넌트 구현#72
kimminna merged 12 commits into
developfrom
feat/ui/71-add-task-button

Conversation

@kimminna

@kimminna kimminna commented Jul 1, 2026

Copy link
Copy Markdown
Member

ISSUE 🔗

close #71



What is this PR? 🔍

할 일 추가 버튼(AddTaskButton) 컴포넌트를 디자인 시스템에 추가하고, 클릭 가능한 button 요소 전반에 cursor: pointer 스타일을 적용했습니다.

배경

  • 기존 구조: 디자인 시스템에는 Tag, PriorityIcon 등 기본 요소 위주의 컴포넌트만 있었고, 할 일 추가 액션을 위한 전용 버튼 컴포넌트가 없었습니다.
  • 발생 문제: 페이지마다 버튼 스타일을 개별 구현해야 했고, 브라우저 기본 button의 cursor가 default로 렌더링되어 클릭 가능 영역이 시각적으로 드러나지 않았습니다.
  • 해결 방향: variant 기반 AddTaskButton 컴포넌트를 디자인 시스템에 추가하고, 전역 base 레이어에 button cursor 규칙을 추가했습니다.

AddTaskButton 컴포넌트

  • 변경 요약: default / weekly / big 3가지 variant를 지원하는 AddTaskButton 컴포넌트와 Storybook 스토리를 추가했습니다.
  • 이유: 페이지마다(오늘 할 일, 주간 뷰 등) 크기와 텍스트 overflow 처리 방식이 달라 하나의 컴포넌트에서 variant 분기가 필요했습니다.
  • 구현 방식: ADD_TASK_BUTTON_VARIANT 맵으로 variant별 너비/타이포그래피 클래스를 관리하고, weekly variant에서는 text-ellipsis + flex-1로 좁은 너비에서도 텍스트가 잘리도록 처리했습니다. PlusIcon은 기존 아이콘 생성 파이프라인(source/plus.svggenerated/Plus.tsx)을 통해 추가했습니다.
  • 경계 · 제약: onClick은 옵셔널 prop으로만 노출하고 내부 상태는 갖지 않아, 실제 할 일 추가 로직은 호출 측(app)에서 주입하는 구조로 남겨뒀습니다.

전역 button 스타일

  • 변경 요약: apps/timo-web/app/globals.css@layer basebutton { cursor: pointer }, button:disabled { cursor: not-allowed; } 규칙을 추가했습니다.
  • 이유: 브라우저 기본 button 요소는 cursor가 default로 렌더링되어 클릭 가능 여부가 시각적으로 드러나지 않았습니다.
  • 구현 방식: 디자인 시스템 패키지의 src/styles/globals.csspackage.jsonexports["./styles"]components.css를 가리키고 있어 실제로는 웹앱 빌드 체인에 연결되지 않는 것을 확인했습니다. 이에 따라 디자인 시스템 쪽 대신 apps/timo-web/app/globals.css에 직접 규칙을 추가했습니다.
  • 경계 · 제약: 디자인 시스템 패키지 자체의 globals.css(Storybook 전용)는 이번 변경 범위에서 제외했습니다. exports 매핑 자체를 정리하는 작업은 후속 과제로 남겨뒀습니다.

Tag 컴포넌트

  • 변경 요약: Tag.tsx에 가독성을 위한 빈 줄을 추가했습니다.
  • 이유: 로직 블록 간 구분이 없어 가독성이 떨어졌습니다.
  • 구현 방식: isBlue 변수 선언과 return문 사이에 빈 줄을 추가했습니다.



To Reviewers

디자인 시스템 패키지의 globals.cssexports 매핑 문제로 실제 웹앱에는 적용되지 않는 구조적 이슈를 발견해, 이번 PR에서는 근본 원인(exports 매핑)을 고치는 대신 apps/timo-web 쪽에 직접 스타일을 추가하는 방향으로 처리했습니다. 이 판단이 맞는지, 아니면 exports 매핑을 함께 정리하는 것이 나을지 확인 부탁드립니다.



Screenshot 📷

image image image



Test Checklist ✔

  • pnpm lint 통과 (전체 모노레포)
  • pnpm check-types 통과 (전체 모노레포)
  • AddTaskButton Storybook 렌더링 확인 — 미실행
  • 웹앱에서 버튼 cursor pointer 동작 확인 — 미실행

kimminna added 3 commits July 2, 2026 02:12
- 할 일 추가 버튼(default/weekly/big variant) 컴포넌트와 스토리를 추가했습니다
- index.ts에 AddTaskButton export를 추가했습니다
- plus 아이콘 소스가 추가되어 더 이상 필요 없는 icons/.gitkeep을 삭제했습니다
- 클릭 가능함을 시각적으로 나타내기 위해 button 요소에 cursor: pointer 스타일을 추가했습니다
- 가독성을 위해 빈 줄을 추가했습니다
@vercel

vercel Bot commented Jul 1, 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 2, 2026 3:32pm

@github-actions github-actions Bot added ⏰ Timo-web Timo 웹 서비스 ⌚ Timo-Design-system Timo 디자인 시스템 labels Jul 1, 2026
@github-actions github-actions Bot added ✨ Feature 새로운 기능(기능성) 구현 ♦️ 민아 민아상 labels Jul 1, 2026
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

디자인 시스템에 AddTaskButton과 스토리를 추가하고, 외부 export와 전역 버튼 커서 스타일을 연결했습니다. Tag.tsx는 공백만 조정됐습니다. 짧지만 길을 잘 닦은 변경입니다.

Changes

AddTaskButton 기능 추가

Layer / File(s) Summary
AddTaskButton 컴포넌트 구현
packages/timo-design-system/src/components/button/add-task-button/AddTaskButton.tsx
AddTaskButtonVariant 타입, variant별 클래스 매핑, 선택형 props, 기본 variant, PlusIcon 렌더링과 weekly variant의 텍스트 처리 로직을 추가했습니다.
컴포넌트 export 및 Storybook 등록
packages/timo-design-system/src/components/index.ts, packages/timo-design-system/src/components/button/add-task-button/AddTaskButton.stories.tsx
AddTaskButton을 components 인덱스에 export하고, Default/Weekly/Big 스토리를 argTypes와 함께 추가했습니다.
전역 button 커서 스타일
apps/timo-web/app/globals.css
@layer basebutton { cursor: pointer }button:disabled { cursor: not-allowed }를 추가했습니다.

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

Possibly related PRs

  • Team-Timo/Timo-client#43: 컴포넌트 공개 export 구조를 정리하는 흐름이 components/index.ts 변경과 직접 맞닿아 있습니다.
  • Team-Timo/Timo-client#68: 아이콘 추가/노출과 PlusIcon 사용이 같은 디자인 시스템 경로를 공유합니다.

Suggested reviewers: ehye1, yumin-kim2

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning components/index.ts의 CreateButton export 삭제와 재export 경로 변경은 AddTaskButton 요구사항 밖의 변경입니다. AddTaskButton 관련 export만 추가하고, 기존 CreateButton export와 경로 변경은 별도 목적이 있을 때만 유지하세요.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 AddTaskButton 컴포넌트 구현이라는 핵심 변경을 정확히 요약합니다.
Description check ✅ Passed 설명이 AddTaskButton 추가와 전역 button cursor 스타일이라는 실제 변경과 잘 맞습니다.
Linked Issues check ✅ Passed AddTaskButton, 스토리, components/index export, 전역 button cursor 스타일이 반영되어 핵심 요구사항을 충족합니다.
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/71-add-task-button

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

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Storybook Preview

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

마지막 업데이트: 2026-07-02 15:32 UTC

@github-actions

github-actions Bot commented Jul 1, 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/ 디렉토리에 이미지가 없습니다.

측정 커밋: 654097d

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

🤖 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 `@apps/timo-web/app/globals.css`:
- Around line 5-9: The global `button` cursor rule in `globals.css` applies
`cursor: pointer` to disabled buttons as well, which can mislead users. Update
the `@layer base` button styling so the `button` selector still uses pointer for
normal buttons, but add a more specific `button:disabled` rule to override it
with `cursor: not-allowed` or `default`, keeping the UX consistent.

In
`@packages/timo-design-system/src/components/button/add-task-button/AddTaskButton.tsx`:
- Around line 1-2: The AddTaskButton.tsx imports are using deep relative paths,
which violates the project’s import convention. Update the imports in
AddTaskButton to use the configured absolute path aliases from tsconfig paths
instead of ../../../icons and ../../../lib, and keep the same symbols PlusIcon
and cn referenced from those alias-based modules.
- Line 4: Rename the literal union type alias `AddTaskButtonVariant` to follow
the `Types` suffix convention, and update every reference that reuses it,
including `AddTaskButton.stories.tsx` and `index.ts`. Make sure the exported
symbol name stays consistent across the component file and all imports/exports
so consumers still compile after the rename.
- Line 19: The AddTaskButton component currently hardcodes domain-specific
Korean copy in its default text value, which violates the design-system rule for
generic UI only. Update AddTaskButton so text is required or provided from the
consuming app instead of defaulting inside the component, and keep any
locale-specific copy out of this package. Use the AddTaskButton prop definition
and its default parameter/initialization as the place to adjust.
- Around line 38-47: The text span in AddTaskButton is using a manual truncation
class combination that can be simplified. Update the cn call inside
AddTaskButton to replace the whitespace-nowrap/overflow-hidden/text-ellipsis
trio with Tailwind’s truncate utility for the weekly state, keeping the existing
min-w-0 and flex-1 behavior intact and preserving the non-weekly shrink-0
branch.
🪄 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: 89d05969-1d7d-4230-88f0-3437cdc1a7f2

📥 Commits

Reviewing files that changed from the base of the PR and between 77265c7 and 23adee9.

📒 Files selected for processing (6)
  • apps/timo-web/app/globals.css
  • packages/timo-design-system/src/components/button/add-task-button/AddTaskButton.stories.tsx
  • packages/timo-design-system/src/components/button/add-task-button/AddTaskButton.tsx
  • packages/timo-design-system/src/components/index.ts
  • packages/timo-design-system/src/components/tag/Tag.tsx
  • packages/timo-design-system/src/icons/.gitkeep

Comment thread apps/timo-web/app/globals.css
kimminna added 2 commits July 2, 2026 02:20
- 상대 경로(../../../icons, ./AddTaskButton) import를 @iCons, @lib, @components alias로 변경했습니다
kimminna added 3 commits July 2, 2026 02:29
- whitespace-nowrap/overflow-hidden/text-ellipsis 조합을 weekly variant에서 Tailwind truncate 유틸리티로 단순화했습니다
- 디자인 시스템에 도메인 특정 한국어 카피를 두지 않도록 text의 기본값을 제거하고 필수 prop으로 변경했습니다
- 타입을 맞추기 위해 Storybook 스토리 3곳에 text 값을 명시적으로 추가했습니다
- button:disabled에 cursor: not-allowed를 추가해 비활성화된 버튼이 pointer 커서로 표시되지 않도록 수정했습니다

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

굿굿 깔끔하게 잘 작성해주셨네요!!
수고하셨습니당🫰🏻

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.

굿굿!!👍🏻👍🏻

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.

굿굿 👍 👍

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.

굿굿👍♦️

@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/index.ts`:
- Line 6: The public barrel in AddTaskButton is exposing a domain-specific
component from the design system, which breaks the package boundary. Remove
AddTaskButton from the timo-design-system export surface in the index barrel and
move it to an app-specific layer, or refactor it into a truly generic component
with domain text and behavior removed. Keep the design-system exports limited to
reusable UI primitives only, and use the AddTaskButton symbol to locate the
affected re-export.
🪄 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: e1e1d755-fe45-475d-a1ff-a42bf286c673

📥 Commits

Reviewing files that changed from the base of the PR and between c1310db and 405e068.

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

Comment thread packages/timo-design-system/src/components/index.ts Outdated

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

button 기본 커서를 전역 base 레이어에서 설정해서 매 컴포넌트마다 cursor-pointer를 붙이지 않아도 되니 일관성 있게 관리될 것 같습니다-!
고생하셨습니당~

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.

굿굿 👍 👍

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

exports 매핑 문제 때문에 디자인 시스템의 globals.css가 실제로는 적용되지 않고 있었다는 걸 발견하신 게 최고십니다....꼼꼼히 확인해보지 않으면 놓치기 쉬운 부분이잖아요👍 수고하셨씁니다~~!

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.

굿굿👍♦️

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/timo-design-system/src/components/index.ts (1)

1-8: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

export 경로 스타일이 파일 안에서 섞여 있어요.

16번째 줄은 상대 경로(./...)를 쓰는데, 새로 추가된 78번째 줄은 @components/... 절대 별칭을 사용합니다. 같은 barrel 파일 안에서 두 스타일이 공존하면 나중에 리팩터링 시 혼란을 줄 수 있으니, 한쪽으로 통일하는 게 좋겠습니다.

♻️ 제안: 상대 경로로 통일 (기존 컨벤션 유지)
-export { TodayBadge } from "`@components/badge/today-badge/TodayBadge`";
-export { PlayButton } from "`@components/button/play-button/PlayButton`";
+export { TodayBadge } from "./badge/today-badge/TodayBadge";
+export { PlayButton } from "./button/play-button/PlayButton";

경로 일관성 하나만 맞춰도 유지보수성이 확 살아날 거예요, 이건 거의 공짜 리팩터라 안 할 이유가 없죠!

🤖 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 `@packages/timo-design-system/src/components/index.ts` around lines 1 - 8, The
exports in components/index.ts mix relative paths and `@components` alias paths,
so standardize them to one convention. Update the newly added TodayBadge and
PlayButton re-exports to match the existing barrel style used by Checkbox,
Color, Typography, Tag, PriorityIcon, and AddTaskButton, keeping the file
consistent and easier to maintain.
🤖 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.

Outside diff comments:
In `@packages/timo-design-system/src/components/index.ts`:
- Around line 1-8: The exports in components/index.ts mix relative paths and
`@components` alias paths, so standardize them to one convention. Update the newly
added TodayBadge and PlayButton re-exports to match the existing barrel style
used by Checkbox, Color, Typography, Tag, PriorityIcon, and AddTaskButton,
keeping the file consistent and easier to maintain.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8464f012-7f04-487c-bdac-c57cb72278f7

📥 Commits

Reviewing files that changed from the base of the PR and between 405e068 and 8d991ef.

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

kimminna added 2 commits July 3, 2026 00:30
- 모든 export 경로를 상대 경로에서 @components 절대 경로로 통일했습니다
- react-component 제너레이터가 index.ts에 절대 경로 import를 자동 생성하도록 수정했습니다
@kimminna kimminna merged commit 094d028 into develop Jul 2, 2026
12 checks passed
@kimminna kimminna deleted the feat/ui/71-add-task-button branch July 2, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 새로운 기능(기능성) 구현 ⌚ Timo-Design-system Timo 디자인 시스템 ⏰ Timo-web Timo 웹 서비스 ♦️ 민아 민아상

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] AddTaskButton 컴포넌트 구현

4 participants