Fix/eew spoken review - #568
Open
archie0732 wants to merge 3 commits into
Open
Conversation
New(zh-Hant): 地震報告的重播也會朗讀預估震度,和即時監視器一樣 New(en-US): a report replay now speaks the estimated intensity, the same way the live monitor does
Fix(zh-Hant): 預估震度朗讀改為預設關閉,要用的人自己開啟 Fix(en-US): the spoken intensity announcement is off by default and has to be switched on
New(zh-Hant): 「更多」新增「無障礙」區塊,預估震度朗讀的開關移到那裡 New(en-US): the More menu has an Accessibility section, and the spoken-intensity switch moved into 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.
這個 PR 做了什麼
處理 #546 的三則 review 意見。那個 PR 在意見處理完之前就先合併了,所以改成接續的修正。
相關
commit 內容
feat(eew): speak the estimated intensity during a report replay重播頁自己組地圖和
EewCard,沒有用RtsMonitorPanel,而播報控制器住在那個面板裡,所以重播完全不會朗讀。這裡有個分層問題:重播頁在
features/earthquake/,controller 在features/map/presentation/,而tool/check/layering.sh兩個方向都擋 cross-feature 的 presentation 匯入。因此我把MonitorEewAnnouncementController移到features/earthquake/domain/。我知道 ARCHITECTURE.md 把 controller 歸在 presentation。我移到 domain 的理由是這個檔案沒有任何 Flutter 匯入 沒有 widget、沒有 build,只有
dart:async、core/和自己 feature 的eew.dart。理由我寫在檔案開頭的註解裡。如果覺得該換位置,可以在討論。然後有兩個設計:
NotificationService的。 重播不產生通知,借用共用閘門會讓一段歷史地震的語音壓住剛好進來的真實警報的聲音。fix(eew): keep the spoken announcement off until it is asked for預設改為關閉
順帶把監視器面板在沒有 provider 時的退路也從
true改成false,否則兩處的預設會不一致。feat(settings): put the spoken-intensity switch under accessibility更多新增無障礙區塊,放在顯示和Mesh 網路之間。12 個語系都補了字串。如圖所示:
最後我決定是讓他自成一個區塊而不是塞到顯示:那頁有一塊即時預覽面板專門用來看文字渲染,對語音毫無意義。雖然目前無障礙相關的設定(色覺調整、對比、文字大小、字重)都在顯示設定頁裡,如果之後要把它們拆出來,這個區塊可以當現成的區塊。
測試
手動(Android Emulator,x86_64)
自動
tool/check/commits.sh upstream/main..HEAD:3 commits 通過tool/dev/analyze.sh:flutter analyze無問題tool/check/l10n.sh、layering.sh、storage.sh、notification_sounds.shtest/tool/*以外;那些在 Windows 上因 Git Bash 路徑轉換而失敗,與本次無關)尚未驗證
ReplaySession全部架起來。控制器本身的測試還在(隨著檔案移動到test/features/earthquake/domain/)。重播路徑是手動驗的。檢查清單
tool/check/commits.sh origin/main..HEAD通過flutter analyze通過。測試通過AppLocalizations,沒有寫死(12 語系)SectionHeader/_MoreGroup/_MoreTile,沒有引入新樣式因為我的 github 有點問題,如果有緊急的地方需要修或是有其他的工作可以做,可以在 ExpTech Studio Discord 裡直接 tag 我 (應該是叫 4rch1e ),或是請 Kamiya 私訊我,感恩🙏