Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

Add Airtable-style timeline component with vertical, horizontal, and Gantt variants - #18

Merged
huangyiirene merged 14 commits into
mainfrom
copilot/add-timeline-component
Jan 14, 2026
Merged

huangyiirene merged 14 commits into
mainfrom
copilot/add-timeline-component

Conversation

Copilot AI commented Jan 13, 2026 •

Copy link
Copy Markdown
Contributor

Timeline Component Implementation

  • Create base UI timeline component in packages/components/src/ui/timeline.tsx
    • Vertical timeline components (Timeline, TimelineItem, TimelineMarker, etc.)
    • Horizontal timeline components
    • Gantt/Airtable-style components (TimelineGantt, TimelineGanttBar, etc.)
  • Create timeline renderer in packages/components/src/renderers/complex/timeline.tsx
    • Support for 3 variants: vertical, horizontal, gantt
    • Date formatting options (short, long, ISO)
    • Time scale support (day/week/month) for Gantt view
    • Row-based grouping for Gantt view
    • Interactive bars with click handlers
    • Automatic date range calculation
    • Color variants (default, success, warning, danger, info)
  • Register timeline component in packages/components/src/renderers/complex/index.ts
  • Build and verify the changes work correctly
  • Create comprehensive examples in prototype app showcasing all 3 timeline variants
  • Test and screenshot the timeline component
  • Add test coverage for timeline component registration
  • Create comprehensive documentation (TIMELINE.md)
  • Address code review feedback
    • Extract date range calculation into separate helper function
    • Replace magic number with named constant (MILLISECONDS_PER_WEEK)
    • Remove unnecessary empty string from cn() call
  • Merge from main branch and resolve conflicts
  • All tests passing (11/11 component tests, all packages passing)

Timeline Component Features

🎯 Three Variants

  1. Vertical Timeline - Classic milestone-style timeline with icons and colored markers
  2. Horizontal Timeline - Roadmap-style timeline for quarterly/period displays
  3. Gantt Timeline - Full Airtable-style timeline with:
    • Date-based positioning
    • Multiple row/track support
    • Interactive bars with hover/click
    • Auto-calculated date ranges
    • Configurable time scales (day/week/month)

🎨 Fully Customizable

  • 5 color variants: default, success, warning, danger, info
  • Custom icons and emojis support
  • Tailwind CSS classes for styling
  • Date format options (short/long/ISO)
  • Interactive item click handlers
  • Custom content support via schemas

📦 Production Ready

  • ✅ Built with TypeScript
  • ✅ Full type safety
  • ✅ Test coverage included (11/11 tests passing)
  • ✅ Comprehensive documentation
  • ✅ Working examples in prototype
  • ✅ All builds passing
  • ✅ Code review feedback addressed
  • ✅ Merged with latest main branch

Test Results

All tests passing successfully:

  • Core Package: 1/1 tests passing
  • React Package: 2/2 tests passing
  • Components Package: 11/11 tests passing (includes timeline test)
  • Designer Package: 6/6 tests passing

Screenshot

Timeline Component

The screenshot shows all three timeline variants in action:

  • ✅ Vertical timeline with project milestones
  • ✅ Horizontal timeline with quarterly roadmap
  • ✅ Gantt-style timeline with multi-track project tasks

Documentation

Full documentation is available in TIMELINE.md including:

  • Usage examples for all variants
  • Complete prop documentation
  • Advanced usage patterns
  • Custom styling examples
  • Interactive item handling
Original prompt

新建一个功能完整的类似AirTable的timeline组件


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 14, 2026 00:06
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
@huangyiirene
huangyiirene requested a review from Copilot January 14, 2026 00:10

Copilot AI 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.

Pull request overview

This PR implements a comprehensive timeline component inspired by Airtable, providing three distinct visualization styles for displaying temporal data through a schema-driven approach.

Changes:

  • Added a new timeline UI component with support for vertical, horizontal, and Gantt-style layouts
  • Created a timeline renderer that integrates with the Object UI schema system
  • Added comprehensive examples in the prototype app demonstrating all three timeline variants

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/components/src/ui/timeline.tsx Implements base UI components for all three timeline variants (vertical, horizontal, and Gantt-style) using Shadcn/Tailwind patterns
packages/components/src/ui/index.ts Exports the new timeline components for consumption
packages/components/src/renderers/complex/timeline.tsx Provides the schema-driven renderer with date calculations, formatting, and interactive features
packages/components/src/renderers/complex/index.ts Registers the timeline renderer in the component registry
examples/prototype/src/App.tsx Adds example schemas demonstrating vertical, horizontal, and Gantt timeline variants

Copilot AI and others added 2 commits January 14, 2026 00:11
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Copilot AI changed the title [WIP] Add complete timeline component similar to AirTable Add Airtable-style timeline component with vertical, horizontal, and Gantt variants Jan 14, 2026
Copilot AI requested a review from huangyiirene January 14, 2026 00:37
@huangyiirene

Copy link
Copy Markdown
Collaborator

@copilot 审查所有代码并完成测试

@huangyiirene

Copy link
Copy Markdown
Collaborator

@copilot 审查并修正所有代码并完成测试

@hotlong

hotlong commented Jan 14, 2026

Copy link
Copy Markdown
Contributor

@copilot 从主分支更新最新代码审查修改的代码并完全所有测试

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>

Copilot AI commented Jan 14, 2026

Copy link
Copy Markdown
Contributor Author

@copilot 从主分支更新最新代码审查修改的代码并完全所有测试

已完成代码审查和测试工作 (Completed code review and testing):

✅ 成功合并主分支最新代码 (Successfully merged latest code from main branch)
✅ 解决了合并冲突 (Resolved merge conflicts in packages/components/src/renderers/complex/index.ts)
✅ 所有测试通过 (All tests passing):

  • Core: 1/1 tests ✓
  • React: 2/2 tests ✓
  • Components: 11/11 tests ✓ (包括timeline组件测试)
  • Designer: 6/6 tests ✓
    ✅ 所有构建成功 (All builds successful)
    ✅ Timeline组件的三种变体全部正常工作 (All three timeline variants working correctly)

最新提交 (Latest commit): 9ea3f6a

Copilot AI requested a review from hotlong January 14, 2026 01:18
This was referenced Sep 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants