Repository navigation
Match corner progress preview to the watch - #6073
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Layout parity needs human confirmation in a native watch host because the rendering snapshots exercise the approximation.
0 open findings
What changed in this PR
Aligns the iPhone corner-complication preview with the watch’s progress-bar layout, building on #5941.
Changes:
- Places progress-mode text ahead of the bar and distinguishes gauge markers from progress arcs.
- Connects the indicator selection across configuration, previews, and watch snapshots.
- Adds localized controls and configuration/snapshot test coverage.
| File | Description |
|---|---|
| Tests/WatchComplications/CornerComplicationSnapshot.test.swift | Adds progress-layout snapshot cases. |
| Tests/WatchAppTests/CornerComplicationWatchSnapshot.test.swift | Adds matching watch-side snapshot cases. |
| Tests/Shared/WatchComplicationConfigGaugeRange.test.swift | Tests indicator defaults and family overrides. |
| Tests/App/Watch/WatchComplicationConfigurationSheetSnapshot.test.swift | Adds light/dark picker snapshots. |
| Sources/WatchWidgets/WatchWidgetComplicationSnapshot.swift | Reads the progress selection in widget snapshots. |
| Sources/WatchWidgets/Complications/CornerComplicationView.swift | Selects native progress or gauge rendering. |
| Sources/WatchApp/Complication/WatchWidgetComplicationSnapshot.swift | Transfers the indicator selection to widgets. |
| Sources/Shared/Resources/Swiftgen/Strings.swift | Adds generated localization accessors. |
| Sources/Shared/API/Models/WatchComplication.swift | Provides localized indicator titles. |
| Sources/HAWatchComplications/Sources/CornerComplicationRenderModel.swift | Adds the indicator display mode. |
| Sources/HAWatchComplications/Sources/CornerComplicationContentView.swift | Updates progress text placement and gauge drawing. |
| Sources/HAModels/Sources/WatchComplicationConfig.swift | Stores the selection with a gauge fallback. |
| Sources/App/Settings/AppleWatch/Complications/WatchComplicationConfigurationSheet.swift | Adds the corner indicator picker. |
| Sources/App/Settings/AppleWatch/Complications/Preview/CornerComplicationPreview.swift | Passes the selected mode into previews. |
| Sources/App/Resources/en.lproj/Localizable.strings | Adds English indicator labels. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
bb264b1 to
84ab83f
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6073 +/- ##
==========================================
- Coverage 56.11% 56.09% -0.03%
==========================================
Files 1256 1256
Lines 83431 83431
==========================================
- Hits 46819 46797 -22
- Misses 36612 36634 +22 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Found 2 unused localization strings in the codebase. Click to see detailsTo remove them, run the |
AI Policy
Select exactly one option that describes AI usage in this contribution:
Summary
In progress bar mode the watch draws the corner text on the same line as the bar, ahead of it. The iPhone preview now shows the same layout, so users know what to expect.
Screenshots
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#
Any other notes
Follow-up to #5941.