Skip to content

Conversation

@jeonghanyun
Copy link
Contributor

@jeonghanyun jeonghanyun commented Aug 2, 2025

πŸ‡°πŸ‡· Korean Date Expression Support

이 PR은 MaTeMaTuK/gantt-task-react PR #254의 "Support for Korean date expressions" κΈ°λŠ₯을 ν•œκ΅­μ–΄ 버전에 μ μš©ν•œ κ²ƒμž…λ‹ˆλ‹€.

✨ μ£Όμš” κΈ°λŠ₯

πŸ“… Korean Date Expressions (locale='kor')

  • Year View: 2024λ…„ 1μ›” ν˜•μ‹μœΌλ‘œ ν‘œμ‹œ
  • Month View: ν•œκ΅­μ–΄ μ›” 이름 ν‘œμ‹œ
  • Week View: 1μ›” 1μ£Ό ν˜•μ‹μœΌλ‘œ μ£Όμ°¨ ν‘œμ‹œ
  • Day View: 1μ›” 1일 (μ›”) ν˜•μ‹μœΌλ‘œ λ‚ μ§œ ν‘œμ‹œ
  • Hour/PartOfDay Views: λͺ¨λ“  μ‹œκ°„ λ‹¨μœ„μ—μ„œ ν•œκ΅­μ–΄ λ‚ μ§œ 지원

