Skip to content

feat: add session search filters (#94)#172

Open
pan93412 wants to merge 3 commits into
mainfrom
add-session-search-filters
Open

feat: add session search filters (#94)#172
pan93412 wants to merge 3 commits into
mainfrom
add-session-search-filters

Conversation

@pan93412
Copy link
Copy Markdown
Contributor

@pan93412 pan93412 commented May 30, 2026

Resolves #94:在議程頁(/2026/session/2026/en/session)加入頁面層級的搜尋與篩選,並補上對應的空狀態。

變更內容(Changelog)

新增功能

  • 議程搜尋:在議程頁加入關鍵字搜尋,比對議程標題、議程描述、講者名稱與講者 id,不分大小寫、自動 trim,並依當前語系比對對應語言內容。
  • 教室篩選:依當天議程動態產生教室選項,可多選(OR),支援下拉內二次搜尋。
  • 標籤 / 類型篩選:標籤下拉除真實 tag 外,也把議程「類型(type)」一併列為可篩選項目;教室與標籤之間為 AND 條件。
  • 空狀態
    • 篩選後無結果時顯示 CpSessionEmptyBanner(「找不到符合條件的議程。」)。
    • 尚未公布任何議程時顯示 noSession(「尚未公布,敬請期待。」)。
  • 換日自動清除無效篩選:切換日期時,若先前選取的教室/標籤在新日期不存在,會自動從選取中移除(clampToOptions)。

元件與架構

  • 新增 composable useSessionFilter.ts:集中管理搜尋字串、教室/標籤選取、選項產生(去重 + 依語系排序)與 filteredSessions 計算;全程使用 computed,不使用 watch
  • 新增 feature 元件:CpSessionFilterBarCpSessionFilterDropdownCpSessionSearchFieldCpSessionEmptyBanner
  • 新增 shared 基礎元件:CpButtonCpTextFieldCpCheckbox
  • app/pages/session.vue 持有搜尋/篩選狀態,將 filteredSessions 傳入桌機表格 CpSessionTable 與手機清單 CpSessionList,表格/清單只負責渲染。

響應式 / 互動

  • 斷點 sm(640px):桌機顯示表格、手機顯示清單。
  • DaySelector:桌機 sticky 釘頂部、手機 fixed 釘底部(含 safe-area)。
  • FilterBar:sticky left-0,水平拖曳表格時維持貼齊視窗左側。
  • 手機優化:搜尋/篩選控制改為垂直堆疊並置中,篩選按鈕與搜尋框維持 48px 觸控目標。
  • 拖曳捲動(useDragScroll,scrollTarget = window):拖曳超過 4px 後抑制點擊,避免誤觸議程卡片導頁。

測試計畫(Test Plan)

1. 前置

  • 1.1 在桌機寬度(如 1280px)與手機寬度(如 390px)各跑一輪。
  • 1.2 中文(預設 zh)與英文(en)各跑一輪,確認 i18n 字串正確。
  • 1.3 載入 /session 無 console error。
CleanShot 2026-06-02 at 01 21 56@2x

2. DaySelector(換日)

  • 2.1 桌機:預設選中排序後第一天,active 為 bg-primary-400、其餘 bg-gray-200;點其他天內容即時更新。
  • 2.2 桌機:多天時按鈕置中並可正常換行;日期格式正確(Asia/Taipei,28.Jul 形式)。
  • 2.3 手機:DaySelector 固定在畫面底部、含 safe-area,不遮住清單最後一筆。
  • 2.4 手機:點不同天 → 清單內容與 active 樣式正確更新。
桌機 手機
CleanShot 2026-06-02 at 01 10 16@2x image

3. 教室 / 標籤篩選

  • 3.1 兩顆按鈕與 icon(map-pin / tag)正確顯示;可展開、再點收合、點外部自動收合。
  • 3.2 勾選後即時過濾;按鈕文字變成所選項目、過長時 truncate;多選為 OR。
  • 3.3 有選取時出現右上「x」清除鈕,點擊清空且不展開下拉。
  • 3.4 下拉內搜尋可即時過濾選項;無結果顯示「沒有選項 / No options」。
  • 3.5 選項去重且依語系排序(中文 zh-Hant、英文 en)。
  • 3.6 標籤下拉含「議程類型」,且可獨立篩選生效。
  • 3.7 教室 + 標籤同時選取 → AND 條件結果正確。
  • 3.8 手機:下拉寬度不超出畫面、置中對齊;桌機:靠左對齊。
桌機 手機
CleanShot 2026-06-02 at 01 12 41@2x image

4. 搜尋

  • 4.1 即時過濾,命中標題 / 描述 / 講者名稱 / 講者 id。
  • 4.2 大小寫不敏感、前後空白自動 trim。
  • 4.3 清空搜尋還原完整列表;搜尋語系與介面語系一致。
  • 4.4 桌機搜尋框固定寬(sm:w-80)、手機滿版。
桌機 手機
CleanShot 2026-06-02 at 01 14 19@2x image

5. 組合篩選與換日重置

  • 5.1 教室 + 標籤 + 搜尋三者交集結果正確。
  • 5.2 在 A 天選了只有 A 天才有的教室,切到 B 天 → 該選取自動被清除(有這種狀態嗎?)
  • 5.3 在兩天都存在的教室/標籤,換日後選取保留且結果正確。
交集查詢 換日
CleanShot 2026-06-02 at 01 15 21@2x CleanShot 2026-06-02 at 01 15 32@2x

6. 空狀態 / 無此議程

  • 6.1 篩選過嚴無結果 → 顯示 CpSessionEmptyBanner,表格/清單皆不顯示,DaySelector / FilterBar 仍在。
  • 6.2 放寬條件後 banner 消失、列表回來。
  • 6.3 完全沒公布議程(無任何天)→ 顯示「尚未公布,敬請期待。」,不渲染 DaySelector/Filter。 (已經沒有這種狀態)
  • 6.4 空狀態 banner 在手機有正確邊距、icon 與文字對齊。
桌機 手機
CleanShot 2026-06-02 at 01 17 09@2x image

7. 拖曳 / 捲動時的釘選定位

  • 7.1 桌機:水平拖曳表格時,DaySelector 維持釘頂部且貼齊視窗左側不位移。
  • 7.2 桌機:水平拖曳時 FilterBar 維持貼齊視窗左側,不隨表格滑走。
  • 7.3 桌機:垂直捲動時 DaySelector 維持釘頂部。
  • 7.4 桌機:水平拖曳時 Navbar / Footer 維持滿版貼左、不露白錯位。
  • 7.5 拖曳超過 4px 放開不會誤觸議程卡片導頁;單純點擊卡片可正常進入詳情。
  • 7.6 resize 後再拖曳,--viewport-width 有更新、釘選寬度正確。
  • 7.7 手機:上下捲動時 DaySelector 固定底部不動;觸控拖曳順暢且不誤觸導頁。
  • 7.8 z-index 正確:FilterBar(z-50)> 下拉(z-30)> DaySelector(z-10),展開的下拉不被遮擋。
桌機 手機
CleanShot 2026-06-02 at 01 19 21@2x image

8. 響應式切換

  • 8.1 縮放跨越 640px 時,表格 ⇄ 清單、DaySelector 頂部 ⇄ 底部正確切換且無閃爍/重疊。
  • 8.2 切換瞬間已套用的搜尋/篩選狀態維持不變。

@pan93412 pan93412 force-pushed the add-session-search-filters branch from 44bf581 to 6b53b41 Compare May 30, 2026 11:59
@pan93412 pan93412 changed the title [codex] add session search filters Add session search filters (#94) May 30, 2026
@pan93412 pan93412 marked this pull request as ready for review May 30, 2026 12:44
Copilot AI review requested due to automatic review settings May 30, 2026 12:44
Copy link
Copy Markdown

Copilot AI left a comment

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 adds room/tag/type multi-select filters and a full-text search input to the session schedule table on the /session page, plus three new shared UI primitives (CpButton, CpTextField, CpCheckbox) and a CpSessionFilterDropdown feature component. It keeps the existing CpSessionItem/CpBadge visuals intact and renders only room columns that still have matching sessions, with a localized empty state.

Changes:

  • Add a filter toolbar above the schedule with two multi-select dropdowns (rooms, tags/types) and a search box; wire OR-filtering and localized case-insensitive search across title/description/speaker name/speaker id.
  • Derive room options from schedulable sessions using the Pretalx en value as a stable id, and union submission type (with a zh\0en composite id) into tag options so localized switching keeps identity.
  • Introduce CpButton, CpTextField, CpCheckbox, and CpSessionFilterDropdown built with UnoCSS utility classes; restrict rendered room columns to those with matching sessions and show a localized "no results" message.

Reviewed changes

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

Show a summary per file
File Description
app/components/feature/CpSessionTable.vue Adds filter/search state, option derivation, matching logic, restricted rooms, empty state, and i18n strings; preserves the original grid rendering.
app/components/feature/CpSessionFilterDropdown.vue New dropdown with search, checkbox list, selected-label trigger with clear button, and click-outside dismissal.
app/components/shared/CpButton.vue New button primitive with primary/secondary/basic variants and responsive sizing.
app/components/shared/CpTextField.vue New text input primitive with prefix icon slot and clear button.
app/components/shared/CpCheckbox.vue New checkbox primitive with larger mobile tap target.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pan93412 pan93412 requested a review from a team May 30, 2026 12:52
@pan93412 pan93412 force-pushed the add-session-search-filters branch from 6b53b41 to bac9d11 Compare May 30, 2026 12:55
@rileychh-dokploy-coscup
Copy link
Copy Markdown

rileychh-dokploy-coscup Bot commented May 30, 2026

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
Nuxt ❌ Failed Preview URL 2026-06-01T16:56:27.882Z

@pan93412 pan93412 mentioned this pull request May 30, 2026
@pan93412
Copy link
Copy Markdown
Contributor Author

pan93412 commented May 30, 2026

docs/pr 稍後刪除,那是 Codex 無法 attach 附件的 workaround。不影響其他程式碼的 review~

@mirumodapon
Copy link
Copy Markdown
Collaborator

  1. 我記得上次討論的時候有跟你說以 在 Mobile 當中,議程表將呈現列表形式 #147 為 Base 為優(如果我沒有說的話,我很抱歉 QQ),現在 Perf/session UI #167 已經發出來了,如果可以的話用 Perf/session UI #167 也可以
  2. 我認為在 SessionTable 實作 filter 不是個好選擇,SessionTable 應該專注於選染整個議程表,期待是 Filter 在 session.vue 並把結果傳進去 SessionTable 當中

@pan93412
Copy link
Copy Markdown
Contributor Author

pan93412 commented May 30, 2026

  1. 我記得上次討論的時候有跟你說以 在 Mobile 當中,議程表將呈現列表形式 #147 為 Base 為優(如果我沒有說的話,我很抱歉 QQ),現在 Perf/session UI #167 已經發出來了,如果可以的話用 Perf/session UI #167 也可以

哦,我剛剛才注意到這則留言,不好意思,應該是我忘記這回事了 🥲 不過我想影響不大,實際原因我想和你分享一下我最近正在嘗試的新解決方案:「讓每個 PR 都各自獨立」。

一般來說,以「議程表」這個大項來說,無論是手機版列表、篩選功能,還是我正在做的收藏功能,這三個都應該要是互相獨立的。我們理論上應該要可以合併其中一個都有共識的 PR(A or B or C),而不是必須等到「手機版列表」完成後,才能合併「篩選功能」,然後再來合併「收藏功能」(A → B → C)。但與此同時,我們又希望這三個 PR 都去共用類似的元件,避免造成一個 PR 合併之後,另外一個 PR 要經過大幅度的重寫,才能去配合最新 main 的提交。

除此之外,COSCUP 的開發通常是以非同步的方式進行。就以 #169 這個 PR 來說,雖然這個 PR 已經進 main 了,但你的 PR 沒有 rebase 到 main 上面。如果我想在你那個 PR 的基礎上繼續做事,且依賴這個 PR 的修正,我就必須請你先 rebase main,我才能繼續開發。這部分的溝通與等待成本其實是蠻高的。

CleanShot 2026-05-31 at 02 58 17@2x

也因此,我決定試試看不去 stack 任何 PR,而是改去降低多個 PR 間合併的 conflict 解決成本。我在 #160 的 Plan (對應的 PR 是 #176) 中,補了這麼一段 prompt:

如果 #172 已經移植過這個元件,請直接使用,避免日後有 conflict 的情況。如果確實需要改造元件,可以改名成元件 + Variant Name 的獨立元件,方便日後 DRY。

這樣一來,Claude Code 就會盡量複用既有的設計,就算設計需要更改,也可以避免元件撞名(而 merge conflict)的問題。舉例來說,#172#176 都需要 CpButton.vue 的樣式,但 #176 需要 Icon Variant,因此我的 Claude Code 做了一個 CpSessionShareButton.vue,重複 CpButton.vue 的設計,這樣 #172#176 在元件上理論上就不用擔心 merge conflict 的狀況。

Tip

理論上這樣 main 會出現很多重複的 components。DRY 的重構任務(比如把 CpButtonCpSessionShareButton 統一成一個可以涵蓋所有情況的 CpButton),我覺得可以放在收尾階段來做。衝刺開發的階段傾向不 DRY,以免大家都改同個 components 導致衝突機率日益增加。

當然對於主元件 CpSessionTable.vue,衝突是難免的,因此我在 PR 中只做功能需要的最小改動。我目前的 PR 應該都只實作對應功能需要的設計(而不去刻意改動現有 branch 上的其他元件)。因此,當一個 PR 被合併(比如 #147)了,我可以再叫 Claude Code 把目前我這個 PR(#172#176)的變動,在最新的 main 上重新套用。

所以如果就以上面的理論來講,其實我的 PR 應該是不需要 stack 你的 PR,你可以把他當作各自獨立的功能來 ship,來加速終端使用者看到新功能的速度。如果任一 PR 合併了,我會再讓我的 Claude Code 去修正其他我自己的 PR,符合目前 main 的設計(不過我還沒有試過其中一個功能合併後,另外幾個 PR 的衝突解決難度,這部份可以一起試試看)。


  1. 我認為在 SessionTable 實作 filter 不是個好選擇,SessionTable 應該專注於選染整個議程表,期待是 Filter 在 session.vue 並把結果傳進去 SessionTable 當中

至於第二點的話,我同意你的觀點,這部分會修正看看~但在實作第二點之前,我想先看看你對於第一點的看法,來決定我要不要先改變基礎分支。

@mirumodapon
Copy link
Copy Markdown
Collaborator

我認為 Stack PR 除了方便 Review 之外,還有另一個價值是能夠明確表達功能之間的演進關係。後續參與開發的人可以透過 PR Chain 了解目前的開發方向,以及哪些設計已經確定、哪些部分仍在調整。對於高度相關的功能來說,這有助於開發者掌握彼此的實作方式與設計考量,進而做出更符合團隊期待的決策。

另外,即使 Base Branch 尚未 Rebase 到最新的 main,實務上仍然可以基於該 Branch 繼續開發。當上游 PR 合併後,再透過 Rebase 或 Merge 的方式同步即可,因此不一定會阻塞後續工作。對於彼此高度相關的功能來說,Stack PR 也能更清楚地呈現變更之間的關聯性,讓開發與 Review 的脈絡更加連貫。

對於相關性功能的 pr 該怎麼選擇 base branch 我想聽聽 @rileychh 的想法

@pan93412
Copy link
Copy Markdown
Contributor Author

我認為 Stack PR 除了方便 Review 之外,還有另一個價值是能夠明確表達功能之間的演進關係。後續參與開發的人可以透過 PR Chain 了解目前的開發方向,以及哪些設計已經確定、哪些部分仍在調整。對於高度相關的功能來說,這有助於開發者掌握彼此的實作方式與設計考量,進而做出更符合團隊期待的決策。

我認同 Stack PR 除了方便 Review 之外,確實也可以用來表達功能之間的演進關係。透過 PR Chain,後續參與開發的人可以理解目前的開發方向,以及不同變更之間的脈絡。不過我覺得關鍵不只是「這些功能是否相關」,而是「後續 PR 是否真的必須建立在前一個 PR 的具體實作之上」,以及「前一個 PR 的設計是否已經相對穩定」。

就「哪些設計已經確定、哪些部分仍在調整」這點來說,我會傾向把已經 merge 到 main 的內容視為比較穩定、已經有團隊共識的基礎。例如議程表本身的 #102 已經進 main,因此後續基於它開發是合理的。但 #105 是最近才寫完、仍可能需要迭代的 PR;後續的 #147#167 也還是 Draft,本來就可能調整,甚至像 #164 一樣被 close 掉。若把這些還在實驗或尚未形成共識的設計全部串成一條 stack,後面的 PR 就會更容易依賴到尚未穩定的實作,導致後續需要反覆 rebase、重寫或調整。

我覺得新功能的開發,應該盡量建立在已經有共識的基礎上。以 #147 來說,如果 #105 的設計改動很大,#147 就必須跟著 rebase,甚至重寫部分實作。對於真正緊密依賴的功能,這是合理的,例如 #167 依賴 #147,或 #161 依賴 #105;但我覺得我們也需要謹慎判斷一個功能是否真的「緊密到必須線性開發」。例如,不會因為「議程表詳細頁面」還沒有共識,「手機的新檢視 UI」就不能上線;同理,也不會因為手機版還沒完成,就影響議程表篩選或收藏功能的發佈。

如果目的是讓開發者掌握彼此的實作方式和設計考量,我會更傾向在 Review 過程中明確提出設計建議。例如你在 #172 的 comment 裡提到「SessionsTable 不要有篩選功能」,我覺得就是很有幫助的設計回饋。這類建議可以直接影響後續實作方向,也能讓相關 PR 在 main 之上各自調整。但我不太覺得這個問題適合用 Stack PR 來解決,因為 Stack PR 反而可能讓其他人依賴到仍在實驗、隨時可能重寫的設計,導致 stack 越後面的 PR 越需要跟著變動。

另外,即使 Base Branch 尚未 Rebase 到最新的 main,實務上仍然可以基於該 Branch 繼續開發。當上游 PR 合併後,再透過 Rebase 或 Merge 的方式同步即可,因此不一定會阻塞後續工作。對於彼此高度相關的功能來說,Stack PR 也能更清楚地呈現變更之間的關聯性,讓開發與 Review 的脈絡更加連貫。

至於「Base Branch 尚未 rebase 到最新 main,實務上仍然可以繼續基於該 branch 開發」這點,我理解理論上是可行的,但在我們目前的協作模式下,我對它的實務效率比較保留。舉例來說,我當時是等到 #102 合併到已包含 #159 的 main 之後,才開始動工議程表相關程式碼。原因是雖然沒有完全被阻塞,但我希望能用 Codex 開發;如果我直接 stack 到 #102,為了讓開發環境接近最新 main,勢必需要建立一個把 main merge 進來的 merge commit。這樣一來,PR 的 Changes tab 會同時包含 main 的變動和我真正要提交的功能變動,反而會增加 Review 成本。

當然,如果 #102 已經 rebase 到最新 main,而新的議程表細項功能又確實高度依賴 #102,那把新 PR 開在 #102 上會是合理的 Stack PR 用法。但就像我前面提到的,COSCUP 通常是非同步開發;即使 PR 已經全員 approved,也可能要等一段時間才會 rebase 或 merge。在這種協作節奏下,過度使用 Stack PR 可能不一定會提升效率,反而會讓後續 PR 更容易受到上游未合併 PR 的狀態影響。

CleanShot 2026-05-31 at 16 59 01@2x

#102 在 Pan 請求合併後,一週後執行 rebase main 和 merge

所以我的看法不是完全避免 Stack PR,而是應該把它限制在「真的有強依賴,且上游設計已經相對穩定」的情境。對於可以獨立 review、獨立 merge、獨立發佈的功能,我會傾向讓它們以 main 為共同基礎開發,而不是全部串成一條線性的 PR Chain。就這幾個功能來說,我認同它們都屬於議程表相關的開發方向,但我不認為它們彼此緊密到必須採取線性開發。

@rileychh
Copy link
Copy Markdown
Member

rileychh commented Jun 1, 2026

Stack 工作流對我來說是在進度超前、大量修改的時候,將大量 diff 拆分成可閱讀的 PR 工具。雖然他可以自然的表達專案的演進,不過 main 分支的 git log 也可以用來供後人學習。兩邊的論述都很有道理,以這次來說看起來 base 設在哪裡都沒關係。就看誰的 PR 先準備好合併,有推進進度就好!

@pan93412
Copy link
Copy Markdown
Contributor Author

pan93412 commented Jun 1, 2026

感謝 @mirumodapon 合併了他的 base PR,我這裡解決一下衝突!❤️

@mirumodapon
Copy link
Copy Markdown
Collaborator

docs/ 的圖片記得要移掉

Comment thread app/components/feature/CpSessionTable.vue Outdated
Comment thread app/components/feature/CpSessionTable.vue
Copy link
Copy Markdown
Collaborator

@mirumodapon mirumodapon left a comment

Choose a reason for hiding this comment

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

unocss 都有定義顏色,使用顏色變數來取代直接寫死的色號

Comment thread app/components/shared/CpButton.vue Outdated
@pan93412
Copy link
Copy Markdown
Contributor Author

pan93412 commented Jun 1, 2026

我忘記改 Draft 了,我在修 AI slop

@pan93412 pan93412 marked this pull request as draft June 1, 2026 16:44
@pan93412 pan93412 force-pushed the add-session-search-filters branch from 1950e81 to 342484a Compare June 1, 2026 16:52
@pan93412 pan93412 self-assigned this Jun 1, 2026
@pan93412
Copy link
Copy Markdown
Contributor Author

pan93412 commented Jun 1, 2026

非常感謝 @mirumodapon 的 Review,也非常不好意思由於 PR 狀態設定上的失誤,讓你 review 到尚未完成的程式碼,不好意思讓你傷眼了。我已經把程式碼清理完成了,你可以再測試看看各種情況,或者看看 code quality 是否符合標準。另外我也為 #176 預備好了 FilterBar(收藏本質上也是一種篩選,這個名字應該是沒問題),但 #176 會等到 #172 得到共識(也就是合併到 main)後才會重新 rebase。

@pan93412 pan93412 marked this pull request as ready for review June 1, 2026 17:26
@pan93412
Copy link
Copy Markdown
Contributor Author

pan93412 commented Jun 1, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 342484aa7d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/composables/useSessionFilter.ts
@pan93412 pan93412 requested a review from mirumodapon June 1, 2026 17:29
@pan93412 pan93412 changed the title Add session search filters (#94) feat: add session search filters (#94) Jun 2, 2026
pan93412 added a commit that referenced this pull request Jun 3, 2026
Rebuild the favorites (#160) and share (#95) features on the session-filter
architecture from #172: page-level state computed into the displayed list,
shared base components, and feature components that compose them.

- CpSessionItem gains favorite/readonly bookmark state (orange filled icon).
- CpSessionTable/CpSessionList forward favorites + a preview (read-only) mode.
- session.vue layers the all/favorite/shared view on top of filteredSessions
  from useSessionFilter, keeping the filter bar and empty banner.
- CpSessionViewToggle and CpSessionShareButton compose the shared CpButton.
- CpSessionEmptyBanner gains filter/favorite/shared variants.
- useFavorites store (provide/inject + useStorage) and cp-orange palette.

Closes #160
Closes #95
pan93412 added a commit that referenced this pull request Jun 3, 2026
Rebuild the favorites (#160) and share (#95) features on the session-filter
architecture from #172: page-level state computed into the displayed list,
shared base components, and feature components that compose them.

- CpSessionItem gains favorite/readonly bookmark state (orange filled icon).
- CpSessionTable/CpSessionList forward favorites + a preview (read-only) mode.
- session.vue layers the all/favorite/shared view on top of filteredSessions
  from useSessionFilter, keeping the filter bar and empty banner.
- CpSessionViewToggle and CpSessionShareButton compose the shared CpButton.
- CpSessionEmptyBanner gains filter/favorite/shared variants.
- useFavorites store (provide/inject + useStorage) and cp-orange palette.

Closes #160
Closes #95
pan93412 added a commit that referenced this pull request Jun 3, 2026
Rebuild the favorites (#160) and share (#95) features on the
session-filter
architecture from #172: page-level state computed into the displayed
list,
shared base components, and feature components that compose them.

- CpSessionItem gains favorite/readonly bookmark state (orange filled
  icon).
- CpSessionTable/CpSessionList forward favorites + a preview (read-only)
  mode.
- session.vue layers the all/favorite/shared view on top of
  filteredSessions
  from useSessionFilter, keeping the filter bar and empty banner.
- CpSessionViewToggle and CpSessionShareButton compose the shared
  CpButton.
- CpSessionEmptyBanner gains filter/favorite/shared variants.
- useFavorites store (provide/inject + useStorage) and cp-orange
  palette.

Closes #160
Closes #95
pan93412 added a commit that referenced this pull request Jun 3, 2026
Rebuild the favorites (#160) and share (#95) features on the
session-filter
architecture from #172: page-level state computed into the displayed
list,
shared base components, and feature components that compose them.

- CpSessionItem gains favorite/readonly bookmark state (orange filled
  icon).
- CpSessionTable/CpSessionList forward favorites + a preview (read-only)
  mode.
- session.vue layers the all/favorite/shared view on top of
  filteredSessions
  from useSessionFilter, keeping the filter bar and empty banner.
- CpSessionViewToggle and CpSessionShareButton compose the shared
  CpButton.
- CpSessionEmptyBanner gains filter/favorite/shared variants.
- useFavorites store (provide/inject + useStorage) and cp-orange
  palette.

Closes #160
Closes #95
@mirudapon
Copy link
Copy Markdown

嗨!我想在這個 pr 加個功能,希望這些篩選或是搜尋的功能,可以同步網址,並且使得這個搜尋結果可以透過網址傳遞,可以參考 2024 的功能行為:https://coscup.org/2024/zh-TW/session?room=TR411&tags=Elementary&type=02bf7j

@pan93412
Copy link
Copy Markdown
Contributor Author

pan93412 commented Jun 4, 2026

嗨!我想在這個 pr 加個功能,希望這些篩選或是搜尋的功能

應該可以 stack,雖然我還在猶豫要留 500fbb1 還是直接用 #188。你的看法是什麼?

@mirudapon
Copy link
Copy Markdown

嗨!我想在這個 pr 加個功能,希望這些篩選或是搜尋的功能

應該可以 stack,雖然我還在猶豫要留 500fbb1 還是直接用 #188。你的看法是什麼?

沒有很懂什麼意思誒

@pan93412
Copy link
Copy Markdown
Contributor Author

pan93412 commented Jun 5, 2026

嗨!我想在這個 pr 加個功能,希望這些篩選或是搜尋的功能

應該可以 stack,雖然我還在猶豫要留 500fbb1 還是直接用 #188。你的看法是什麼?

沒有很懂什麼意思誒

這個 PR 為了減少 bundle size,把 FilterBar 做成 ClientOnly 加上 Placeholder 的形式,但看起來 #188 在設計上有共識,你覺得還需要留 FilterBar Placeholder 嗎?我等會把 #188 整理一下之後讓你合併~

Edited: 已經把 500fbb1 刪除了

@pan93412 pan93412 force-pushed the add-session-search-filters branch from 500fbb1 to 84de352 Compare June 5, 2026 07:19
@mirumodapon
Copy link
Copy Markdown
Collaborator

嗨!我想在這個 pr 加個功能,希望這些篩選或是搜尋的功能

應該可以 stack,雖然我還在猶豫要留 500fbb1 還是直接用 #188。你的看法是什麼?

沒有很懂什麼意思誒

這個 PR 為了減少 bundle size,把 FilterBar 做成 ClientOnly 加上 Placeholder 的形式,但看起來 #188 在設計上有共識,你覺得還需要留 FilterBar Placeholder 嗎?我等會把 #188 整理一下之後讓你合併~

Edited: 已經把 500fbb1 刪除了

#188 已經合併了

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.

篩選與搜尋功能

5 participants