feat(weather): add iOS current weather widget foundation - #576
Open
YinCheng0106 wants to merge 16 commits into
Open
YinCheng0106 wants to merge 16 commits into
YinCheng0106 wants to merge 16 commits into
Conversation
YinCheng0106
marked this pull request as draft
September 16, 2026 15:26
YinCheng0106
marked this pull request as ready for review
September 16, 2026 15:26
YinCheng0106
force-pushed
the
feat/ios-widget-current-weather
branch
2 times, most recently
from
September 19, 2026 09:13
e2c3fd2 to
4542ada
Compare
Codecov Report❌ Patch coverage is ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Author
YinCheng0106
force-pushed
the
feat/ios-widget-current-weather
branch
from
September 20, 2026 04:15
fcc09b2 to
e647478
Compare
Platform: ios
Platform: ios
Platform: ios
Platform: ios New(zh-Hant): iOS 小工具可顯示 DPIP 所選地區的目前天氣 New(en-US): iOS widgets can show current weather for the area selected in DPIP
Platform: ios New(zh-Hant): iOS 天氣小工具新增天氣圖示、資料狀態與點擊開啟首頁 New(en-US): iOS weather widgets add condition icons, data states, and Home deep linking
Platform: ios New(zh-Hant): iOS 天氣小工具可依日出日落自動切換日夜天氣圖示 New(en-US): iOS weather widgets can switch day and night icons based on sunrise and sunset
Platform: ios
Platform: ios
Platform: ios New(zh-Hant): iOS 天氣小工具支援繁體中文與英文介面 New(en-US): iOS weather widgets support Traditional Chinese and English
Fix(zh-Hant): 修正天氣請求競態造成舊資料覆蓋新資料 Fix(en-US): Prevent stale weather requests from overwriting newer data
Platform: ios Fix(zh-Hant): 啟動時清除尚未驗證地區的舊天氣小工具資料 Fix(en-US): Clear unverified weather widget snapshots on app startup
Platform: ios Fix(zh-Hant): 修正未校時與裝置時間偏移造成的小工具時間誤差 Fix(en-US): Calibrate widget timing and reject unsynced weather snapshots
Platform: ios Fix(zh-Hant): 天氣小工具改用本地化的語意天氣狀態 Fix(en-US): Show localized semantic weather conditions in iOS widgets
Platform: ios
Platform: ios Fix(zh-Hant): 調整目前天氣小工具的資訊層級,保留觀測時間與天氣狀態並強化天氣圖示 Fix(en-US): Refine the current weather widget hierarchy while preserving observation time and weather condition
YinCheng0106
force-pushed
the
feat/ios-widget-current-weather
branch
from
September 20, 2026 15:45
e647478 to
e27ee6a
Compare
This was referenced Sep 20, 2026
YinCheng0106
added this pull request to stack #581
September 20, 2026 16:07
Member
|
如果在首頁切到全國 並查看 小組件 會出現 尚無天氣資料 |
Author
後續PR會直接覆蓋掉這一個問題 會改成利用Widget 設定來實現切換地區功能 |
This branch has not been deployed
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 做了什麼
新增 iOS 目前天氣 Widget 的基礎功能,讓 Widget 可顯示 DPIP 所選地區的目前天氣,並支援 stale 狀態、日夜圖示切換、Deep Link 與中英文介面。
此 PR 為 iOS Weather Widget 的第一階段實作,先建立 Current Weather Widget 與相關基礎架構;後續地點設定、獨立背景更新、Medium / Large Widget 與預報功能將以獨立 PR 逐步加入。
相關 issue
目前無。
怎麼驗
基本功能
tool/run.sh啟動 DPIP。地區同步
stale 狀態
Widget 資料超過目前設定的 stale threshold 後,確認:
日夜切換
確認目前天氣 Widget 可依所在地日出、日落時間切換圖示,例如:
sun.max.fillmoon.stars.fillcloud.sun.fillcloud.moon.fillWidgetKit timeline 會安排下一個日夜 transition,不需要重新開啟 App 才能完成已排定的圖示切換。
Deep Link
點擊 Widget 後,確認可透過:
dpip:///home開啟 DPIP 首頁。
本地化
確認 Widget Extension 支援:
包含:
原生 Widget 字串使用 Extension 專用 String Catalog,不使用 Flutter
AppLocalizations。自動測試與建置
已驗證:
tool/dev/analyze.sh通過tool/dev/test.sh通過tool/check.shrepository gates 通過Runner.app與DPIPWidgetsExtension.appex成功產出git diff --check通過後續開發
此功能採分階段 PR 開發:
feat/ios-widget-current-weather— 本 PRfeat/ios-widget-configurationfeat/ios-widget-intent-configurationfeat/ios-widget-weather-refresh— 開發中各階段刻意拆分,以避免將 Widget configuration、storage migration
與 native networking 混入同一個 PR。
Reviewer 建議重點
建議優先確認:
檢查清單
tool/check/commits.sh origin/main..HEAD通過—— commit 訊息就是更新日誌,格式見 commit.md
tool/dev/analyze.sh與tool/dev/test.sh通過tool/check.shrepository gates 通過- Flutter UI 維持
AppLocalizations- Widget Extension 使用原生
Localizable.xcstrings