Skip to content

[Feature/#263] 타임라인 생성 모달 UI 구현#264

Merged
jjjsun merged 4 commits into
developfrom
feature/#263
Jun 26, 2026
Merged

[Feature/#263] 타임라인 생성 모달 UI 구현#264
jjjsun merged 4 commits into
developfrom
feature/#263

Conversation

@jjjsun

@jjjsun jjjsun commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

🚨 관련 이슈

Closed #263

✨ 변경사항

  • 🐞 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.)

✏️ 작업 내용

TimelineCreateModal 구현

  • Modal 공통 컴포넌트 사용하여 타임라인 생성 모달 UI 추가
  • RHF + zod(timelineCreateSchema) 폼 구조 적용
    • 타임라인 이름, 시작일/종료일, 성과 지표(멀티 선택), 비교 기간
    • 필수값·날짜 순서·지표 최소 1개 유효성 검사 및 에러 메시지 표시
  • InputButton, DropdownMenu 공통 컴포넌트 재활용하여 구현하였습니다.
  • 제출 시 mock 처리 (setTimeout + sonner toast), 제출 중 닫기/오버레이 클릭 방지

Storybook

  • Timeline/CreateModal 스토리 추가
    • Default — 기본 열림 상태
    • ValidationErrors — 빈 폼 제출 시 유효성 에러
    • Submitting — 제출 중 로딩 상태

💻 작업 화면

전체 화면

image image image

모바일 화면

image image

😅 미완성 작업

N/A

📢 논의 사항 및 참고 사항

  • 기간설정의 두개의 Input 전부 필드 전체 클릭시 달력이 열리도록 type="date"showPicker() 이용해서 구현하였습니다. Firefox 등 미지원 브라우저에서는 호환되지 않아 호출이 제한될수 있어서 아이콘 클릭으로만 열릴 수 있습니다.
  • 성과 요약 기준 지표는 DropdownMenu보다는 메뉴클릭을 이용하는게 중복 선택에 훨씬 용이하고, 직관적으로 파악하기 좋을것같아서 기존 디자인에서 수정하였습니다.

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

Summary by CodeRabbit

  • New Features

    • 새 타임라인 생성 모달이 추가되어 이름, 날짜, 성과 지표, 비교 기간을 입력해 생성할 수 있습니다.
    • 타임라인 카드와 성과 패널에 더 많은 상호작용이 추가되어, 항목 클릭과 상세 보기/편집/삭제 흐름이 더 자연스러워졌습니다.
    • 성과 패널에서 주요 지표, AI 요약, 플랫폼별 기여도를 한 화면에서 확인할 수 있습니다.
  • Bug Fixes

    • 드롭다운 메뉴의 위험 항목 스타일과 라벨 표시가 더 일관되게 적용됩니다.

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

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jjjsun, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 14 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

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

🚦 How do rate 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 see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f76af088-caa8-41f8-ae6e-0205abf273be

📥 Commits

Reviewing files that changed from the base of the PR and between f56bf4e and 8df5cc2.

📒 Files selected for processing (4)
  • src/components/timeline/TimelineCreateModal.stories.tsx
  • src/components/timeline/TimelinePerformancePanel.tsx
  • src/constants/timeline/formOptions.ts
  • src/types/timeline/timeline.mock.ts
📝 Walkthrough

Walkthrough

타임라인 생성 모달(TimelineCreateModal)을 RHF+Zod로 신규 구현하고, Drawer 기반 성과 패널(TimelinePerformancePanel)을 추가했습니다. DropdownMenudanger/labelClassName 옵션을, TimelineBaronBarClick 콜백을 추가했으며, 관련 폼 스키마·상수·타입·mock 데이터·Storybook 스토리도 함께 포함됩니다.

Changes

타임라인 생성 모달 및 성과 패널 기능 추가

Layer / File(s) Summary
폼 스키마, 상수, 타입 기반 정의
src/utils/timeline/timeline.ts, src/constants/timeline/formOptions.ts, src/types/timeline/summary.ts, src/types/timeline/timeline.mock.ts
Zod 기반 timelineCreateSchemaTTimelineCreateFormValues 타입을 추가하고, 메트릭·비교기간 옵션 상수를 정의함. ITimelineSummaryPanelDataperformanceStatus 필드를 추가하고 mock 데이터를 갱신함.
DropdownMenu danger/labelClassName 확장
src/components/common/dropdownmenu/DropdownMenu.tsx
TMenuItemdanger?: booleanlabelClassName?: string을 추가하고, 버튼·아이콘·라벨의 클래스 계산 로직에서 danger 우선 분기를 적용함.
TimelineBar 카드 클릭 및 이벤트 전파 제어
src/components/timeline/TimelineBar.tsx
onBarClick 콜백을 props에 추가하고, 카드 컨테이너에 onClick을 연결하며, 메뉴 버튼에 stopPropagation을 추가해 상위 클릭 전파를 분리함.
TimelineCreateModal 구현 및 Storybook
src/components/timeline/TimelineCreateModal.tsx, src/components/timeline/TimelineCreateModal.stories.tsx
RHF+Zod 기반 타임라인 생성 모달을 구현하고, 날짜 피커·지표 토글·비교기간 드롭다운 UI 및 mock 제출 흐름을 포함함. Storybook에서 Default/ValidationErrors/Submitting 세 시나리오를 자동화 로직으로 재현함.
TimelinePerformancePanel 구현 및 Storybook
src/components/timeline/TimelinePerformancePanel.tsx, src/components/timeline/TimelinePerformancePanel.stories.tsx
Drawer 기반 성과 패널을 구현해 헤더·AI 요약(idle/loading/done 상태)·KPI 카드·차트 placeholder·플랫폼 기여 진행 바를 렌더링함. Storybook에서 Closed/Open/OpenWithSummary/Interactive 네 가지 시나리오를 제공함.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • WhereYouAd/WhereYouAd-Frontend#251: src/types/timeline/summary.tstimeline.mock.ts의 타입·mock 데이터 기반이 해당 PR에서 처음 도입되었으며, 이번 PR이 그 위에 performanceStatus 필드를 추가함.
  • WhereYouAd/WhereYouAd-Frontend#256: TimelineBar.tsxonMenuClick 기반 메뉴 버튼 동작을 최초 구현한 PR로, 이번 PR에서 해당 핸들러에 stopPropagation 로직을 추가함.

Suggested reviewers

  • Seojegyeong
  • YermIm
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning 생성 모달과 직접 관련 없는 TimelinePerformancePanel, TimelineBar, summary/mock, DropdownMenu 변경이 포함돼 범위를 벗어납니다. 생성 모달과 직접 관련 없는 TimelinePerformancePanel, TimelineBar, summary/mock, DropdownMenu 변경은 별도 PR로 분리하거나 사유를 명확히 적어 주세요.
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 (3 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 타임라인 생성 모달 UI 구현이라는 핵심 변경을 정확히 요약하고 있어 적절합니다.
Linked Issues check ✅ Passed 모달 구현, RHF+zod 검증, mock 제출, 스토리북 상태가 #263 요구사항과 일치합니다.
Description check ✅ Passed 필수 섹션인 관련 이슈, 변경사항, 작업 내용, 미완성 작업, 논의 사항이 모두 포함되어 템플릿 요구를 대부분 충족합니다.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/#263

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

Copy link
Copy Markdown

📚 Storybook 배포 완료

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

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

Caution

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

⚠️ Outside diff range comments (1)
src/components/timeline/TimelineBar.tsx (1)

42-49: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

카드 클릭 인터랙션에 키보드 접근성을 추가해 주세요.

현재 divonClick만 있어 키보드(Enter/Space)로 onBarClick을 실행할 수 없습니다. role, tabIndex, onKeyDown을 함께 추가해 접근성을 보장해 주세요.

접근성 보완 예시
     <div
+      role={onBarClick ? "button" : undefined}
+      tabIndex={onBarClick ? 0 : undefined}
       className={twMerge(
         "absolute z-20 flex cursor-pointer items-start gap-2.5 rounded-xl px-3 py-2.5 transition-shadow hover:z-30 hover:shadow-Soft",
         status.barBg,
         className,
       )}
       onClick={() => onBarClick?.(bar)}
+      onKeyDown={(event) => {
+        if (!onBarClick) return;
+        if (event.key === "Enter" || event.key === " ") {
+          event.preventDefault();
+          onBarClick(bar);
+        }
+      }}
       style={{ left, top, width, height: TIMELINE_BAR_HEIGHT }}
     >

As per path instructions, src/**: "7. 접근성: 시맨틱 HTML, ARIA 속성 사용 확인."

🤖 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/TimelineBar.tsx` around lines 42 - 49, `TimelineBar`의
클릭 가능한 `div`에 키보드 접근성이 빠져 있습니다. `onClick`이 있는 요소를 `role="button"`과
`tabIndex={0}`로 만들고, `onKeyDown`에서 Enter/Space 입력 시 `onBarClick`이 실행되도록 추가하세요.
`TimelineBar` 컴포넌트의 해당 카드 요소에 시맨틱/ARIA 속성을 함께 적용해 마우스와 키보드 모두 동일하게 동작하도록 수정하면
됩니다.

Source: Path instructions

🧹 Nitpick comments (2)
src/components/timeline/TimelineCreateModal.tsx (1)

19-25: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

상대 경로 import가 팀 규칙(@/ alias)과 다릅니다.

Line 19-25의 ../common/... import를 @/components/common/... 형태로 통일해 주세요.

As per coding guidelines, "Use @/ alias for all imports. Automatic sorting via eslint-plugin-simple-import-sort on save (no manual sorting needed)."

🤖 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/TimelineCreateModal.tsx` around lines 19 - 25, The
imports in TimelineCreateModal should follow the repo’s "`@/`” alias convention
instead of relative paths. Update the Button, DropdownMenu/TMenuItem, Input, and
Modal imports in TimelineCreateModal to use "`@/components/common/`..." so they
match the team guideline and stay consistent with simple-import-sort ordering.

Source: Coding guidelines

src/components/timeline/TimelineCreateModal.stories.tsx (1)

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

스토리 파일도 @/ alias import 규칙으로 맞춰주세요.

Line 5의 상대 경로 import를 alias로 통일하면 경로 일관성과 이동 안정성이 좋아집니다.

As per coding guidelines, "Use @/ alias for all imports. Automatic sorting via eslint-plugin-simple-import-sort on save (no manual sorting needed)."

🤖 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/TimelineCreateModal.stories.tsx` at line 5, The story
file is using a relative import instead of the required `@/` alias, so update
the `TimelineCreateModal` import in `TimelineCreateModal.stories.tsx` to use the
alias-based path. Keep the import consistent with the project’s
`simple-import-sort`/alias convention and verify no other imports in this story
file still use relative paths.

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/TimelineCreateModal.stories.tsx`:
- Around line 69-91: The story auto-fill in TimelineCreateModal is bypassing RHF
and relying on brittle selectors, so update the play function to target the
actual name input and trigger real change/input events instead of assigning
.value directly. Use the existing inputs in the submit flow to set values in a
way RHF observes, guard the second date input access in the
TimelineCreateModal.stories.tsx scenario, and keep the metric button and submit
click steps after the form state is properly updated.

In `@src/components/timeline/TimelinePerformancePanel.tsx`:
- Around line 133-154: The summary generation timer in TimelinePerformancePanel
can still fire after the panel is closed and overwrite aiState/generatedSummary
unexpectedly. Update handleGenerateSummary and the isOpen-related useEffect so
any existing summaryTimerRef timeout is cleared before starting a new one and
again when the panel closes. Keep the cleanup in the unmount effect, and make
sure the timer is reset through summaryTimerRef.current in both the close path
and the regenerate path.

In `@src/constants/timeline/formOptions.ts`:
- Around line 22-24: The comparison period options in formOptions have a
duplicated value, causing the “지난주 대비” choice to submit the wrong enum. Update
the option array in the timeline form options so the label “지난주 대비” uses the
correct unique value referenced by the API contract, matching the enum in the
timeline types, and keep “지난달 대비” mapped to its own distinct value.

In `@src/types/timeline/timeline.mock.ts`:
- Line 36: The summary text in the timeline mock is inconsistent with the mocked
period, since it mentions “1월 23일” while the period is 2026년 6월. Update the
Korean narrative in timeline.mock.ts to use dates that match the mocked
timeframe, keeping the same meaning but replacing the January reference with a
June-aligned date in the existing summary string.

---

Outside diff comments:
In `@src/components/timeline/TimelineBar.tsx`:
- Around line 42-49: `TimelineBar`의 클릭 가능한 `div`에 키보드 접근성이 빠져 있습니다. `onClick`이
있는 요소를 `role="button"`과 `tabIndex={0}`로 만들고, `onKeyDown`에서 Enter/Space 입력 시
`onBarClick`이 실행되도록 추가하세요. `TimelineBar` 컴포넌트의 해당 카드 요소에 시맨틱/ARIA 속성을 함께 적용해
마우스와 키보드 모두 동일하게 동작하도록 수정하면 됩니다.

---

Nitpick comments:
In `@src/components/timeline/TimelineCreateModal.stories.tsx`:
- Line 5: The story file is using a relative import instead of the required `@/`
alias, so update the `TimelineCreateModal` import in
`TimelineCreateModal.stories.tsx` to use the alias-based path. Keep the import
consistent with the project’s `simple-import-sort`/alias convention and verify
no other imports in this story file still use relative paths.

In `@src/components/timeline/TimelineCreateModal.tsx`:
- Around line 19-25: The imports in TimelineCreateModal should follow the repo’s
"`@/`” alias convention instead of relative paths. Update the Button,
DropdownMenu/TMenuItem, Input, and Modal imports in TimelineCreateModal to use
"`@/components/common/`..." so they match the team guideline and stay consistent
with simple-import-sort ordering.
🪄 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: 7a027c42-3913-4341-8c43-9c7cfeb90502

📥 Commits

Reviewing files that changed from the base of the PR and between d93b159 and f56bf4e.

📒 Files selected for processing (10)
  • src/components/common/dropdownmenu/DropdownMenu.tsx
  • src/components/timeline/TimelineBar.tsx
  • src/components/timeline/TimelineCreateModal.stories.tsx
  • src/components/timeline/TimelineCreateModal.tsx
  • src/components/timeline/TimelinePerformancePanel.stories.tsx
  • src/components/timeline/TimelinePerformancePanel.tsx
  • src/constants/timeline/formOptions.ts
  • src/types/timeline/summary.ts
  • src/types/timeline/timeline.mock.ts
  • src/utils/timeline/timeline.ts

Comment thread src/components/timeline/TimelineCreateModal.stories.tsx
Comment thread src/components/timeline/TimelinePerformancePanel.tsx
Comment thread src/constants/timeline/formOptions.ts Outdated
Comment thread src/types/timeline/timeline.mock.ts Outdated
@Seojegyeong

Copy link
Copy Markdown
Collaborator

P4: 여기도 충돌 났습니다...

@jjjsun

jjjsun commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator Author

P4: 여기도 충돌 났습니다...

넵 여기도 해결중입니다..!!

@jjjsun jjjsun merged commit 4c1d03d into develop Jun 26, 2026
3 checks passed
@jjjsun jjjsun deleted the feature/#263 branch June 26, 2026 12: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 구현

2 participants