Displaying Timelines 标志

Displaying Timelines

社区
ancoleman
displaying-timelines

Displays chronological events and activity through timelines, activity feeds, Gantt charts, and calendar interfaces. Use when showing historical events, project schedules, social feeds, notifications, audit logs, or time-based data. Provides implementation patterns for vertical/horizontal timelines, interactive visualizations, real-time updates, and responsive designs with accessibility (WCAG/ARIA).

Add to TypingMind

概览

发布者ancoleman
代码仓库ai-design-components
技能名称displaying-timelines
星标数
525
复刻数
77
附带文件
31
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 31 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 ancoleman 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Displaying Timelines AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/ancoleman/ai-design-components/tree/main/skills/displaying-timelines
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ancoleman/ai-design-components.git /tmp/ai-design-components
mkdir -p .claude/skills
cp -r /tmp/ai-design-components/skills/displaying-timelines .claude/skills/displaying-timelines
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Displaying Timelines,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Displaying Timelines。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Displaying Timelines 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Displaying Timelines & Activity Components

Purpose

This skill enables systematic creation of timeline and activity components, from simple vertical timelines to complex interactive Gantt charts. It provides clear decision frameworks based on use case and data characteristics, ensuring optimal performance, real-time updates, and accessible implementations.

When to Use

Activate this skill when:

  • Creating activity feeds (social, notifications, audit logs)
  • Displaying timelines (vertical, horizontal, interactive)
  • Building Gantt charts or project schedules
  • Implementing calendar interfaces (month, week, day views)
  • Showing chronological events or historical data
  • Handling real-time activity updates
  • Requiring timestamp formatting (relative, absolute)
  • Ensuring timeline accessibility or responsive behavior

Quick Decision Framework

Select component type based on use case:

Social Activity        → Activity Feed (infinite scroll, reactions)
System Events          → Audit Log (searchable, exportable, precise timestamps)
User Notifications     → Notification Feed (read/unread, grouped by date)
Historical Events      → Vertical Timeline (milestones, alternating sides)
Project Planning       → Gantt Chart (dependencies, drag-to-reschedule)
Scheduling             → Calendar Interface (month/week/day views)
Interactive Roadmap    → Horizontal Timeline (zoom, pan, filter)

For detailed selection criteria, reference references/component-selection.md.

Core Implementation Patterns

Activity Feeds

Social Feed Pattern:

  • User avatar + name + action description
  • Relative timestamps ("2 hours ago")
  • Reactions and comments
  • Infinite scroll with pagination
  • Real-time updates via WebSocket
  • Reference references/activity-feeds.md

Notification Feed Pattern:

  • Grouped by date sections
  • Read/unread states with indicators
  • Mark all as read functionality
  • Filter by notification type
  • Action buttons (view, dismiss)
  • Reference references/notification-feeds.md

Audit Log Pattern:

  • System events with precise timestamps
  • User action tracking
  • Searchable with advanced filters
  • Exportable (CSV, JSON)
  • Security-focused display
  • Reference references/audit-logs.md

Example: examples/social-activity-feed.tsx

Timeline Visualizations

Vertical Timeline:

  • Events stacked chronologically
  • Connecting line with marker dots
  • Date markers and event cards
  • Optional alternating sides
  • Best for: Historical events, project milestones
  • Reference references/vertical-timelines.md

Horizontal Timeline:

  • Events along horizontal axis
  • Scroll or zoom to navigate
  • Density varies by zoom level
  • Best for: Project timelines, roadmaps
  • Reference references/horizontal-timelines.md

Interactive Timeline:

  • Click events for detail view
  • Filter by category/type
  • Zoom in/out controls
  • Pan and scroll navigation
  • Best for: Data exploration, rich interactivity
  • Reference references/interactive-timelines.md

Example: examples/milestone-timeline.tsx

Gantt Charts

