Skip to content

fix(ios): align hourly forecast content across weather icons - #644

Merged
PiscesXD merged 1 commit into
mainfrom
fix/ios-widget-forecast-icon-alignment
Oct 25, 2026
Merged

PiscesXD merged 1 commit into
mainfrom
fix/ios-widget-forecast-icon-alignment

Conversation

@YinCheng0106

@YinCheng0106 YinCheng0106 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

這個 PR 做了什麼

修正 iOS 天氣小工具的每小時預報排版問題。原本不同天氣的 SF Symbols 圖示高度不一致,導致溫度與降雨機率出現上下錯位的情況。

這次在 HourlyForecastPointView 的天氣圖示加入固定高度,讓每個預報欄位的內容能保持水平對齊。

修改內容

  • ios/DPIPWidgets/DPIPWidgets.swift
    • 在天氣圖示加上 .frame(height: compact ? 32 : 40)。
    • Medium Widget 使用 32 pt,Large Widget 使用 40 pt。
    • 保留原本的字體大小與預報資料顯示邏輯。

這次只有一行 SwiftUI 排版調整,不涉及 API、資料結構或天氣圖示對應邏輯。

相關 issue

沒有對應的 issue。

怎麼驗

  • Xcode Preview:確認 Medium、Large Widget 修改前後的排版。
  • 混合天氣圖示:確認不同 SF Symbols 不再造成溫度、降雨機率錯位。
  • tool/dev/test_ios.sh:本機測試通過。
  • tool/commit.sh --push:無 Blocker,1 項 Warning。
  • 尚未在 iOS 實機上完成驗證。

UI Before / After

以下對照 Medium 與 Large Widget 在修正前後的顯示結果。

Widget Before After
Medium Medium Widget before fix - Misaligned hourly forecast temperatures and rain probabilities Medium Widget after fix - Aligned hourly forecast temperatures and rain probabilities
Large Large Widget before fix - Inconsistent vertical alignment across weather icons Large Widget after fix - Consistent vertical alignment across weather icons

修正後,不同天氣圖示不再影響下方溫度及降雨機率的垂直排列,讓每小時預報資訊維持一致的水平線。

檢查清單

  • Commit 格式檢查通過
  • 一個 Commit 只處理一件事
  • 本機 iOS Swift 測試通過
  • 沒有新增使用者可見字串
  • Medium / Large Widget 視覺驗證
  • CI 全部通過(PR 建立後確認)
  • 深色模式及文字對比確認(若尚未測試)

@YinCheng0106 YinCheng0106 added this to the v26.4 milestone Oct 22, 2026
@YinCheng0106 YinCheng0106 self-assigned this Oct 22, 2026
Copilot AI balanced review requested due to automatic review settings October 22, 2026 16:37
@YinCheng0106 YinCheng0106 added the ios Issues or pull requests related to the iOS platform. label Oct 22, 2026

This comment was marked as low quality.

@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.49%. Comparing base (5b3a103) to head (fb9ad50).

☔ 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.

@lowrt lowrt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Platform: ios

Fix(zh-Hant): 修正天氣小工具每小時預報的溫度與降雨機率未對齊問題
Fix(en-US): fix misaligned temperatures and rain probabilities in hourly forecasts
@YinCheng0106
YinCheng0106 force-pushed the fix/ios-widget-forecast-icon-alignment branch from a4622e5 to fb9ad50 Compare October 24, 2026 13:36
@github-actions

Copy link
Copy Markdown

✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s).

@PiscesXD

Copy link
Copy Markdown
Member

LGTM

@PiscesXD
PiscesXD merged commit fc8be25 into main Oct 25, 2026
8 checks passed
@PiscesXD
PiscesXD deleted the fix/ios-widget-forecast-icon-alignment branch October 25, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ios Issues or pull requests related to the iOS platform. size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants