Skip to content

[Feature/#252] 타임라인 본체 UI 컴포넌트 및 Storybook 구현#253

Merged
jjjsun merged 2 commits into
developfrom
feature/#252
Jun 25, 2026
Merged

[Feature/#252] 타임라인 본체 UI 컴포넌트 및 Storybook 구현#253
jjjsun merged 2 commits into
developfrom
feature/#252

Conversation

@jjjsun

@jjjsun jjjsun commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

🚨 관련 이슈

Closed #252

✨ 변경사항

  • 🐞 BugFix Something isn't working
  • 💻 CrossBrowsing Browser compatibility
  • 🌏 Deploy Deploy
  • 🎨 Design Markup & styling
  • 📃 Docs Documentation writing and editing (README.md, etc.)
  • ✨ Feature Feature
  • 🔨 Refactor Code refactoring
  • ⚙️ Setting Development environment setup
  • ✅ Test Test related (storybook, jest, etc.)

✏️ 작업 내용

성과 타임라인 화면의 본체 UI (날짜 축/그리드/캠페인 바)를 구현했습니다.
기간 선택, 상단 툴바, API연동, 페이지조립은 이번 작업범위에서 제외하고, Storybook과 mock데이터만으로 확인가능하도록 구현하였습니다.

  • 날짜축: 요일/일자 2줄로 표시했고, 오늘 날짜는 파란 동그라미로 강조 효과를 넣었습니다.
  • 그리드: 세로 구분선과 오늘 칸 배경은 하이라이트 효과 넣었고, 그리고 Axis와 구분되도록 회색 톤 배경 추가하였습니다.
  • 캠페인바: colStart/colEnd/row 기준으로 배치하였고, 제목/기간/성과상태/kebab 메뉴아이콘을 넣었습니다.
  • 성과 상태: ON_TRACK, ABOVE_AVERAGE, AT_RISK 3단계로 재정리하였고, 바 색상/라벨을 적용해두었습니다.
  • Storybook: mock 그리드 데이터로 Axis+Grid+Bar 조립해서 눈으로 검증할 수 있도록 설정하였습니다.
image

😅 미완성 작업

N/A
(후속이슈 예정: 타임라인 페이지 조립, 상단 툴바, API연동, 레이아웃)

📢 논의 사항 및 참고 사항

  • 바 색상은 플랫폼별 색상이 아니라 성과 상태를 기준으로 설정하였습니다.
  • 당일은 primary 컬러로 추가표시 해두었습니다.
  • 랜딩페이지의 GuideTimeline은 이번 PR에서 수정하지않고, 추후 이슈생성하여 진행할 예정입니다.

💬 리뷰어 가이드 (P-Rules)
P1: 필수 반영 (Critical) - 버그 가능성, 컨벤션 위반. 해결 전 머지 불가.
P2: 적극 권장 (Recommended) - 더 나은 대안 제시. 가급적 반영 권장.
P3: 제안 (Suggestion) - 아이디어 공유. 반영 여부는 드라이버 자율.
P4: 단순 확인/칭찬 (Nit) - 사소한 오타, 칭찬 등 피드백.

Summary by CodeRabbit

릴리스 노트

  • New Features
    • 타임라인 시각화 기능 추가: 축/그리드/바 컴포넌트로 캠페인 일정과 성과를 표시
    • 성과 상태별 스타일링 제공(라벨/설명/배경/포인트)
    • 일관된 레이아웃을 위한 고정 상수(축/바/행/열) 적용
  • Tests
    • Storybook에 타임라인 캔버스 프리뷰 스토리 추가
  • Chores
    • 타임라인용 공개 타입, 폼 기본값 및 목데이터 추가

@jjjsun jjjsun requested review from Seojegyeong and YermIm June 21, 2026 17:58
@jjjsun jjjsun self-assigned this Jun 21, 2026
@jjjsun jjjsun added 🎨 Html&css 마크업 & 스타일링 ✅ Test test 관련(storybook, jest...) ✨ Feature 기능 개발 labels Jun 21, 2026
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 380c6d86-5a1a-46d9-8b47-3d7fa08c06d7

📥 Commits

Reviewing files that changed from the base of the PR and between 11368dd and e2c05e5.

📒 Files selected for processing (2)
  • src/components/timeline/TimelineBar.tsx
  • src/types/timeline/timeline.mock.ts
✅ Files skipped from review due to trivial changes (1)
  • src/types/timeline/timeline.mock.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/timeline/TimelineBar.tsx

📝 Walkthrough

Walkthrough

타임라인 기능의 기반 타입(api, ui, form, summary), 레이아웃 상수, 성과 상태 스타일 상수를 새로 추가하고, 이를 기반으로 TimelineAxis, TimelineGrid, TimelineBar 세 UI 컴포넌트를 구현한다. mock 데이터 5종과 Storybook 스토리도 함께 추가된다.

Changes

Timeline Feature Foundation & UI Components

Layer / File(s) Summary
Timeline 도메인 & UI 타입 계약
src/types/timeline/api.ts, src/types/timeline/ui.ts, src/types/timeline/form.ts, src/types/timeline/summary.ts
API 응답/요청 인터페이스(ITimelineListItem, ITimelineDetail, ITimelineUpsertRequest, ITimelineMutationResponse), 성과 상태/지표/비교기간 유니온 타입, 그리드 컬럼·캠페인 바·그리드 데이터 UI 타입, 폼 입력값 타입, 요약 패널 타입이 신규 정의된다.
레이아웃 & 상태 스타일 상수
src/constants/timeline/layout.ts, src/constants/timeline/statusStyle.ts
컬럼 너비/행 높이/축 높이/바 높이 등 레이아웃 숫자 상수 5개(TIMELINE_COL_WIDTH, TIMELINE_ROW_HEIGHT, TIMELINE_ROW_OFFSET, TIMELINE_AXIS_HEIGHT, TIMELINE_BAR_HEIGHT)와, ON_TRACK/ABOVE_AVERAGE/AT_RISK 성과 상태별 Tailwind 스타일 맵이 추가된다.
TimelineAxis & TimelineGrid 컴포넌트
src/components/timeline/TimelineAxis.tsx, src/components/timeline/TimelineGrid.tsx
날짜 헤더 셀(isToday 배지형/일반, isWeekend 색상 분기)을 렌더링하는 TimelineAxis와, 절대 위치 열 레이아웃 및 children 슬롯을 제공하는 TimelineGrid가 구현된다. 두 컴포넌트 모두 twMerge로 className을 병합한다.
TimelineBar 컴포넌트
src/components/timeline/TimelineBar.tsx
colStart/colEnd/row 그리드 좌표를 픽셀 left/top/width로 변환해 절대 배치하며, TIMELINE_PERFORMANCE_STATUS_STYLE 맵에서 배경색/강조색/도트 스타일을 참조하고 kebab 메뉴 버튼(onMenuClick 콜백)을 포함한다.
Mock 데이터 & Storybook 스토리
src/types/timeline/timeline.mock.ts, src/components/timeline/TimelineCanvas.stories.tsx
목록/상세/생성 응답/그리드/요약 패널용 mock 상수 5종(TIMELINE_LIST_MOCK, TIMELINE_DETAIL_MOCK, TIMELINE_CREATE_RESPONSE_MOCK, TIMELINE_GRID_MOCK, TIMELINE_SUMMARY_PANEL_MOCK)이 추가되고, 세 컴포넌트를 조합한 Canvas Storybook 스토리가 추가된다. 마운트 시 스크롤 컨테이너를 우측 끝으로 초기화하는 로직이 포함된다.

추정 코드 리뷰 노력

🎯 3 (Moderate) | ⏱️ ~25 minutes

관련 가능 PR

제안 리뷰어

  • Seojegyeong
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 작업의 주요 내용(타임라인 본체 UI 컴포넌트 및 Storybook 구현)을 명확하게 반영하고 있습니다.
Description check ✅ Passed PR 설명이 템플릿의 주요 섹션을 충실하게 작성했으며, 관련 이슈, 변경사항, 작업 내용, 미완성 작업, 논의 사항을 모두 포함하고 있습니다.
Linked Issues check ✅ Passed PR이 이슈 #252의 모든 주요 목표(TimelineAxis, TimelineGrid, TimelineBar, props 기반 배치, Storybook 통합, mock 데이터)를 성공적으로 구현했습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 이슈 #252의 범위 내(컴포넌트 UI, 타입 정의, mock 데이터, Storybook)에 속하며, 기간 선택, 상단 툴바, API 연동 등 제외 범위는 포함되지 않았습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 feature/#252

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 Jun 21, 2026

Copy link
Copy Markdown

📚 Storybook 배포 완료

항목 링크
📖 Storybook https://69a147b60a56365d9e2185ef-dvboibzvyv.chromatic.com/
🔍 Chromatic https://www.chromatic.com/build?appId=69a147b60a56365d9e2185ef&number=360

@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 (2)
src/components/timeline/TimelineCanvas.stories.tsx (1)

7-9: ⚡ Quick win

상대 경로 import를 @/ 별칭으로 통일해주세요.

Line 7-9는 현재 상대 경로(./...)를 사용하고 있어서 프로젝트 import 규칙과 불일치합니다.

수정 제안
-import TimelineAxis from "./TimelineAxis";
-import TimelineBar from "./TimelineBar";
-import TimelineGrid from "./TimelineGrid";
+import TimelineAxis from "`@/components/timeline/TimelineAxis`";
+import TimelineBar from "`@/components/timeline/TimelineBar`";
+import TimelineGrid from "`@/components/timeline/TimelineGrid`";

As per coding guidelines, "**/*.{ts,tsx}: Use @/ alias for all imports."

🤖 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/components/timeline/TimelineCanvas.stories.tsx` around lines 7 - 9, The
imports for TimelineAxis, TimelineBar, and TimelineGrid are using relative paths
(./) instead of the `@/` alias, which violates the project's import conventions.
Replace all three relative imports with the `@/` alias format by changing the
import paths from ./ComponentName to `@/components/timeline/ComponentName` (or the
appropriate path based on your project's `@/` alias configuration). This ensures
consistency with the project's import guidelines.

Source: Coding guidelines

src/types/timeline/api.ts (1)

1-1: ⚡ Quick win

@/ alias 규칙과 다른 상대경로 import를 수정해 주세요.

Line 1의 ../dashboard/provider는 저장소 TS 규칙과 불일치합니다. 같은 도메인 타입 파일들처럼 alias로 통일해 두는 편이 경로 이동/리팩터링 시 안전합니다.

변경 제안
-import type { TProviderType } from "../dashboard/provider";
+import type { TProviderType } from "`@/types/dashboard/provider`";

As per coding guidelines, **/*.{ts,tsx}: Use @/ alias for all imports.

🤖 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/types/timeline/api.ts` at line 1, The import statement in api.ts for
TProviderType from ../dashboard/provider uses a relative path instead of the `@/`
alias pattern that should be followed consistently across all TypeScript files
in the repository. Replace the relative path import with the `@/` alias path to
match the project's coding guidelines and ensure consistency with other type
files in the same domain, which will make future refactoring and path changes
safer.

Source: Coding guidelines

🤖 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/components/timeline/TimelineBar.tsx`:
- Around line 39-45: The TimelineBar component's outer div has a cursor-pointer
style applied in the twMerge call but lacks an actual click handler, creating a
misleading UX. Either remove the cursor-pointer class from the twMerge styling
if only the menu button should be interactive, or add an onClick handler along
with appropriate keyboard event handling (such as Enter/Space key support) to
the outer div if the entire card should be clickable. Ensure the UX matches the
visual affordance provided by the cursor style.

In `@src/types/timeline/timeline.mock.ts`:
- Around line 90-91: The `isWeekend` property for Friday (금) is incorrectly set
to true when it should be false. Locate the object for day "금" with date 26 in
the timeline mock data and change `isWeekend: true` to `isWeekend: false`. The
Saturday entry (토) with isWeekend: true is correct and should remain unchanged.

---

Nitpick comments:
In `@src/components/timeline/TimelineCanvas.stories.tsx`:
- Around line 7-9: The imports for TimelineAxis, TimelineBar, and TimelineGrid
are using relative paths (./) instead of the `@/` alias, which violates the
project's import conventions. Replace all three relative imports with the `@/`
alias format by changing the import paths from ./ComponentName to
`@/components/timeline/ComponentName` (or the appropriate path based on your
project's `@/` alias configuration). This ensures consistency with the project's
import guidelines.

In `@src/types/timeline/api.ts`:
- Line 1: The import statement in api.ts for TProviderType from
../dashboard/provider uses a relative path instead of the `@/` alias pattern that
should be followed consistently across all TypeScript files in the repository.
Replace the relative path import with the `@/` alias path to match the project's
coding guidelines and ensure consistency with other type files in the same
domain, which will make future refactoring and path changes safer.
🪄 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: CHILL

Plan: Pro

Run ID: b30dd2ef-b6ec-43a1-a798-862b0af42973

📥 Commits

Reviewing files that changed from the base of the PR and between 62bf30a and 11368dd.

📒 Files selected for processing (11)
  • src/components/timeline/TimelineAxis.tsx
  • src/components/timeline/TimelineBar.tsx
  • src/components/timeline/TimelineCanvas.stories.tsx
  • src/components/timeline/TimelineGrid.tsx
  • src/constants/timeline/layout.ts
  • src/constants/timeline/statusStyle.ts
  • src/types/timeline/api.ts
  • src/types/timeline/form.ts
  • src/types/timeline/summary.ts
  • src/types/timeline/timeline.mock.ts
  • src/types/timeline/ui.ts

Comment thread src/components/timeline/TimelineBar.tsx
Comment thread src/types/timeline/timeline.mock.ts Outdated
Comment thread src/components/timeline/TimelineBar.tsx Outdated
@Seojegyeong

Copy link
Copy Markdown
Collaborator

P4: 지금은 스타일 자유도가 높아서 직접 구현이 좋은데, 나중에 드래그 앤 드롭이나 날짜 네비게이션 같은 인터랙션 추가될 예정이면 직접 구현 비용이 꽤 커질 것 같습니다!
FullCalendar가 이런 기능 내장에 Tailwind 커스텀도 되니까 인터랙션 추가가 있다면 라이브러리 도입 고려해보면 좋을 것 같습니다!

@jjjsun

jjjsun commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator Author

P4: 지금은 스타일 자유도가 높아서 직접 구현이 좋은데, 나중에 드래그 앤 드롭이나 날짜 네비게이션 같은 인터랙션 추가될 예정이면 직접 구현 비용이 꽤 커질 것 같습니다! FullCalendar가 이런 기능 내장에 Tailwind 커스텀도 되니까 인터랙션 추가가 있다면 라이브러리 도입 고려해보면 좋을 것 같습니다!

좋은것같습니다!

현재 타임라인 구현이 이미 일정수준이상 진행된 상태이기에, 먼저 성과확인/조회/기간확인의 기능을 커스텀 UI로 마무리할 예정입니다.
말씀해주신대로 인터렉션의 직접 구현 비용이 커질수도 있다고 생각합니다.
해당 기능은 기능 요구사항 정리하여 추가 별도 이슈 생성후 @dnd-kit, gantt-tast-react, FullCalender 등의 라이브러리 비교해서 도입하는 방향으로 작업 진행하겠습니다!

@YermIm YermIm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P4: 확인했습니다!

@Seojegyeong Seojegyeong left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P4: 확인했습니다!

@jjjsun jjjsun merged commit fb67e42 into develop Jun 25, 2026
3 checks passed
@jjjsun jjjsun deleted the feature/#252 branch June 25, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 기능 개발 🎨 Html&css 마크업 & 스타일링 ✅ Test test 관련(storybook, jest...)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ [Feature] 타임라인 공통 컴포넌트 UI 구현

3 participants