-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add extra columns support with configurable column widths and date formats #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
โฆate formats - Add ExtraColumn interface for custom columns with optional render functions - Add DateFormat type with 'locale' and 'iso8601' options for date formatting - Add nameColumnWidth, fromColumnWidth, toColumnWidth props for configurable column widths - Add extraColumns prop to Task interface for storing additional column data - Update TaskListHeader and TaskListTable components to support extra columns - Add date format selector in example with ISO 8601 (YYYY-MM-DD) support - Export new DateFormat and ExtraColumn types from main index - Add example demonstrating extra columns with status, assignee, priority, and budget - Update README with comprehensive documentation for new features BREAKING CHANGE: Task interface extended with optional extraColumns field
|
Caution Review failedThe pull request is closed. ๐ WalkthroughWalkthrough์ด๋ฒ ๋ณ๊ฒฝ์ Gantt ์ฐจํธ์ ์์ ๋ชฉ๋ก(Task List)์ ์ฌ์ฉ์ ์ ์ ์ปฌ๋ผ(Extra Columns)์ ์ถ๊ฐํ๊ณ , ๊ธฐ๋ณธ ์ปฌ๋ผ์ ๋๋น ๋ฐ ๋ ์ง ํฌ๋งท์ ์ปค์คํฐ๋ง์ด์ฆํ ์ ์๋๋ก ๊ธฐ๋ฅ์ ํ์ฅํฉ๋๋ค. ๊ด๋ จ ํ์ , ์ปดํฌ๋ํธ, ์คํ์ผ, ์์ , ๋ฌธ์๊ฐ ์ถ๊ฐ ๋ฐ ์์ ๋์์ต๋๋ค. Changes
Sequence Diagram(s)sequenceDiagram
participant App
participant ExtraColumnsApp
participant Gantt
participant TaskList
participant TaskListHeader
participant TaskListTable
App->>ExtraColumnsApp: ๋ ๋๋ง
ExtraColumnsApp->>Gantt: tasks, extraColumns, ์ปฌ๋ผ๋๋น, dateFormat ๋ฑ ์ ๋ฌ
Gantt->>TaskList: extraColumns, ์ปฌ๋ผ๋๋น, dateFormat ๋ฑ ์ ๋ฌ
TaskList->>TaskListHeader: extraColumns, ์ปฌ๋ผ๋๋น ์ ๋ฌ
TaskList->>TaskListTable: extraColumns, ์ปฌ๋ผ๋๋น, dateFormat ์ ๋ฌ
TaskListHeader-->>TaskList: ํค๋ ๋ ๋๋ง
TaskListTable-->>TaskList: ํ
์ด๋ธ ๋ ๋๋ง (extraColumns ํฌํจ)
Estimated code review effort๐ฏ 3 (Moderate) | โฑ๏ธ ~20๋ถ Possibly related PRs
Poem
Note โก๏ธ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ๐ Recent review detailsConfiguration used: CodeRabbit UI ๐ Files selected for processing (6)
โจ Finishing Touches
๐งช Generate unit tests
๐ชง TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
๐ Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
โ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
๐ Files selected for processing (12)
README.md(1 hunks)example/src/App.tsx(2 hunks)example/src/ExtraColumnsApp.tsx(1 hunks)example/src/extra-columns-helper.tsx(1 hunks)example/src/index.css(1 hunks)package.json(2 hunks)src/components/gantt/gantt.tsx(2 hunks)src/components/task-list/task-list-header.tsx(4 hunks)src/components/task-list/task-list-table.tsx(6 hunks)src/components/task-list/task-list.tsx(6 hunks)src/index.tsx(1 hunks)src/types/public-types.ts(4 hunks)
๐งฐ Additional context used
๐งฌ Code Graph Analysis (4)
src/components/task-list/task-list.tsx (2)
src/index.tsx (2)
ExtraColumn(6-6)DateFormat(7-7)src/types/public-types.ts (2)
ExtraColumn(16-21)DateFormat(14-14)
src/components/task-list/task-list-header.tsx (3)
src/index.tsx (1)
ExtraColumn(6-6)src/types/public-types.ts (1)
ExtraColumn(16-21)example/src/extra-columns-helper.tsx (1)
extraColumns(117-172)
src/components/task-list/task-list-table.tsx (3)
src/index.tsx (2)
ExtraColumn(6-6)DateFormat(7-7)src/types/public-types.ts (2)
ExtraColumn(16-21)DateFormat(14-14)example/src/extra-columns-helper.tsx (1)
extraColumns(117-172)
src/types/public-types.ts (1)
src/index.tsx (7)
DateFormat(7-7)ExtraColumn(6-6)Task(5-5)GanttProps(4-4)EventOption(10-10)DisplayOption(9-9)StylingOption(8-8)
๐ Additional comments (38)
src/index.tsx (1)
6-7: ์๋ก์ด ํ์ export๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์ถ๊ฐ๋์์ต๋๋ค.
ExtraColumn๊ณผDateFormatํ์ ์ด public API๋ก ์ ์ ํ ๋ ธ์ถ๋์ด ํจํค์ง ์ฌ์ฉ์๋ค์ด ์๋ก์ด ๊ธฐ๋ฅ์ ํ์ฉํ ์ ์๋๋ก ํ์ต๋๋ค.example/src/App.tsx (2)
5-5: ExtraColumnsApp ์ปดํฌ๋ํธ import๊ฐ ์ ์ ํฉ๋๋ค.์๋ก์ด ๊ธฐ๋ฅ์ ์์ฐํ๊ธฐ ์ํ ์ปดํฌ๋ํธ๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ import๋์์ต๋๋ค.
107-107: ExtraColumnsApp ์ปดํฌ๋ํธ๊ฐ ์ ์ ํ ๋ ๋๋ง๋์์ต๋๋ค.๊ธฐ์กด Gantt ์ปดํฌ๋ํธ๋ค ๋ค์์ ์๋ก์ด ๊ธฐ๋ฅ์ ์์ฐํ๋ ์ปดํฌ๋ํธ๊ฐ ๊น๋ํ๊ฒ ์ถ๊ฐ๋์์ต๋๋ค.
src/components/gantt/gantt.tsx (2)
61-65: ์๋ก์ด props๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์ถ๊ฐ๋์์ต๋๋ค.
extraColumns,nameColumnWidth,fromColumnWidth,toColumnWidth,dateFormatprops๊ฐ ์ ์ ํ ๊ธฐ๋ณธ๊ฐ๊ณผ ํจ๊ป ์ถ๊ฐ๋์ด Gantt ์ปดํฌ๋ํธ์ ์ปค์คํฐ๋ง์ด์ง ๊ธฐ๋ฅ์ ํ์ฅํ์ต๋๋ค.dateFormat์ ๊ธฐ๋ณธ๊ฐ "locale"๋ ํฉ๋ฆฌ์ ์ ๋๋ค.
454-458: props๊ฐ TaskList ์ปดํฌ๋ํธ๋ก ์ฌ๋ฐ๋ฅด๊ฒ ์ ๋ฌ๋์์ต๋๋ค.์๋ก์ด props๋ค์ด
tableProps๊ฐ์ฒด๋ฅผ ํตํดTaskList์ปดํฌ๋ํธ๋ก ์ ์ ํ ์ ๋ฌ๋์ด ๊ธฐ๋ฅ์ด ํ์ ์ปดํฌ๋ํธ์์ ํ์ฉ๋ ์ ์๋๋ก ๊ตฌ์ฑ๋์์ต๋๋ค.example/src/index.css (3)
84-94: ๊ธฐ๋ณธ ๋ฐฐ์ง ์คํ์ผ์ด ์ ์ ์๋์์ต๋๋ค.
.status-badge์.priority-badge์ ๋ํ ๊ณตํต ์คํ์ผ์ด ์ผ๊ด์ฑ ์๊ฒ ์ ์๋์ด ์์ผ๋ฉฐ, ํจ๋ฉ, ํ ๋๋ฆฌ ๋ฐ๊ฒฝ, ํฐํธ ์คํ์ผ๋ง ๋ฑ์ด ์ ์ ํฉ๋๋ค.
96-112: ์ํ ๋ฐฐ์ง ์คํ์ผ์ด ์ง๊ด์ ์ผ๋ก ๊ตฌ์ฑ๋์์ต๋๋ค.๊ฐ ์ํ๋ณ๋ก ์ ์ ํ ์์์ด ์ฌ์ฉ๋์๊ณ ,
.status-pending์์ ๊ฐ๋ ์ฑ์ ์ํด ํ ์คํธ ์์์ ์กฐ์ ํ ์ ์ด ์ข์ต๋๋ค.
114-130: ์ฐ์ ์์ ๋ฐฐ์ง ์คํ์ผ์ด ์ฒด๊ณ์ ์ผ๋ก ์ ์๋์์ต๋๋ค.์ฐ์ ์์๋ณ๋ก ๊ตฌ๋ถ๋๋ ์์ ์ฒด๊ณ๊ฐ ์ ๊ตฌ์ฑ๋์ด ์์ผ๋ฉฐ,
.priority-medium์์ ๋๋น๋ฅผ ๊ณ ๋ คํ ํ ์คํธ ์์ ์กฐ์ ์ด ์ ๊ทผ์ฑ ์ธก๋ฉด์์ ๋ฐ๋์งํฉ๋๋ค.package.json (2)
2-10: ํจํค์ง ๋ฉํ๋ฐ์ดํฐ๊ฐ ํ๊ตญ์ด ๋ฒ์ ์ ๋ง๊ฒ ์ฌ๋ฐ๋ฅด๊ฒ ์ ๋ฐ์ดํธ๋์์ต๋๋ค.ํจํค์ง ์ด๋ฆ, ๋ฒ์ , ์ค๋ช , ์์ฑ์, ํํ์ด์ง, ์ ์ฅ์ URL์ด ํ๊ตญ์ด ๋ฒ์ ์ ๋ง๊ฒ ์ ์ ํ ์์ ๋์์ต๋๋ค. ๋ฒ์ 1.1.0์ผ๋ก์ ์ ๋ฐ์ดํธ๋ ์๋ก์ด ๊ธฐ๋ฅ ์ถ๊ฐ์ ์ ํฉํฉ๋๋ค.
28-30: ํค์๋์ ํ๊ตญ์ด ๊ด๋ จ ํ๊ทธ๊ฐ ์ ์ ํ ์ถ๊ฐ๋์์ต๋๋ค."korean"๊ณผ "ํ๊ตญ์ด" ํค์๋๊ฐ ์ถ๊ฐ๋์ด ํ๊ตญ์ด ์ฌ์ฉ์๋ค์ด ํจํค์ง๋ฅผ ๋ ์ฝ๊ฒ ์ฐพ์ ์ ์๋๋ก ๊ฐ์ ๋์์ต๋๋ค.
src/components/task-list/task-list-header.tsx (5)
3-3: ExtraColumn ํ์ import๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์ถ๊ฐ๋์์ต๋๋ค.์๋ก์ด ๊ธฐ๋ฅ์ ์ํ ํ์ import๊ฐ ์ ์ ํ ์ถ๊ฐ๋์์ต๋๋ค.
10-13: ์๋ก์ด props ์ ์๊ฐ ์ ๊ตฌ์ฑ๋์์ต๋๋ค.extraColumns์ ์ปฌ๋ผ ๋๋น ์ค์ ์ ์ํ ์ ํ์ props๋ค์ด ๋ช ํํ๊ฒ ์ ์๋์์ต๋๋ค. ๋ชจ๋ optional๋ก ์ค์ ๋์ด ๊ธฐ์กด ์ฝ๋์์ ํ์ ํธํ์ฑ์ ๋ณด์ฅํฉ๋๋ค.
19-22: Props ๊ตฌ์กฐ๋ถํดํ ๋น์ด ์ ์ ํฉ๋๋ค.extraColumns์ ๋น ๋ฐฐ์ด์ ๊ธฐ๋ณธ๊ฐ์ผ๋ก ์ค์ ํ ๊ฒ์ด ์ข์ ๋ฐฉ์ด์ ํ๋ก๊ทธ๋๋ฐ ๊ดํ์ ๋๋ค. undefined ์ฒดํฌ ์์ด ์์ ํ๊ฒ map ํจ์๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค.
41-41: ์ปฌ๋ผ ๋๋น fallback ๋ก์ง์ด ์ฌ๋ฐ๋ฆ ๋๋ค.์ปค์คํ ๋๋น๊ฐ ์ ๊ณต๋์ง ์์ ๋ ๊ธฐ๋ณธ rowWidth๋ก fallbackํ๋ ๋ก์ง์ด ์ ์ ํ๊ฒ ๊ตฌํ๋์์ต๋๋ค. ๊ธฐ์กด ๋์์ ์ ์งํ๋ฉด์ ์๋ก์ด ๊ธฐ๋ฅ์ ์ถ๊ฐํ์ต๋๋ค.
Also applies to: 56-56, 71-71
76-95: Extra columns ๋ ๋๋ง ๋ก์ง์ด ์ ๊ตฌํ๋์์ต๋๋ค.๋ค์๊ณผ ๊ฐ์ ์ข์ ์ค์ฒ ์ฌํญ๋ค์ด ์ ์ฉ๋์์ต๋๋ค:
- React.Fragment๋ฅผ ์ฌ์ฉํ์ฌ ๋ถํ์ํ DOM ์์ ์์ฑ ๋ฐฉ์ง
- ๊ณ ์ ํ key prop ์ฌ์ฉ (column.key)
- ๊ธฐ์กด ์คํ์ผ๊ณผ ์ผ๊ด์ฑ ์๋ ๊ตฌ์กฐ (separator + header item)
- ์ปฌ๋ผ ๋๋น fallback ๋ก์ง ์ ์ฉ
README.md (1)
147-246: Extra Columns ์ง์์ ๋ํ ๋ฌธ์ํ๊ฐ ํ๋ฅญํฉ๋๋ค.์๋กญ๊ฒ ์ถ๊ฐ๋ "Extra Columns Support" ์น์ ์ด ๋งค์ฐ ํฌ๊ด์ ์ด๊ณ ์ ๊ตฌ์ฑ๋์ด ์์ต๋๋ค:
- ์ค์ฉ์ ์ธ ์ฝ๋ ์์ ์ ํจ๊ป ๊ธฐ๋ฅ ์ฌ์ฉ๋ฒ์ ๋ช ํํ๊ฒ ์ค๋ช
- ExtraColumn ์ธํฐํ์ด์ค์ ๋ชจ๋ ์์ฑ์ ํ๋ก ์ ๋ฆฌํ์ฌ ์ดํดํ๊ธฐ ์ฌ์
- ์ปฌ๋ผ ๋๋น ์ค์ ๊ณผ ๋ ์ง ํ์ ์ต์ ์ ๋ํ ์์ธํ ์ค๋ช ์ ๊ณต
- ํ์ ํ๋๊ฐ ์ ์ ํ ํ์๋จ (*Required ๋งํน)
- ์ค์ ๊ตฌํ๊ณผ ์ผ์นํ๋ ์์ ์ฝ๋
์ด ๋ฌธ์๋ ๊ฐ๋ฐ์๋ค์ด ์๋ก์ด ๊ธฐ๋ฅ์ ํจ๊ณผ์ ์ผ๋ก ํ์ฉํ ์ ์๋๋ก ๋์์ ์ค ๊ฒ์ ๋๋ค.
example/src/ExtraColumnsApp.tsx (5)
1-11: ์ปดํฌ๋ํธ ์ด๊ธฐํ์ ์ํ ๊ด๋ฆฌ๊ฐ ์ ์ ํฉ๋๋ค.React hooks๋ฅผ ์ฌ์ฉํ ์ํ ๊ด๋ฆฌ๊ฐ ๊น๋ํ๊ฒ ๊ตฌํ๋์์ต๋๋ค. ํ์ํ ๋ชจ๋ ์์กด์ฑ์ด ์ฌ๋ฐ๋ฅด๊ฒ import๋์๊ณ , ์ด๊ธฐ ์ํ๊ฐ๋ค์ด ์ ์ ํ ์ค์ ๋์์ต๋๋ค.
13-20: ๋ทฐ ๋ชจ๋์ ๋ฐ๋ฅธ ์ปฌ๋ผ ๋๋น ๋์ ์กฐ์ ์ด ์ ๊ตฌํ๋์์ต๋๋ค.๊ฐ ViewMode์ ๋ง๋ ์ ์ ํ ์ปฌ๋ผ ๋๋น๋ฅผ ์ค์ ํ์ฌ ์ฌ์ฉ์ ๊ฒฝํ์ ํฅ์์์ผฐ์ต๋๋ค. ์กฐ๊ฑด๋ฌธ์ด ๋ช ํํ๊ณ ์ดํดํ๊ธฐ ์ฝ์ต๋๋ค.
27-45: ์ฌ์ฉ์ ์ธํฐํ์ด์ค ์ปจํธ๋กค์ด ์ง๊ด์ ์ ๋๋ค.ViewSwitcher์ DateFormat ์ ํ๊ธฐ๊ฐ ์ ๋ฐฐ์น๋์๊ณ , ์ฌ์ฉ์๊ฐ ์ฝ๊ฒ ๊ธฐ๋ฅ์ ํ ์คํธํ ์ ์๋๋ก ๊ตฌ์ฑ๋์์ต๋๋ค. ์คํ์ผ๋ง๋ ๊น๋ํ๊ฒ ์ฒ๋ฆฌ๋์์ต๋๋ค.
48-79: Gantt ์ปดํฌ๋ํธ ์ค์ ์ด ํฌ๊ด์ ์ ๋๋ค.์๋ก์ด ๊ธฐ๋ฅ๋ค(extraColumns, ์ปค์คํ ๋๋น, dateFormat)์ด ๋ชจ๋ ์ ์ ํ ์ค์ ๋์๊ณ , ์ด๋ฒคํธ ํธ๋ค๋ฌ๋ค์ด ์ ์๋ฏธํ ํผ๋๋ฐฑ์ ์ ๊ณตํฉ๋๋ค. ํนํ ์ญ์ ํ์ธ ๋ค์ด์ผ๋ก๊ทธ๋ ์ข์ UX ๊ดํ์ ๋๋ค.
82-104: ๊ต์ก์ ์ฝํ ์ธ ๊ฐ ๋งค์ฐ ์ ์ฉํฉ๋๋ค.๊ธฐ๋ฅ ์ค๋ช ๊ณผ ์ฌ์ฉ๋ฒ ๊ฐ์ด๋๊ฐ ๋ช ํํ๊ณ ํฌ๊ด์ ์ ๋๋ค. ๊ฐ๋ฐ์๋ค์ด ์๋ก์ด ๊ธฐ๋ฅ์ ์ดํดํ๊ณ ๊ตฌํํ๋ ๋ฐ ํฐ ๋์์ด ๋ ๊ฒ์ ๋๋ค.
example/src/extra-columns-helper.tsx (2)
4-115: ์ํ ๋ฐ์ดํฐ๊ฐ ์ ๊ตฌ์ฑ๋์์ต๋๋ค.๋ค์ํ ์์ ์ ํ(project, task, milestone)๊ณผ ํ์ค์ ์ธ ํ๋ก์ ํธ ๊ด๋ฆฌ ๋ฐ์ดํฐ๋ฅผ ํฌํจํ comprehensiveํ ์ํ์ด ์ ๊ณต๋์์ต๋๋ค. extraColumns ๋ฐ์ดํฐ๋ ๋ค์ํ ๋ฐ์ดํฐ ํ์ ๊ณผ ์ํ๋ฅผ ์ ๋ณด์ฌ์ค๋๋ค.
117-172: ExtraColumn ์ค์ ์ด ํ๋ฅญํฉ๋๋ค.์ปค์คํ ๋ ๋ ํจ์๋ค์ด ์ ๊ตฌํ๋์์ต๋๋ค:
- ์ํ์ ์ฐ์ ์์์ ๋ํ ์คํ์ผ๋ง๋ ๋ฐฐ์ง
- ์์ฐ ํฌ๋งทํ ๋ก์ง (0 ์ดํ์ผ ๋ "-" ํ์)
- ๊ฐ ์ปฌ๋ผ์ ์ ์ ํ ๋๋น ์ค์
- ํ์ ์์ ์ฑ์ ์ํ ์ ์ ํ ํ์ ์บ์คํ
์ด๋ ๊ฐ๋ฐ์๋ค์ด ์ปค์คํ ๋ ๋๋ง์ ๊ตฌํํ๋ ์ข์ ์์๊ฐ ๋ฉ๋๋ค.
src/components/task-list/task-list.tsx (3)
3-3: ํ์ import๊ฐ ์ ์ ํ ์ถ๊ฐ๋์์ต๋๋ค.ExtraColumn๊ณผ DateFormat ํ์ ์ด ์ฌ๋ฐ๋ฅธ ๊ฒฝ๋ก์์ import๋์์ต๋๋ค.
20-24: Props ์ธํฐํ์ด์ค ํ์ฅ์ด ์ ๊ตฌํ๋์์ต๋๋ค.์๋ก์ด props๋ค์ด ๋ชจ๋ optional๋ก ์ ์๋์ด ๊ธฐ์กด ์ฝ๋์์ ํ์ ํธํ์ฑ์ ๋ณด์ฅํฉ๋๋ค. TaskListHeader์ TaskListTable์ ํ์ ์ ์๋ ์ผ๊ด์ฑ ์๊ฒ ์ ๋ฐ์ดํธ๋์์ต๋๋ค.
Also applies to: 30-33, 45-49
68-72: Props ์ ๋ฌ ๋ก์ง์ด ์ฌ๋ฐ๋ฆ ๋๋ค.์๋ก์ด props๋ค์ด ์ปดํฌ๋ํธ์์ ์ ์ ํ ๊ตฌ์กฐ๋ถํดํ ๋น๋๊ณ , headerProps์ tableProps๋ฅผ ํตํด ์์ ์ปดํฌ๋ํธ๋ค์๊ฒ ์ ํํ ์ ๋ฌ๋ฉ๋๋ค. ์ฝ๋๊ฐ ๊น๋ํ๊ณ ์ดํดํ๊ธฐ ์ฝ์ต๋๋ค.
Also applies to: 88-91, 104-108
src/components/task-list/task-list-table.tsx (7)
3-3: ์๋ก์ด ํ์ ์ํฌํธ๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์ถ๊ฐ๋์์ต๋๋ค.
ExtraColumn๊ณผDateFormatํ์ ์ด ์ฌ๋ฐ๋ฅด๊ฒ ์ํฌํธ๋์ด ์ปดํฌ๋ํธ์์ ์ฌ์ฉ๋๊ณ ์์ต๋๋ค.
18-20: ISO ๋ ์ง ํฌ๋งท ํจ์๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ๊ตฌํ๋์์ต๋๋ค.
toISODateStringํจ์๊ฐ Date ๊ฐ์ฒด๋ฅผ yyyy-MM-dd ํ์์ผ๋ก ๋ณํํ๋ ๋ก์ง์ด ์ ํํฉ๋๋ค.
39-43: ์๋ก์ด props๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์ ์๋์์ต๋๋ค.์ถ๊ฐ ์ปฌ๋ผ๊ณผ ์ปฌ๋ผ ๋๋น, ๋ ์ง ํฌ๋งท์ ์ํ props๊ฐ ์ ์ ํ ํ์ ๊ณผ ๊ธฐ๋ณธ๊ฐ์ผ๋ก ์ ์๋์ด ์์ต๋๋ค. ๊ธฐ๋ณธ๊ฐ ์ค์ ์ผ๋ก ํ์ ํธํ์ฑ๋ ์ ์ง๋ฉ๋๋ค.
Also applies to: 52-56
63-68: ๋ ์ง ํฌ๋งทํ ๋ก์ง์ด ํจ์จ์ ์ผ๋ก ๊ตฌํ๋์์ต๋๋ค.
useMemo๋ฅผ ์ฌ์ฉํ์ฌdateFormatprop์ ๋ฐ๋ผ ์ ์ ํ ํฌ๋งทํ ํจ์๋ฅผ ์ ํํ๋ ๋ก์ง์ด ์ฌ๋ฐ๋ฅด๋ฉฐ, ์ฑ๋ฅ ์ต์ ํ๋ ์ ๋์ด ์์ต๋๋ค.
95-96: ์ปฌ๋ผ ๋๋น ์ปค์คํฐ๋ง์ด์ง์ด ์ฌ๋ฐ๋ฅด๊ฒ ๊ตฌํ๋์์ต๋๋ค.๊ธฐ๋ณธ ์ปฌ๋ผ๋ค(์ด๋ฆ, ์์์ผ, ์ข ๋ฃ์ผ)์ ๋ํด ์ฌ์ฉ์ ์ ์ ๋๋น๋ฅผ ์ง์ํ๋ฉด์ ๊ธฐ๋ณธ๊ฐ์ผ๋ก์ fallback๋ ์ ์ ํ ์ฒ๋ฆฌ๋์์ต๋๋ค.
Also applies to: 117-118, 126-127
121-121: ๋ ์ง ํฌ๋งทํ ์ ์ฉ์ด ์ผ๊ด๋๊ฒ ๊ตฌํ๋์์ต๋๋ค.์์์ผ๊ณผ ์ข ๋ฃ์ผ ๋ชจ๋์ ์๋ก์ด
formatDateํจ์๊ฐ ์ผ๊ด๋๊ฒ ์ ์ฉ๋์ด ์ฌ์ฉ์๊ฐ ์ ํํ ๋ ์ง ํฌ๋งท์ผ๋ก ํ์๋ฉ๋๋ค.Also applies to: 130-130
132-148: ์ถ๊ฐ ์ปฌ๋ผ ๋ ๋๋ง ๋ก์ง์ด ์ ์ฐํ๊ณ ์์ ํ๊ฒ ๊ตฌํ๋์์ต๋๋ค.์ฌ์ฉ์ ์ ์ ๋ ๋ ํจ์์ ๊ธฐ๋ณธ ๋ฌธ์์ด ํ์๋ฅผ ๋ชจ๋ ์ง์ํ๋ฉฐ, ์ต์ ๋ ์ฒด์ด๋์ผ๋ก ์์ ํ ๋ฐ์ดํฐ ์ ๊ทผ์ด ๋ณด์ฅ๋๊ณ , title ์์ฑ ์ฒ๋ฆฌ๋ ์ ์ ํฉ๋๋ค.
src/types/public-types.ts (5)
14-14: DateFormat ํ์ ์ด ๋ช ํํ๊ฒ ์ ์๋์์ต๋๋ค.๋ ๊ฐ์ง ๋ ์ง ํฌ๋งท ์ต์ ์ ์ ๋์จ ํ์ ์ผ๋ก ์ ์ํ์ฌ ํ์ ์์ ์ฑ์ ์ ๊ณตํฉ๋๋ค.
16-21: ExtraColumn ์ธํฐํ์ด์ค๊ฐ ์ ์ฐํ๊ณ ์์ ํ๊ฒ ์ค๊ณ๋์์ต๋๋ค.ํ์ ํ๋(key, title)์ ์ ํ์ ํ๋(width, render)์ ์กฐํฉ์ด ๋ค์ํ ์ฌ์ฉ ์ฌ๋ก๋ฅผ ์ง์ํ ์ ์๋๋ก ์ ์ค๊ณ๋์์ต๋๋ค.
43-46: Task ์ธํฐํ์ด์ค ํ์ฅ์ด ์ ์ ํ๊ฒ ๊ตฌํ๋์์ต๋๋ค.
extraColumns์์ฑ์ด ์ ํ์ ์ผ๋ก ์ ์๋์ด ํ์ ํธํ์ฑ์ ์ ์งํ๋ฉฐ, key-value ๊ตฌ์กฐ๋ก ์ ์ฐํ ๋ฐ์ดํฐ ์ ์ฅ์ด ๊ฐ๋ฅํฉ๋๋ค. JSDoc ์ฃผ์๋ ๋ช ํํฉ๋๋ค.
139-142: StylingOption ์ธํฐํ์ด์ค ์ ๋ฐ์ดํธ๊ฐ ์ผ๊ด๋๊ฒ ์ ์ฉ๋์์ต๋๋ค.TaskListHeader์ TaskListTable ์ปดํฌ๋ํธ props๊ฐ ์ผ๊ด๋๊ฒ ์ ๋ฐ์ดํธ๋์์ผ๋ฉฐ, dateFormat์ ํ ์ด๋ธ์๋ง ์ ์ ํ ์ถ๊ฐ๋์์ต๋๋ค. ๋ชจ๋ props๊ฐ ์ ํ์ ์ผ๋ก ์ ์๋์ด ํ์ ํธํ์ฑ์ ์ ์งํฉ๋๋ค.
Also applies to: 157-161
167-186: GanttProps ์ธํฐํ์ด์ค ํ์ฅ์ด ์ ๋ฌธ์ํ๋์ด ๊ตฌํ๋์์ต๋๋ค.์๋ก์ด props๋ค์ด ๋ช ํํ JSDoc ์ฃผ์๊ณผ ํจ๊ป ์ถ๊ฐ๋์์ผ๋ฉฐ, ๋ชจ๋ props๊ฐ ์ ํ์ ์ผ๋ก ์ ์๋์ด ๊ธฐ์กด ์ฝ๋์์ ํธํ์ฑ์ ์ ์งํฉ๋๋ค.
Changed import path in extra-columns-helper.tsx from '../../dist/types/public-types' to '../../src/types/public-types' to reference source code directly instead of build output, as recommended in code review. ๐ค Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
๋ฆฌ๋ทฐ ํผ๋๋ฐฑ ๊ฐ์ฌํฉ๋๋ค! ๐โ ์์ ์๋ฃ: Import ๊ฒฝ๋ก ๋ฌธ์ ์ง์ ์ฌํญ: ํด๊ฒฐ: ์ปค๋ฐ c631ff4์์ import ๊ฒฝ๋ก๋ฅผ ์์ค ์ฝ๋๋ฅผ ์ง์ ์ฐธ์กฐํ๋๋ก ์์ ํ์ต๋๋ค: -import { Task, ExtraColumn } from "../../dist/types/public-types";
+import { Task, ExtraColumn } from "../../src/types/public-types";๐ ์ ์ฒด ๋ฆฌ๋ทฐ ์๋ต ์์ฝ์ด 38๊ฐ์ ๊ธ์ ์ ์ธ ํผ๋๋ฐฑ์ ๋ฐ์์ผ๋ฉฐ, ์ฃผ์ ์ฌํญ๋ค์ ํ์ธํ์ต๋๋ค:
**1๊ฐ์ ์ค์ํ ์ด์ (Import ๊ฒฝ๋ก ๋ฌธ์ )**๋ง ๋ฐ๊ฒฌ๋์ด ์ฆ์ ์์ ํ์ต๋๋ค. ๋ชจ๋ ์ง์ ์ฌํญ์ด ํด๊ฒฐ๋์์ผ๋ ๋ฆฌ๋ทฐ ์ฌ๊ฒํ ๋ถํ๋๋ฆฝ๋๋ค! ๐ |
๐ Extra Columns Support Feature
์ด PR์ MaTeMaTuK/gantt-task-react PR #274์ "Add extra column support" ๊ธฐ๋ฅ์ ํ๊ตญ์ด ๋ฒ์ ์ ์ ์ฉํ ๊ฒ์ ๋๋ค.
โจ ์ฃผ์ ๊ธฐ๋ฅ
๐ Extra Columns
๐จ ์ปฌ๋ผ ๋๋น ์ค์
nameColumnWidth: ์ด๋ฆ ์ปฌ๋ผ ๋๋น ์ค์ fromColumnWidth: ์์์ผ ์ปฌ๋ผ ๋๋น ์ค์ toColumnWidth: ์ข ๋ฃ์ผ ์ปฌ๋ผ ๋๋น ์ค์ ๐ ๋ ์ง ํ์ ์ ํ
"locale" | "iso8601"๐ง ์ฌ์ฉ ์์
๐ ๋ณ๊ฒฝ๋ ํ์ผ๋ค
Core Files
src/types/public-types.ts: ExtraColumn, DateFormat ํ์ ์ถ๊ฐsrc/components/gantt/gantt.tsx: ์๋ก์ด props ์ง์src/components/task-list/: ํค๋ ๋ฐ ํ ์ด๋ธ ์ปฌ๋ผ ์ง์โ ํ ์คํธ
๐ฆ npm ํจํค์ง
์ด ๊ธฐ๋ฅ์ผ๋ก Gantt Chart์์ ๋์ฑ ํ๋ถํ ์ ๋ณด๋ฅผ ํ์ํ ์ ์๊ฒ ๋์์ต๋๋ค! ๐
Summary by CodeRabbit
์๋ก์ด ๊ธฐ๋ฅ
๋ฌธ์ํ
์คํ์ผ
์์
ํจํค์ง
ํ์