Page-wide sweep for invisible render work, with three correctness fixes - #569
Open
whes1015 wants to merge 4 commits into
Open
Page-wide sweep for invisible render work, with three correctness fixes#569whes1015 wants to merge 4 commits into
whes1015 wants to merge 4 commits into
Conversation
Fix(zh-Hant): 修正重點整理頁在 26.2 上仍寫著 26.1,整個 26 週期現在都顯示 26.x Fix(en-US): fix the highlights page reading 26.1 on a 26.2 build; it now names the whole cycle
Fix(zh-Hant): 強震監視器的 EEW 倒數卡切到其他分頁後不再每秒喚醒手機 Fix(en-US): the monitor's EEW countdown no longer wakes the phone once a second from another tab
Optimization(zh-Hant): 多個頁面不再重複計算或繪製看不見的內容,搜尋輸入、清單捲動與分頁切換都更省電 Optimization(en-US): several pages no longer recompute or repaint what nothing on screen shows, so typing, scrolling and tab switches cost less battery
Fix(zh-Hant): 首頁面板上滑時地圖真的會糊化了,之前那層模糊沒有作用在地圖上 Fix(en-US): raising the home sheet now actually blurs the map behind it
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.
地毯式檢查所有頁面,找出「畫了但沒有人看得見」以及「每次 build 重算但結果不可能變」的開銷並修掉,同時修正過程中確認的三個行為缺陷。
三個行為修正
VisibleTabScope整個生命週期都遞同一個實例,updateShouldNotify永遠不會觸發,consumer 必須自己訂閱。判斷式刻意只測分頁而不用isOnScreen,否則showDialog會讓一個在半透明 barrier 周圍仍然看得見的 S 波倒數凍住,把過期的安全數字當成當下的值呈現。ImageFiltered,它模糊的是自己那塊均勻的ColoredBoxchild,除了外緣羽化以外什麼都沒動。改成BackdropFilter。效能整理
15 個檔案,全部是等價替換,沒有任何一項改變畫面上的結果。
build在搜尋框每打一個字就走過全部 368 個鄉鎮)、DateFormat與RegExp、CustomPainter迴圈裡的Paint、行星頁重複解的 Kepler。AnimationController;每次 layout 都重跑的IntrinsicHeight;收合後仍留在樹上的ExpansionTile子樹;ruler tick 的 repaint boundary 與 keep-alive。watch改select、整頁 rebuild 收斂成Consumer、每列一個透明Material收斂成整卡一個、Material(color: transparent)改MaterialType.transparency。decode給 target size,長邊上限 256。上限只能放在解碼不能放在 URL,因為那個字串同時是 ETag 的身分。Review 時值得注意
highlight_card兩處ExpansionTile拿掉了maintainState: true,這是行為改變。PageStorageKey保留,展開與收合的狀態一樣會記住。Theme(dividerColor: transparent)wrapper。region_city_page補了didUpdateWidget:go_router 用路由 pattern(:city)當 key 而不是解析後的城市,所以go()或 deep link 到另一個城市會沿用同一個 State。驗證
tool/check.sh全數通過,測試 1796 passed、5 skipped,codegen 重跑後產物零差異,commit gate 4/4。gate 是在 Darwin 上跑的,CI 跑 Linux,會 shell out 的測試在那邊仍然可能不同。