Project Planning Features:

  • Tasks as horizontal bars
  • Dependencies with arrows
  • Critical path highlighting
  • Drag to reschedule
  • Progress indicators
  • Milestone markers (diamonds)
  • Resource allocation
  • Today marker line
  • Zoom levels (day/week/month/year)

To generate Gantt chart data:

bash
python scripts/generate_gantt_data.py --tasks 50 --dependencies auto

Reference references/gantt-patterns.md for implementation details.

Example: examples/project-gantt.tsx

Calendar Interfaces

Month View:

  • Traditional calendar grid
  • Events in date cells
  • Click to create/edit
  • Color-coded categories
  • Multi-calendar overlay

Week View:

  • Time slots (hourly)
  • Events as draggable blocks
  • Resize to change duration
  • Multiple calendars overlay

Day/Agenda View:

  • Detailed daily schedule
  • List format with time duration
  • Location and attendees
  • Scrollable timeline

Reference references/calendar-patterns.md for all views.

Example: examples/calendar-scheduler.tsx

Timestamp Formatting

Essential timestamp patterns:

Relative (Recent Events):

  • "Just now" (<1 min)
  • "5 minutes ago"
  • "3 hours ago"
  • "Yesterday at 3:42 PM"

Absolute (Older Events):

  • "Jan 15, 2025"
  • "January 15, 2025 at 3:42 PM"
  • ISO 8601 for APIs

