Skip to content

Add update log page with activity heatmap and timeline#351

Merged
ImChong merged 2 commits into
mainfrom
claude/homepage-update-log-page-da309s
Jul 3, 2026
Merged

Add update log page with activity heatmap and timeline#351
ImChong merged 2 commits into
mainfrom
claude/homepage-update-log-page-da309s

Conversation

@ImChong

@ImChong ImChong commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a new "Update Log" page that displays a GitHub-style activity heatmap and day-by-day timeline of paper note additions and maintenance, derived from the repository's git commit history.

Key Changes

  • New page: updates.html — renders an interactive update log with:

    • Statistics (total updates, note count, active days)
    • GitHub-style activity heatmap (53-week window, color-coded by activity level)
    • Filterable day-by-day timeline showing which notes were added vs. maintained
    • Full i18n support (English/Chinese)
    • Responsive design with horizontal scroll on narrow screens
  • Data generation: scripts/generate_updates_data.py — new Python script that:

    • Parses git history (git log --name-status --topo-order) to track note lifecycle
    • Follows file renames and deletions to correctly attribute history to current note paths
    • Generates _data/updates.json with per-day activity and note metadata
    • Includes comprehensive test suite (tests/test_generate_updates_data.py)
  • Styling: ~400 lines of CSS in assets/css/style.css for:

    • Heatmap grid layout (CSS Grid with fluid column sizing)
    • Theme-aware color ramps (VS Code blue for dark theme, arXiv red for light)
    • Timeline with vertical connector line and activity dots
    • Collapsible day sections (fold/unfold for days with >14 updates)
    • Accessible button states and ARIA labels
  • Integration:

    • Homepage link to update log in index.html
    • CI workflow step in .github/workflows/deploy.yml to regenerate data on each deploy
    • Committed snapshot of _data/updates.json for local preview support

Implementation Details

  • Heatmap design: Uses CSS custom properties for level colors; respects theme preference with separate light/dark palettes. Cells are square (aspect-ratio: 1/1) with responsive floor sizing (9px minimum).
  • Git history parsing: Handles renames (R), copies (C), additions (A), modifications (M), and deletions (D) to correctly track notes across path changes. Scans newest→oldest to follow rename chains.
  • Accessibility: Heatmap cells are buttons with proper ARIA labels; timeline uses semantic HTML (sections, lists) with visual timeline connector.
  • Performance: Data embedded as JSON in page; rendering is client-side JavaScript with event delegation for filtering and expand/collapse.

https://claude.ai/code/session_01D6GD1AnohThNNJVohDkrch

claude added 2 commits July 3, 2026 16:51
参考 Robotics_Notebooks 的 change-log 页面,为本站新增 /updates.html:

- scripts/generate_updates_data.py:构建期从 git 历史单遍扫描
  papers/**/*.md(跟随重命名),生成 _data/updates.json ——
  每日「新增 / 维护」笔记清单与标题元数据(取自 papers.json)
- updates.html:GitHub 风格 53 周活跃度热力图(分档取非零日计数
  四分位)+ 按日时间线(新增/维护徽章、分类标注、超长日折叠),
  点击方格筛选当日;随站点主题与中英文切换整体重渲染
- 配色适配本项目并通过顺序色板校验(亮度单调、相邻 ΔL ≥ 0.06、
  最浅档对底色 ≥ 2:1):暗色用 VS Code 蓝,顶档锚定 --link /
  --link-hover(#569cd6 / #9cdcfe);亮色用 arXiv 红,锚定
  #b31b1b / #8b1515
- 主页头部新增「📅 更新记录」入口胶囊链接
- deploy.yml 在 inject_reading_dates 后运行数据生成(复用
  fetch-depth: 0 的完整历史);提交 updates.json 快照以便本地预览

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D6GD1AnohThNNJVohDkrch
hero 原为五行居中堆叠(标题/描述/篇数/⭐️图例/更新记录胶囊),
信息冗余且拥挤:

- 删除与标题近乎重复的描述行
- 篇数与「📅 更新记录」入口合并为一行并排胶囊芯片
- ⭐️ 开源图例移至搜索框上方右对齐小字,紧邻其注释的卡片区
- hero 底部留白 1.5rem → 1.1rem;清理不再使用的
  .subtitle / .index-updates-link / .updates-entry-* 样式

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D6GD1AnohThNNJVohDkrch
@ImChong ImChong merged commit a48ae6b into main Jul 3, 2026
1 check passed
@ImChong ImChong deleted the claude/homepage-update-log-page-da309s branch July 3, 2026 17:34
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