Skip to content

Conversation

@bgoncal
Copy link
Member

@bgoncal bgoncal commented Jan 28, 2026

Refactored WidgetBasicView to improve layout handling for compact and single-column widgets, including max height constraints and dynamic spacing. Moved corner radius logic in TileCardStyleModifier to a computed property for clarity. Updated DesignSystem corner radius constants for better documentation and added missing values.

Summary

Screenshots

CleanShot 2026-01-28 at 14 50 06@2x

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

Refactored WidgetBasicView to improve layout handling for compact and single-column widgets, including max height constraints and dynamic spacing. Moved corner radius logic in TileCardStyleModifier to a computed property for clarity. Updated DesignSystem corner radius constants for better documentation and added missing values.
@bgoncal bgoncal self-assigned this Jan 28, 2026
Copilot AI review requested due to automatic review settings January 28, 2026 13:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors widget tile layout behavior (especially for compact/single-column cases) and standardizes corner-radius usage by expanding DesignSystem.CornerRadius and simplifying widget tile styling code.

Changes:

  • Updated WidgetBasicView layout to better handle compact widgets (max height constraint, top alignment, and single-item row balancing).
  • Refactored TileCardStyleModifier corner radius logic into a computed property.
  • Expanded and documented DesignSystem.CornerRadius, adding missing values (e.g., twoAndHalf).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
Sources/Shared/DesignSystem/DesignSystem.swift Adds/organizes corner radius constants and improves inline documentation.
Sources/Extensions/Widgets/Common/WidgetBasicView.swift Refines widget tile layout with family-aware constraints and updated corner radius constant usage.
Sources/Extensions/Widgets/Common/TileCardStyleModifier.swift Extracts corner radius decision into a computed property for reuse/clarity.

bgoncal and others added 2 commits January 28, 2026 15:07
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@bgoncal bgoncal enabled auto-merge (squash) January 28, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants