Skip to content

feat: add track (議程軌) row pinning#239

Open
rileychh wants to merge 2 commits into
session-track-modefrom
session-track-pinning
Open

feat: add track (議程軌) row pinning#239
rileychh wants to merge 2 commits into
session-track-modefrom
session-track-pinning

Conversation

@rileychh

@rileychh rileychh commented Jul 1, 2026

Copy link
Copy Markdown
Member

依 Figma 新設計為桌面版「議程軌(社群)模式」議程表加入議程軌釘選(pin)功能,並預設釘選主議程。此為 #238 的後續,基底為 session-track-mode 分支。

變更內容

  • 議程軌欄的釘選圖示改為可互動的切換按鈕(取代原本的靜態圖示),點擊即釘選/取消釘選該議程軌。
  • 預設釘選「主議程」(Main Session Track);以議程軌名稱比對(同時支援中英文名稱),不綁定會變動的 Pretalx track id。
  • 釘選的議程軌移至列表頂端;釘選群組依「釘選順序」排列,後釘選者排在最後。
  • 每個議程軌的顏色依 track id 順序固定,不受釘選重新排序影響。
  • 釘選狀態以 localStorage 保存並跨重新載入;區分「從未造訪」(預設釘選主議程)與「使用者取消全部釘選」(保留空清單)。
  • 釘選列樣式依 Figma:藍色左側強調條(4px #3b82f6)、blue-50 底色、藍色軌名/教室代碼、填色釘選按鈕;未釘選列維持預設中性樣式。
  • 釘選按鈕 hover 顯示 pointer 游標。

Summary by CodeRabbit

  • New Features

    • Added per-track pinning in the session track table, letting users keep important tracks at the top.
    • Track pin state is now saved between visits, so pinned tracks persist across sessions.
    • The main session track is automatically pinned on first visit.
  • UI Improvements

    • Pinned tracks now have clearer visual emphasis.
    • The pin control is now interactive, with updated labels for better accessibility.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ed386962-f235-41fd-864c-6d1d4817ab50

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch session-track-pinning

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/components/feature/CpSessionTrackTable.vue`:
- Around line 134-140: The first-visit default pin in CpSessionTrackTable is
being derived from the current day-filtered tracks list, so it can save an empty
pinned state before the main track appears. Update the initialization logic in
the watch(tracks, ...) block to use an event-wide track source instead of
tracks.value when choosing the default main track, so the initial pinnedKeys is
set correctly regardless of selectedDay changes. Keep the persisted
coscup-pinned-tracks behavior, but make the default selection independent of the
first loaded day.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4d796b97-e92f-4ea5-b51a-783e8f23f009

📥 Commits

Reviewing files that changed from the base of the PR and between 23b12d1 and 526ba78.

📒 Files selected for processing (1)
  • app/components/feature/CpSessionTrackTable.vue

Comment thread app/components/feature/CpSessionTrackTable.vue
@rileychh rileychh force-pushed the session-track-mode branch from 23b12d1 to 70fe7d6 Compare July 3, 2026 03:52
@rileychh rileychh force-pushed the session-track-pinning branch from 526ba78 to 2f2d5c8 Compare July 3, 2026 04:05
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.

1 participant