🎯 Jira-style Today Indicator

  • Today ν‘œμ‹œ κ°œμ„ : λ‹¨μˆœν•œ μ‚¬κ°ν˜• β†’ Jira μŠ€νƒ€μΌ ν™”μ‚΄ν‘œ
  • 주황색 ν™”μ‚΄ν‘œ (#fea362)둜 μ‹œκ°μ  κ°•μ‘°
  • 쀑앙 μ„Έλ‘œμ„ κ³Ό μ—­μ‚Όκ°ν˜• ν™”μ‚΄ν‘œ 머리 μ‘°ν•©

🎨 Visual Improvements

  • Project Bar λ‹¨μˆœν™”: μ‚Όκ°ν˜• μž₯식 제거, κΉ”λ”ν•œ μ§μ‚¬κ°ν˜• λ””μžμΈ
  • Task Label: fontSize={12}둜 가독성 κ°œμ„ 
  • Tooltip κ°œμ„ : μž‘μ—…λͺ…κ³Ό λ‚ μ§œ 정보 뢄리, YYYY-MM-DD ~ YYYY-MM-DD ν˜•μ‹
  • Calendar Styling: ꡬ뢄선 μΆ”κ°€ 및 쀑앙 μ •λ ¬

πŸ”§ μ‚¬μš© 예제

import { Gantt } from 'gantt-task-react-19-korean';

<Gantt 
  tasks={tasks}
  locale="kor"  // ν•œκ΅­μ–΄ λ‚ μ§œ ν‘œν˜„ ν™œμ„±ν™”
  viewMode={ViewMode.Week}
/>

πŸ“… ν•œκ΅­μ–΄ λ‚ μ§œ ν˜•μ‹ μ˜ˆμ‹œ

ViewMode English Korean (locale='kor')
Year 2024 2024
Month January, 2024 2024λ…„ 1μ›”
Week W01 1μ›” 1μ£Ό
Day Mon, 1 1μ›” 1일 (μ›”)
Hour Mon, 1 January 1μ›” 1일 (μ›”)

πŸ“ λ³€κ²½λœ νŒŒμΌλ“€

Core Files

  • src/helpers/date-helper.ts: getWeekOfMonth ν•¨μˆ˜ μΆ”κ°€
  • src/components/calendar/calendar.tsx: ν•œκ΅­μ–΄ λ‚ μ§œ ν‘œν˜„ 둜직 및 μ‹œκ°μ  κ°œμ„ 
  • src/components/grid/grid-body.tsx: Jira μŠ€νƒ€μΌ Today ν™”μ‚΄ν‘œ κ΅¬ν˜„
  • src/components/other/tooltip.tsx: 툴팁 λ‚ μ§œ ν˜•μ‹ κ°œμ„ 
  • src/components/task-item/project/project.tsx: ν”„λ‘œμ νŠΈ λ°” λ‹¨μˆœν™”
  • src/components/task-item/task-item.tsx: ν…μŠ€νŠΈ 크기 μ‘°μ •

Example Files

  • example/src/App.tsx: ν•œκ΅­μ–΄ locale μ‚¬μš© 예제 (locale="kor")

πŸ”§ 기술 세뢀사항

getWeekOfMonth ν•¨μˆ˜

  • μ›” λ‹¨μœ„ μ£Όμ°¨ 계산 (getWeekNumberISO8601 λŒ€μ²΄)
  • μ›”μ˜ 첫 번째 μ›”μš”μΌ κΈ°μ€€ μ£Όμ°¨ μ‚°μ •

Today Indicator SVG Structure

<svg>
  <rect /> {/* λ°°κ²½ */}
  <rect /> {/* 쀑앙 μ„Έλ‘œμ„  */}
  <polygon /> {/* ν™”μ‚΄ν‘œ 머리 */}
</svg>

βœ… ν…ŒμŠ€νŠΈ

  • λΉŒλ“œ 성곡
  • λͺ¨λ“  ViewModeμ—μ„œ ν•œκ΅­μ–΄ λ‚ μ§œ ν‘œν˜„ 확인
  • Jira μŠ€νƒ€μΌ Today ν™”μ‚΄ν‘œ λ™μž‘ 확인
  • TypeScript νƒ€μž… 검증
  • κΈ°μ‘΄ μ˜μ–΄ locale ν˜Έν™˜μ„± μœ μ§€

πŸ™ Credit

Original PR by @ohshinyeop - PR #254

"ν•œκ΅­μ‹ λ‚ μ§œ ν‘œκΈ°λŠ” μ˜μ–΄μ™€ 맀우 λ‹€λ¦…λ‹ˆλ‹€" - 이제 ν•œκ΅­ μ‚¬μš©μžλ“€μ΄ 더 μžμ—°μŠ€λŸ½κ²Œ Gantt Chartλ₯Ό μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€! πŸŽ‰

Summary by CodeRabbit

  • μ‹ κ·œ κΈ°λŠ₯

    • Gantt μ°¨νŠΈμ™€ μΊ˜λ¦°λ”μ—μ„œ ν•œκ΅­μ–΄(Korean) λ‘œμΌ€μΌ 지원이 μΆ”κ°€λ˜μ—ˆμŠ΅λ‹ˆλ‹€.
  • κ°œμ„  사항

    • μΊ˜λ¦°λ” 뷰의 μ£Ό, 일, μ‹œκ°„ λ“± λ‹€μ–‘ν•œ κ΅¬κ°„μ—μ„œ ν•œκ΅­μ–΄ λ‚ μ§œ 및 μ£Όμ°¨ ν‘œκΈ°κ°€ μ μš©λ˜μ—ˆμŠ΅λ‹ˆλ‹€.
    • μΊ˜λ¦°λ” ν•˜λ‹¨ 라벨에 ꡬ뢄선과 쀑앙 μ •λ ¬ ν…μŠ€νŠΈκ°€ μΆ”κ°€λ˜μ–΄ 가독성이 ν–₯μƒλ˜μ—ˆμŠ΅λ‹ˆλ‹€.
    • 였늘(today) ν‘œμ‹œκ°€ ν™”μ‚΄ν‘œμ™€ μ„Έλ‘œμ„ μ΄ ν¬ν•¨λœ μŠ€νƒ€μΌλ‘œ μ‹œκ°μ μœΌλ‘œ κ°œμ„ λ˜μ—ˆμŠ΅λ‹ˆλ‹€.
    • ν”„λ‘œμ νŠΈ λ°”μ—μ„œ μ–‘ 끝 μ‚Όκ°ν˜•κ³Ό 상단 μ˜€λ²„λ ˆμ΄κ°€ μ œκ±°λ˜μ–΄ λ””μžμΈμ΄ κ°„μ†Œν™”λ˜μ—ˆμŠ΅λ‹ˆλ‹€.
    • μž‘μ—…λͺ… ν…μŠ€νŠΈμ˜ 폰트 크기가 12둜 κ³ μ •λ˜μ–΄ 일관성이 λ†’μ•„μ‘ŒμŠ΅λ‹ˆλ‹€.
    • νˆ΄νŒμ—μ„œ μž‘μ—…λͺ…κ³Ό λ‚ μ§œ λ²”μœ„κ°€ λΆ„λ¦¬λ˜μ–΄ ν‘œμ‹œλ©λ‹ˆλ‹€.
  • 기타

    • μ›” λ‚΄ μ£Όμ°¨ 계산을 μœ„ν•œ μœ ν‹Έλ¦¬ν‹° ν•¨μˆ˜κ°€ μΆ”κ°€λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

- Add getWeekOfMonth function for monthly week calculation
- Add Korean locale support (locale='kor') in calendar component
  - Year view: Display as '2024λ…„ 1μ›”'
  - Month view: Show month names in Korean
  - Week view: Display as '1μ›” 1μ£Ό' format
  - Day view: Display as '1μ›” 1일 (μ›”)' format
  - Hour/PartOfDay views: Korean date format support
- Add Jira-style Today indicator with orange arrow
  - Replace simple rect with SVG containing vertical line and triangle arrow
  - Orange color (#fea362) for better visibility
- Improve tooltip date format
  - Separate task name and date information
  - Use 'YYYY-MM-DD ~ YYYY-MM-DD' format
- Simplify project visual style
  - Remove triangular decorations from project bars
  - Clean rectangular design only
- Add fontSize={12} to task labels for better readability
- Add Korean locale examples in demo app (locale='kor')
- Update calendar styling with divider lines and center alignment

Based on PR #254 from MaTeMaTuK/gantt-task-react by ohshinyeop
Korean date expressions are fundamentally different from English formats
@coderabbitai
Copy link

coderabbitai bot commented Aug 2, 2025

Warning

Rate limit exceeded

@jeonghanyun has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 1 minutes and 38 seconds before requesting another review.

βŒ› How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 6d8044e and 394df6b.

πŸ“’ Files selected for processing (5)
  • src/components/calendar/calendar.tsx (7 hunks)
  • src/components/grid/grid-body.tsx (2 hunks)
  • src/components/other/tooltip.tsx (1 hunks)
  • src/helpers/date-helper.ts (1 hunks)
  • src/index.tsx (1 hunks)
πŸ“ Walkthrough

Walkthrough

이번 λ³€κ²½μ—μ„œλŠ” Gantt μ»΄ν¬λ„ŒνŠΈμ— ν•œκ΅­μ–΄ λ‘œμΌ€μΌμ„ μ μš©ν•˜κ³ , μΊ˜λ¦°λ”μ™€ κ·Έλ¦¬λ“œ, 툴팁, νƒœμŠ€ν¬ μ•„μ΄ν…œ, ν”„λ‘œμ νŠΈ λ°”μ˜ μ‹œκ°μ  μš”μ†Œ 및 λ‚ μ§œ 라벨 포맷을 λ‘œμΌ€μΌμ— 맞게 κ°œμ„ ν•˜μ˜€μŠ΅λ‹ˆλ‹€. λ˜ν•œ 월별 μ£Όμ°¨ 계산을 μœ„ν•œ 헬퍼 ν•¨μˆ˜κ°€ μΆ”κ°€λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

Changes

Cohort / File(s) Change Summary
Gantt μ»΄ν¬λ„ŒνŠΈ λ‘œμΌ€μΌ 적용
example/src/App.tsx
<Gantt> μ»΄ν¬λ„ŒνŠΈμ— locale="kor" 속성이 μΆ”κ°€λ˜μ–΄, Gantt μ°¨νŠΈκ°€ ν•œκ΅­μ–΄λ‘œ ν‘œμ‹œλ˜λ„λ‘ μˆ˜μ •λ˜μ—ˆμŠ΅λ‹ˆλ‹€.
μΊ˜λ¦°λ” λ·° 및 라벨 포맷/뢄리선 κ°œμ„ 
src/components/calendar/calendar.tsx
μ£Ό, 일, μ‹œκ°„ λ“± λ‹€μ–‘ν•œ λ·°μ—μ„œ ν•œκ΅­μ–΄ λ‘œμΌ€μΌμ— λ§žλŠ” λ‚ μ§œ 포맷이 μ μš©λ˜μ—ˆμŠ΅λ‹ˆλ‹€. ν•˜λ‹¨ 라벨은 μ„Έλ‘œ ꡬ뢄선과 κ·Έλ£Ήν™”λœ <g> μš”μ†Œλ‘œ ν†΅μΌλ˜μ—ˆκ³ , ν•œκ΅­μ–΄ μ£Όμ°¨ ν‘œκΈ°(예: "6μ›” 2μ£Ό")와 일자 ν‘œκΈ°(예: "6μ›” 5일(수)") λ“± λ‘œμΌ€μΌλ³„ 포맷이 λ°˜μ˜λ˜μ—ˆμŠ΅λ‹ˆλ‹€. μ£Όμ°¨ 계산 ν•¨μˆ˜κ°€ κ΅μ²΄λ˜μ—ˆκ³ , 라벨 λ Œλ”λ§ 방식이 κ°œμ„ λ˜μ—ˆμŠ΅λ‹ˆλ‹€.
였늘 ν‘œμ‹œ μ‹œκ°μ  κ°•μ‘°
src/components/grid/grid-body.tsx
"였늘"을 λ‚˜νƒ€λ‚΄λŠ” ν‘œμ‹œκ°€ λ‹¨μˆœν•œ μ‚¬κ°ν˜•μ—μ„œ, λ°°κ²½ μ‚¬κ°ν˜• + 쀑앙 μ˜€λ Œμ§€μƒ‰ μ„Έλ‘œμ„  + μœ„μͺ½ μ‚Όκ°ν˜•(ν™”μ‚΄ν‘œ)둜 μ‹œκ°μ μœΌλ‘œ κ°•μ‘°λœ SVG 그룹으둜 λ³€κ²½λ˜μ—ˆμŠ΅λ‹ˆλ‹€.
툴팁 λ‚΄μš© 뢄리
src/components/other/tooltip.tsx
νˆ΄νŒμ—μ„œ νƒœμŠ€ν¬λͺ…κ³Ό λ‚ μ§œ λ²”μœ„κ°€ λΆ„λ¦¬λ˜μ–΄, νƒœμŠ€ν¬λͺ…은 ꡡ게, λ‚ μ§œ λ²”μœ„λŠ” λ³„λ„μ˜ 단락에 "date : YYYY-MM-DD ~ YYYY-MM-DD" ν˜•μ‹μœΌλ‘œ ν‘œμ‹œλ©λ‹ˆλ‹€.
ν”„λ‘œμ νŠΈ λ°” λ‹¨μˆœν™”
src/components/task-item/project/project.tsx
ν”„λ‘œμ νŠΈ λ°”μ˜ μ–‘μͺ½ μ‚Όκ°ν˜• μž₯식과 상단 λ°˜λ†’μ΄ μ‚¬κ°ν˜•μ΄ μ œκ±°λ˜μ–΄, λ°”κ°€ λ‹¨μˆœν•œ λ‘₯κ·Ό μ‚¬κ°ν˜•κ³Ό 진행도 ν‘œμ‹œλ§Œ 남도둝 μ‹œκ°μ  μš”μ†Œκ°€ κ°„μ†Œν™”λ˜μ—ˆμŠ΅λ‹ˆλ‹€.
νƒœμŠ€ν¬λͺ… 폰트 크기 μ§€μ •
src/components/task-item/task-item.tsx
νƒœμŠ€ν¬λͺ… SVG <text> μš”μ†Œμ— fontSize={12} 속성이 μΆ”κ°€λ˜μ–΄ κΈ€μž 크기가 λͺ…μ‹œμ μœΌλ‘œ μ„€μ •λ˜μ—ˆμŠ΅λ‹ˆλ‹€.
월별 μ£Όμ°¨ 계산 ν•¨μˆ˜ μΆ”κ°€
src/helpers/date-helper.ts
μ£Όμ–΄μ§„ λ‚ μ§œμ˜ ν•΄λ‹Ή μ›” λ‚΄μ—μ„œμ˜ μ£Όμ°¨(μ›”μš”μΌ μ‹œμž‘)λ₯Ό κ³„μ‚°ν•˜λŠ” getWeekOfMonth ν•¨μˆ˜κ°€ μƒˆλ‘œ μΆ”κ°€λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

Sequence Diagram(s)

sequenceDiagram
    participant μ‚¬μš©μž
    participant App
    participant Gantt
    participant Calendar
    participant GridBody
    participant Tooltip

    μ‚¬μš©μž->>App: Gantt 차트 λ Œλ”λ§ μš”μ²­ (locale="kor")
    App->>Gantt: locale="kor" 전달
    Gantt->>Calendar: λ‚ μ§œ/라벨 λ Œλ”λ§ (ν•œκ΅­μ–΄ 포맷 적용)
    Gantt->>GridBody: 였늘 ν‘œμ‹œ SVG κ·Έλ£Ή λ Œλ”λ§
    Gantt->>Tooltip: νƒœμŠ€ν¬λͺ…/λ‚ μ§œ λ²”μœ„ 뢄리 ν‘œμ‹œ
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15–20 minutes

Poem

πŸ‡
μ˜€λŠ˜μ€ Ganttκ°€ ν•œκΈ€λ‘œ μΈμ‚¬ν•΄μš”,
주차도, λ‚ μ§œλ„, ν™”μ‚΄ν‘œλ„ μƒˆλ‘œμ›Œμš”.
νˆ΄νŒμ€ λ§λ”νžˆ, ν”„λ‘œμ νŠΈ λ°”λŠ” μ‹¬ν”Œν•˜κ²Œ,
폰트 크기도 λ”± λ§žμΆ°μ„œ
ν† λΌλŠ” 깑총, μ½”λ“œλ„ 깔끔!

πŸŽ‰βœ¨

✨ Finishing Touches
  • πŸ“ Generate Docstrings
πŸ§ͺ Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/add-korean-date-support

πŸͺ§ Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
src/components/grid/grid-body.tsx (2)

91-91: SVGμ—μ„œ z-index 속성이 μž‘λ™ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

SVG μš”μ†Œμ—μ„œ z={1000} 속성은 νš¨κ³Όκ°€ μ—†μŠ΅λ‹ˆλ‹€. SVGμ—μ„œλŠ” μš”μ†Œμ˜ μˆœμ„œκ°€ λ Œλ”λ§ μˆœμ„œλ₯Ό κ²°μ •ν•©λ‹ˆλ‹€.

λ‹€μŒκ³Ό 같이 μˆ˜μ •ν•˜μ„Έμš”:

-<svg z={1000}>
+<svg>

108-109: 색상값을 μƒμˆ˜λ‘œ λΆ„λ¦¬ν•˜λŠ” 것을 κ³ λ €ν•˜μ„Έμš”.

#fea362 색상값이 μ—¬λŸ¬ 곳에 ν•˜λ“œμ½”λ”©λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€. μœ μ§€λ³΄μˆ˜μ„±μ„ μœ„ν•΄ μƒμˆ˜λ‘œ λΆ„λ¦¬ν•˜λŠ” 것을 ꢌμž₯ν•©λ‹ˆλ‹€.

파일 상단에 μƒμˆ˜λ₯Ό μ •μ˜ν•˜μ„Έμš”:

+const TODAY_ARROW_COLOR = "#fea362";

그리고 ν•˜λ“œμ½”λ”©λœ 색상을 λŒ€μ²΄ν•˜μ„Έμš”:

-fill: "#fea362",
-stroke: "#fea362",
+fill: TODAY_ARROW_COLOR,
+stroke: TODAY_ARROW_COLOR,

Also applies to: 121-122

src/components/other/tooltip.tsx (1)

127-127: λΆˆν•„μš”ν•œ 빈 μš”μ†Œλ₯Ό μ œκ±°ν•˜μ„Έμš”.

빈 <p></p> νƒœκ·Έλ₯Ό μ‚¬μš©ν•˜λŠ” λŒ€μ‹  CSS λ§ˆμ§„μ΄λ‚˜ νŒ¨λ”©μ„ ν™œμš©ν•˜λŠ” 것이 더 μ μ ˆν•©λ‹ˆλ‹€.

λ‹€μŒκ³Ό 같이 μˆ˜μ •ν•˜μ„Έμš”:

-<p></p>
-<p
-  className={styles.tooltipDefaultContainerParagraph}
-  style={{ marginTop: 4 }}
->
+<p
+  className={styles.tooltipDefaultContainerParagraph}
+  style={{ marginTop: 12 }}
+>
πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between f866f27 and 6d8044e.

πŸ“’ Files selected for processing (7)
  • example/src/App.tsx (2 hunks)
  • src/components/calendar/calendar.tsx (7 hunks)
  • src/components/grid/grid-body.tsx (1 hunks)
  • src/components/other/tooltip.tsx (1 hunks)
  • src/components/task-item/project/project.tsx (0 hunks)
  • src/components/task-item/task-item.tsx (1 hunks)
  • src/helpers/date-helper.ts (1 hunks)
πŸ’€ Files with no reviewable changes (1)
  • src/components/task-item/project/project.tsx
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/components/calendar/calendar.tsx (1)
src/helpers/date-helper.ts (3)
  • getLocaleMonth (183-192)
  • getWeekOfMonth (219-241)
  • getLocalDayOfWeek (194-207)
πŸ”‡ Additional comments (15)
src/components/task-item/task-item.tsx (1)

120-120: 쒋은 κ°œμ„ μ‚¬ν•­μž…λ‹ˆλ‹€!

νƒœμŠ€ν¬ 라벨의 폰트 크기λ₯Ό λͺ…μ‹œμ μœΌλ‘œ 12둜 μ„€μ •ν•˜μ—¬ ν…μŠ€νŠΈ 가독성과 일관성을 κ°œμ„ ν–ˆμŠ΅λ‹ˆλ‹€.

src/components/grid/grid-body.tsx (1)

92-125: Today μ§€μ‹œμžμ˜ μ‹œκ°μ  κ°œμ„ μ΄ ν›Œλ₯­ν•©λ‹ˆλ‹€!

λ‹¨μˆœν•œ μ‚¬κ°ν˜•μ—μ„œ Jira μŠ€νƒ€μΌμ˜ ν™”μ‚΄ν‘œ λ””μžμΈμœΌλ‘œ κ°œμ„ ν•˜μ—¬ ν˜„μž¬ λ‚ μ§œμ˜ μ‹œκ°μ  κ°•μ‘° νš¨κ³Όκ°€ 크게 ν–₯μƒλ˜μ—ˆμŠ΅λ‹ˆλ‹€.

example/src/App.tsx (1)

81-81: ν•œκ΅­μ–΄ λ‘œμΌ€μΌ 섀정이 μ˜¬λ°”λ₯΄κ²Œ μ μš©λ˜μ—ˆμŠ΅λ‹ˆλ‹€!

두 Gantt μ»΄ν¬λ„ŒνŠΈ λͺ¨λ‘μ— 일관성 있게 locale="kor" 속성을 μ„€μ •ν•˜μ—¬ ν•œκ΅­μ–΄ 지원을 ν™œμ„±ν™”ν–ˆμŠ΅λ‹ˆλ‹€.

Also applies to: 96-96

src/components/other/tooltip.tsx (1)

126-137: 툴팁 λ‚΄μš© λΆ„λ¦¬λ‘œ 가독성이 크게 κ°œμ„ λ˜μ—ˆμŠ΅λ‹ˆλ‹€!

νƒœμŠ€ν¬λͺ…κ³Ό λ‚ μ§œ 정보λ₯Ό λΆ„λ¦¬ν•˜μ—¬ ν‘œμ‹œν•˜κ³ , λ‚ μ§œ ν˜•μ‹μ„ YYYY-MM-DD둜 ν†΅μΌν•œ 것이 μ‚¬μš©μž κ²½ν—˜μ„ ν–₯μƒμ‹œν‚΅λ‹ˆλ‹€.

src/components/calendar/calendar.tsx (11)

9-9: μƒˆλ‘œμš΄ 헬퍼 ν•¨μˆ˜ λ„μž… 확인됨

getWeekNumberISO8601μ—μ„œ getWeekOfMonth둜 λ³€κ²½λœ 것은 월별 μ£Όμ°¨ 계산을 μœ„ν•œ μ μ ˆν•œ κ°œμ„ μž…λ‹ˆλ‹€. ν•œκ΅­μ–΄ λ‘œμΌ€μΌμ—μ„œ "1μ›” 1μ£Ό" ν˜•νƒœλ‘œ ν‘œμ‹œν•˜κΈ° μœ„ν•΄ ν•„μš”ν•œ λ³€κ²½μ‚¬ν•­μž…λ‹ˆλ‹€.


43-60: μ‹œκ°μ  κ°œμ„ μ„ μœ„ν•œ ꡬ쑰 λ³€κ²½

Year viewμ—μ„œ bottom textλ₯Ό <g> νƒœκ·Έλ‘œ κ·Έλ£Ήν™”ν•˜κ³  수직 ꡬ뢄선을 μΆ”κ°€ν•œ 것은 쒋은 κ°œμ„ μž…λ‹ˆλ‹€. textAnchor="middle"κ³Ό alignmentBaseline="middle"둜 ν…μŠ€νŠΈ 정렬도 κ°œμ„ λ˜μ—ˆμŠ΅λ‹ˆλ‹€.


142-159: Month view ꡬ쑰 톡일성 확인

Year view와 λ™μΌν•œ νŒ¨ν„΄μœΌλ‘œ λ³€κ²½λ˜μ–΄ 일관성을 μœ μ§€ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.


199-209: ν•œκ΅­μ–΄ λ‘œμΌ€μΌ 지원 κ΅¬ν˜„

ν•œκ΅­μ–΄ λ‘œμΌ€μΌμ„ μœ„ν•œ λ‚ μ§œ ν¬λ§·νŒ…μ΄ 적절히 κ΅¬ν˜„λ˜μ—ˆμŠ΅λ‹ˆλ‹€:

  • Top label: "2024λ…„ 1μ›”" ν˜•νƒœ
  • Bottom label: "1μ›” 1μ£Ό" ν˜•νƒœ (μƒˆλ‘œμš΄ getWeekOfMonth ν•¨μˆ˜ μ‚¬μš©)

κΈ°μ‘΄ λ‘œμΌ€μΌκ³Όμ˜ ν˜Έν™˜μ„±λ„ μœ μ§€λ˜κ³  μžˆμŠ΅λ‹ˆλ‹€.


212-229: Week view μ‹œκ°μ  κ°œμ„ 

λ‹€λ₯Έ viewλ“€κ³Ό λ™μΌν•œ νŒ¨ν„΄μœΌλ‘œ 수직 ꡬ뢄선과 ν…μŠ€νŠΈ κ·Έλ£Ήν™”κ°€ μ μš©λ˜μ–΄ 일관성을 μœ μ§€ν•©λ‹ˆλ‹€.


261-273: Day view ν•œκ΅­μ–΄ ν¬λ§·νŒ…

ν•œκ΅­μ–΄ λ‘œμΌ€μΌμ—μ„œ "1μ›” 1일 (μ›”)" ν˜•νƒœλ‘œ ν‘œμ‹œν•˜λŠ” 것이 μžμ—°μŠ€λŸ½κ³  μ§κ΄€μ μž…λ‹ˆλ‹€. getLocalDayOfWeek ν•¨μˆ˜λ₯Ό ν™œμš©ν•œ κ΅¬ν˜„λ„ μ μ ˆν•©λ‹ˆλ‹€.


276-293: Day view ꡬ쑰 κ°œμ„ 

λ‹€λ₯Έ viewλ“€κ³Ό λ™μΌν•œ νŒ¨ν„΄μœΌλ‘œ κ΅¬ν˜„λ˜μ–΄ 일관성을 μœ μ§€ν•©λ‹ˆλ‹€.


335-352: PartOfDay view ꡬ쑰 톡일

μ‹œκ°„ ν‘œμ‹œ λΆ€λΆ„μ—μ„œλ„ λ™μΌν•œ μ‹œκ°μ  κ°œμ„  νŒ¨ν„΄μ΄ μ μš©λ˜μ—ˆμŠ΅λ‹ˆλ‹€.


355-369: PartOfDay view ν•œκ΅­μ–΄ 지원

Day view와 λ™μΌν•œ ν•œκ΅­μ–΄ ν¬λ§·νŒ…μ΄ μ μš©λ˜μ–΄ 일관성을 μœ μ§€ν•©λ‹ˆλ‹€.


399-416: Hour view ꡬ쑰 κ°œμ„ 

λ‹€λ₯Έ viewλ“€κ³Ό λ™μΌν•œ νŒ¨ν„΄μœΌλ‘œ κ΅¬ν˜„λ˜μ–΄ 전체적인 일관성을 μœ μ§€ν•©λ‹ˆλ‹€.


420-434: Hour view ν•œκ΅­μ–΄ 지원 및 버그 μˆ˜μ •

ν•œκ΅­μ–΄ λ‘œμΌ€μΌ 지원이 μΆ”κ°€λ˜μ—ˆκ³ , κΈ°μ‘΄ μ½”λ“œμ—μ„œ displayDate λŒ€μ‹  dateλ₯Ό μ‚¬μš©ν•˜λ˜ 뢀뢄이 μˆ˜μ •λ˜μ–΄ 정확성이 κ°œμ„ λ˜μ—ˆμŠ΅λ‹ˆλ‹€. getLocalDayOfWeekμ—μ„œ "long" ν˜•νƒœλ₯Ό μ‚¬μš©ν•˜λŠ” 것도 μ μ ˆν•©λ‹ˆλ‹€.

@jeonghanyun jeonghanyun requested a review from Copilot August 2, 2025 03:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds comprehensive Korean date expression support to the Gantt chart library along with visual improvements including a Jira-style today indicator. The changes enable Korean locale (locale="kor") with appropriate date formatting for all view modes and enhance the visual design with simplified project bars and improved styling.

  • Added Korean date expressions for all ViewMode types (Year, Month, Week, Day, Hour, PartOfDay)
  • Implemented Jira-style today indicator with orange arrow design replacing simple rectangle
  • Simplified project bar design and improved tooltip formatting

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/helpers/date-helper.ts Adds getWeekOfMonth utility function for Korean week-of-month calculation
src/components/calendar/calendar.tsx Implements Korean date formatting logic and visual improvements with separator lines
src/components/grid/grid-body.tsx Replaces today indicator with Jira-style arrow design
src/components/other/tooltip.tsx Improves tooltip format separating task name from date range
src/components/task-item/project/project.tsx Simplifies project bar by removing triangular decorations
src/components/task-item/task-item.tsx Sets consistent fontSize for task labels
example/src/App.tsx Demonstrates Korean locale usage in example application

return new Date(date.setDate(diff));
};

export const getWeekOfMonth = (date: any) => {
Copy link

Copilot AI Aug 2, 2025

Choose a reason for hiding this comment

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

The parameter type should be Date instead of any for better type safety and API consistency with other date helper functions.

Suggested change
export const getWeekOfMonth = (date: any) => {
export const getWeekOfMonth = (date: Date) => {

Copilot uses AI. Check for mistakes.
const startOfMonth = new Date(date.getFullYear(), date.getMonth(), 1);

// μ£Όμ–΄μ§„ λ‚ μ§œμ˜ 첫 번째 μ›”μš”μΌμ„ κ°€μ Έμ˜΅λ‹ˆλ‹€.
const firstMonday: any = new Date(startOfMonth);
Copy link

Copilot AI Aug 2, 2025

Choose a reason for hiding this comment

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

The variable type should be Date instead of any since it's initialized as a Date object.

Suggested change
const firstMonday: any = new Date(startOfMonth);
const firstMonday: Date = new Date(startOfMonth);

Copilot uses AI. Check for mistakes.
Comment on lines 431 to 434
date,
locale,
"long"
)}, ${date.getDate()} ${getLocaleMonth(date, locale)}`;
Copy link

Copilot AI Aug 2, 2025

Choose a reason for hiding this comment

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

This line uses date instead of displayDate which is inconsistent with the Korean version above and the logic that sets displayDate = dates[i - 1]. Should use displayDate for consistency.

Suggested change
date,
locale,
"long"
)}, ${date.getDate()} ${getLocaleMonth(date, locale)}`;
displayDate,
locale,
"long"
)}, ${displayDate.getDate()} ${getLocaleMonth(displayDate, locale)}`;

Copilot uses AI. Check for mistakes.
1. Improved type safety in getWeekOfMonth function
   - Changed parameter type from 'any' to 'Date'
   - Added explicit return type 'number'
   - Fixed date arithmetic to use getTime() for proper type safety

2. Fixed SVG and styling issues in grid-body.tsx
   - Removed ineffective z-index from SVG element
   - Extracted TODAY_ARROW_COLOR constant for maintainability

3. Cleaned up tooltip formatting
   - Removed empty <p> tag and adjusted marginTop to 12px

4. Fixed date reference bug in calendar.tsx
   - Corrected non-Korean locale to use displayDate instead of date
   - Ensures consistent date handling across all locales

πŸ€– Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@jeonghanyun
Copy link
Contributor Author

리뷰 ν”Όλ“œλ°± κ°μ‚¬ν•©λ‹ˆλ‹€! πŸ™

βœ… λͺ¨λ“  지적사항 μˆ˜μ • μ™„λ£Œ

컀밋 394df6bμ—μ„œ λ‹€μŒ 사항듀을 μˆ˜μ •ν–ˆμŠ΅λ‹ˆλ‹€:

1. νƒ€μž… μ•ˆμ „μ„± κ°œμ„  (getWeekOfMonth ν•¨μˆ˜)

-export const getWeekOfMonth = (date: any) => {
+export const getWeekOfMonth = (date: Date): number => {
  // ...
-  const firstMonday: any = new Date(startOfMonth);
+  const firstMonday = new Date(startOfMonth);
  // ...
-  const diffDays = Math.ceil((date - firstMonday) / (24 * 60 * 60 * 1000));
+  const diffDays = Math.ceil((date.getTime() - firstMonday.getTime()) / (24 * 60 * 60 * 1000));

2. SVG 및 μŠ€νƒ€μΌλ§ 이슈 μˆ˜μ • (grid-body.tsx)

  • βœ… SVGμ—μ„œ 효과 μ—†λŠ” z={1000} 속성 제거
  • βœ… TODAY_ARROW_COLOR μƒμˆ˜ μΆ”κ°€λ‘œ μœ μ§€λ³΄μˆ˜μ„± κ°œμ„ 
const TODAY_ARROW_COLOR = "#fea362";

3. 툴팁 포맷 정리 (tooltip.tsx)

  • βœ… λΆˆν•„μš”ν•œ 빈 <p></p> νƒœκ·Έ 제거
  • βœ… marginTop을 12px둜 μ‘°μ •ν•˜μ—¬ λ™μΌν•œ 간격 μœ μ§€

4. λ‚ μ§œ μ°Έμ‘° 버그 μˆ˜μ • (calendar.tsx)

  • βœ… ν•œκ΅­μ–΄κ°€ μ•„λ‹Œ λ‘œμΌ€μΌμ—μ„œ date λŒ€μ‹  displayDate μ‚¬μš©ν•˜λ„λ‘ μˆ˜μ •
  • βœ… λͺ¨λ“  λ‘œμΌ€μΌμ—μ„œ μΌκ΄€λœ λ‚ μ§œ 처리 보μž₯

πŸ“‹ 리뷰 μš”μ•½

총 리뷰 ν”Όλ“œλ°±:

  • CodeRabbitAI: 1개 λ¦¬νŒ©ν† λ§ μ œμ•ˆ + 3개 λ‹ˆνŠΈν”½ μ½”λ©˜νŠΈ
  • Copilot: 3개 μ½”λ“œ κ°œμ„  μ œμ•ˆ

λͺ¨λ“  지적사항이 ν•΄κ²°λ˜μ—ˆμœΌλ‹ˆ 리뷰 μž¬κ²€ν†  λΆ€νƒλ“œλ¦½λ‹ˆλ‹€! πŸš€

ν•œκ΅­μ–΄ λ‚ μ§œ ν‘œν˜„ 지원과 μ‹œκ°μ  κ°œμ„ μ‚¬ν•­μ΄ 잘 κ΅¬ν˜„λ˜μ—ˆμŠ΅λ‹ˆλ‹€:

  • βœ… λͺ¨λ“  ViewModeμ—μ„œ ν•œκ΅­μ–΄ λ‚ μ§œ ν‘œν˜„ 지원
  • βœ… Jira μŠ€νƒ€μΌ Today μ§€μ‹œμž
  • βœ… ν”„λ‘œμ νŠΈ λ°” λ””μžμΈ λ‹¨μˆœν™”
  • βœ… 툴팁 가독성 κ°œμ„ 

@jeonghanyun jeonghanyun merged commit 7cb9a5b into main Aug 2, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants