Repository navigation
本機清單篩選(5 個頁面)與手機端 QuickOpen 入口 - #489
Merged
Merged
Conversation
Carinoasd
force-pushed
the
refactor/thread-post-menus
branch
from
November 27, 2026 08:09
d809fd8 to
13bd10e
Compare
Carinoasd
force-pushed
the
feat/local-list-filter-and-quick-open
branch
from
November 27, 2026 08:10
a272950 to
bfdf216
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
疊在 #488 上(base 是
refactor/thread-post-menus)。不改資料庫結構,不新增設定鍵,不動packages/。1. 共用的比對與搜尋列
lib/utils/local_filter.dart:foldForSearch(轉小寫、繁體轉簡體)、searchTokens、matchesSearch。空白分隔的每個詞都要命中,可以分別落在不同欄位;沒輸入就不過濾。ensureSearchFolding()在搜尋列或 QuickOpen 展開時非同步載入,不等它;載入完成後自動重新比對。所以「跟隨論壇原文」的使用者也能繁簡互搜。載入失敗時退回原文比對,不會讓搜尋壞掉。lib/widgets/list_filter.dart:ListFilterAppBar:標題加一顆搜尋鈕(list-filter-open),排在頁面自己的按鈕前面;點了換成輸入框(list-filter-field),左邊是收起(list-filter-close),有字時右邊是清除(list-filter-clear)。ListFilterHost:持有控制器,按返回先收起搜尋列再離開頁面。在 App 的 router 底下用BackButtonListener,沒有 router 時退回PopScope。ListFilterNoMatch:「找不到符合『關鍵字』的項目」,和清單本來是空的提示分開。2. 五個頁面
全部只過濾記憶體裡已有的清單,不發網路請求。
ThreadRepository.namesOfSaved從已存頁面讀標題與版塊名。「全部更新」仍是全部,不受篩選影響#12)收藏夾的多選與篩選:兩者互斥、互相切換。篩選中長按卡片進入多選時,搜尋列收起、清單回到完整、選取保留;多選中打開搜尋列時,選取清掉。
3. QuickOpen
home-search)。點一下照舊進搜尋頁。原本的 tooltip 改成只在滑鼠懸停時顯示,不然它的長按會搶走手勢。無障礙節點的標籤仍是「搜尋」,並帶長按動作的說明。search-quick-open)。Ctrl+K不變。matchScore與候選的分詞改用foldForSearch/searchTokens,和清單篩選同一套,因此也能繁簡互搜。排序規則沒變。readOrNull:上層沒有提供某個 repository 時,該來源留空,不會丟例外。4. i18n
三語新增 4 條:
listFilter.open、listFilter.hint、listFilter.noMatch、quickOpen.title。QuickOpen 的候選只用圖示區分種類,沒有分類名稱,所以新來源不需要文案。測試
test_1427_local_list_filter_test.dart(9 個):比對函式(大小寫、多詞、跨欄位、空輸入、用 App 實際的轉換表做繁簡互搜、按需載入)、搜尋列(展開、即時過濾、空態、清除、頂欄返回與系統返回都先收起)、QuickOpen 新來源、去重、繁簡互搜、來源轉換。test_481(稍後閱讀)、test_681(樓層書籤)、test_072(瀏覽歷史,含與帳號篩選並用)、test_224(離線帖子)。test_244(收藏夾,2 個):篩標題與備註、篩選期間請求數不變;多選與篩選互相切換。test_720:首頁搜尋鈕長按開 QuickOpen,並檢查無障礙標籤與長按說明。test_320:搜尋頁按鈕。test_731只改了測試用空函式的參數,配合來源回呼多兩個欄位。dart ./Makefile.dart build、dart ./scripts/check_strict_analyzing.dart:No issues found。沒有驗證的部分
🤖 Generated with Claude Code