Implementation Considerations:

  • Timezone handling (display user's local time)
  • Locale-aware formatting
  • Hover for precise timestamp
  • Auto-update relative times

To format timestamps consistently:

bash
node scripts/format_timestamps.js --locale en-US --timezone auto

Reference references/timestamp-formatting.md for complete patterns.

Real-Time Updates

Live Activity Feed:

  • WebSocket or SSE for new events
  • Smooth insertion animation
  • "X new items" notification banner
  • Click to load new items
  • Optimistic updates for user actions

Implementation Pattern:

  1. Show user action immediately
  2. Update timestamp to "Just now"
  3. Send to server in background
  4. Rollback if error occurs

Reference references/real-time-updates.md for WebSocket patterns.

Example: examples/realtime-activity.tsx

Performance Optimization

Critical performance thresholds:

<100 events       → Client-side rendering, no virtualization
100-1,000 events  → Virtual scrolling recommended
1,000+ events     → Virtual scrolling + server pagination
Real-time         → Debounce updates, batch insertions

Optimization Strategies:

  • Memoize timeline item components
  • Lazy load event details
  • Virtual scrolling for long timelines
  • Debounce real-time updates (batch every 500ms)
  • Optimize timestamp calculations

To benchmark performance:

bash
node scripts/benchmark_timeline.js --events 10000

Reference references/performance-optimization.md for details.

Accessibility Requirements

Essential WCAG compliance:

Semantic HTML:

  • Use <ol> or <ul> for timelines
  • Proper heading hierarchy
  • Semantic time elements

ARIA Patterns:

  • role="feed" for activity feeds
  • role="article" for timeline items
  • aria-label for timestamps
  • aria-busy during loading

Keyboard Navigation:

  • Tab through interactive items
  • Arrow keys for timeline navigation
  • Enter/Space to expand items
  • Skip to latest/oldest controls

Screen Reader Support:

  • Announce new items in feeds
  • Descriptive timestamp labels
  • Progress updates for Gantt charts

To validate accessibility:

bash
node scripts/validate_timeline_accessibility.js

Reference references/accessibility-patterns.md for complete requirements.

Responsive Design

Three proven strategies:

1. Stack Vertically (Mobile)

  • Convert horizontal to vertical
  • Maintain chronological order
  • Adjust spacing and font sizes

2. Simplify Display

  • Show essential info only
  • Expand for details
  • Reduce visual complexity

3. Horizontal Scroll

  • Keep layout intact
  • Enable touch scrolling
  • Add scroll indicators

Reference references/responsive-strategies.md for implementations.

Example: examples/responsive-timeline.tsx

Library Recommendations

Timeline: react-chrono (Flexible)

Best for timeline visualizations with rich content:

  • Horizontal, vertical, alternating layouts
  • Image and video support
  • Custom item rendering
  • TypeScript support
  • Responsive out of the box
bash
npm install react-chrono

See examples/react-chrono-timeline.tsx for setup.

Alternative: react-vertical-timeline-component

  • Simple, clean vertical timelines
  • Lightweight (~10KB)
  • Icon support
  • Good for basic timelines

Gantt Charts: SVAR React Gantt

Best for project management:

  • Modern, dependency-free
  • Drag-and-drop tasks
  • Dependencies and milestones
  • Customizable appearance
  • TypeScript ready
bash
npm install @svar/gantt

Enterprise Alternative: Bryntum Gantt

  • Feature-complete solution
  • Commercial license required
  • Handles complex projects
  • Advanced resource management

Calendar: react-big-calendar

Best for scheduling interfaces:

  • Month, week, day, agenda views
  • Drag-and-drop events
  • Customizable styling
  • Large community support
bash
npm install react-big-calendar

Alternative: FullCalendar

  • Premium features available
  • Excellent documentation
  • Multiple framework support

For detailed comparison, reference references/library-comparison.md.

Design Token Integration

Timelines use the design-tokens skill for consistent theming:

Timeline-Specific Tokens:

  • --timeline-line-color - Connecting line color
  • --timeline-dot-color - Event marker color
  • --timeline-dot-active-color - Current/active event
  • --event-card-bg - Event card background
  • --timestamp-color - Timestamp text

Standard Token Categories:

  • Color tokens for backgrounds and states
  • Spacing tokens for gaps and padding
  • Typography tokens for text hierarchy
  • Shadow tokens for card elevation
  • Motion tokens for animations

Supports light, dark, high-contrast, and custom themes. Reference the design-tokens skill for theme switching.

Working Examples

Start with the example matching the requirements:

social-activity-feed.tsx       # Social feed with reactions
notification-center.tsx        # Notification system with filters
audit-log-viewer.tsx           # System audit log
milestone-timeline.tsx         # Vertical timeline with milestones
project-gantt.tsx              # Gantt chart with dependencies
calendar-scheduler.tsx         # Full calendar with all views
realtime-activity.tsx          # Live updates via WebSocket
responsive-timeline.tsx        # Mobile-optimized timeline

Testing Tools

Generate mock timeline data:

bash
python scripts/generate_timeline_data.py --events 500 --realtime

Test real-time updates:

bash
node scripts/simulate_realtime.js --rate 5/sec --duration 60s

Validate accessibility:

bash
node scripts/validate_timeline_accessibility.js

Benchmark performance:

bash
node scripts/benchmark_timeline.js --events 10000 --virtual

Next Steps

  1. Identify the timeline use case (activity, events, schedule)
  2. Select the appropriate component type
  3. Choose a library or build custom with tokens
  4. Start with the matching example file
  5. Implement core functionality
  6. Add real-time updates if needed
  7. Test performance with large datasets
  8. Validate accessibility compliance
  9. Apply responsive strategy for mobile

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Displaying Timelines AI 技能有什么作用?

Displays chronological events and activity through timelines, activity feeds, Gantt charts, and calendar interfaces. Use when showing historical events, project schedules, social feeds, notifications, audit logs, or time-based data. Provides implementation patterns for vertical/horizontal timelines, interactive visualizations, real-time updates, and responsive designs with accessibility (WCAG/ARIA).

为什么在 TypingMind 中使用 Displaying Timelines?

因为您只需安装一次,就能搭配任何模型使用。Displaying Timelines 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Displaying Timelines?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/ancoleman/ai-design-components/tree/main/skills/displaying-timelines。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Displaying Timelines?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Displaying Timelines 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Displaying Timelines 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Displaying Timelines AI 技能免费吗?

是的。ancoleman 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