Skip to content

fix(eew): adapt map legends to active warnings - #656

Merged
whes1015 merged 1 commit into
mainfrom
fix/eew-legend-scale
Nov 4, 2026
Merged

whes1015 merged 1 commit into
mainfrom
fix/eew-legend-scale

Conversation

@lowrt

@lowrt lowrt commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

這個 PR 做了什麼

修正即時地震監視器在真實 EEW 發布期間仍顯示地震儀連續色階的問題,並精簡即時監視器與地震報告重播的 EEW 圖例,避免圖例占用過多地圖空間。

  • 即時地震監視器偵測到有效 EEW 時,改用離散震度階圖例;EEW 結束後恢復地震儀連續色階
  • 即時監視器與地震報告重播的 EEW 圖例只顯示到目前最高預估震度
  • 多筆 EEW 同時存在時採用其中最高震度,並忽略已取消的警報
  • EEW 報數或狀態更新時,圖例會同步重建
  • 共用圖例新增最高震度限制,並加入最高震度為 5⁻ 的 widget 測試
圖片 圖片

相關 issue

EEW圖例問題
EEW時圖例優化

怎麼驗

  • 在即時地震監視器注入真實 EEW,確認圖例由連續色階切換為震度階
  • 使用最高預估震度為 5⁻ 的 EEW,確認圖例只顯示 5⁻、4、3、2、1
  • 開啟包含 EEW 的地震報告重播,確認圖例同樣只顯示至該次最高預估震度
  • 結束或取消 EEW,確認即時監視器恢復原本的地震儀連續色階

檢查清單

  • tool/check/commits.sh origin/main..HEAD 通過
    —— commit 訊息就是更新日誌,格式見 commit.md
  • 一個 commit 一件事(這條 gate 驗不了,靠自己和 review)
  • mise exec -- flutter analyze 與 mise exec -- flutter test 通過
  • 新的使用者可見字串都走 AppLocalizations,沒有寫死
  • CI 全部通過(gh pr checks:每一項都是 pass 或 skipped)—— 沒過不能合併,
    見 pr.md
  • 有 UI 變更的話:用的是 AppSpacing / AppRadius / AppMotion,
    深色模式看過,文字對比度可接受

Platform: all

Fix(zh-Hant): 即時地震監視器在地震速報期間改用震度階圖例
Fix(en-US): the live earthquake monitor uses the intensity scale during early warnings

Optimization(zh-Hant): 即時與重播的地震速報圖例只顯示到最高預估震度
Optimization(en-US): live and replay early-warning legends stop at the maximum expected intensity
@lowrt lowrt added this to the V26.5 milestone Nov 4, 2026
@lowrt
lowrt requested a review from a team November 4, 2026 03:50
@codecov

codecov Bot commented Nov 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 15.00000% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.47%. Comparing base (cebd963) to head (cb72c80).

Files with missing lines Patch % Lines
...ib/features/map/presentation/layers/rts_layer.dart 0.00% 10 Missing ⚠️
...thquake/presentation/pages/report_replay_page.dart 0.00% 7 Missing ⚠️

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@whes1015 whes1015 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

即時監視器只在 feed 為 live、且還有未取消速報時改用震度階,並停在目前最高預估震度;結束後回到地震儀連續色階。過期或離線不會畫成速報圖例。重播用的是該次未取消警報的最高震度。info.max 為 0 時圖例會被抬到 1 級,不擋合併。CI 全過,跟 main 齊平。可以合。

@whes1015
whes1015 requested a review from PiscesXD November 4, 2026 05:00
@whes1015
whes1015 enabled auto-merge (rebase) November 4, 2026 05:00
@whes1015
whes1015 merged commit 07c0c3d into main Nov 4, 2026
@whes1015
whes1015 deleted the fix/eew-legend-scale branch November 4, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants