From a5f6f3d9c5549ca52693bd216c58f128bc3376fb Mon Sep 17 00:00:00 2001 From: Gabriel Jordan Date: Sun, 25 Oct 2026 11:43:50 -0300 Subject: [PATCH] Keep long account names and wide icons tidy in alerts The account chip wrapped onto two lines when the login was long, and wide symbols like the team review one overflowed their circle. The chip now stays on one line and shortens in the middle, and alert symbols are fitted into a box sized by the circle. --- CHANGELOG.md | 4 ++++ Sources/Pullo/DesignSystem/Components/Chip.swift | 2 ++ Sources/Pullo/Features/Alerts/AlertIcon.swift | 5 ++++- Sources/Pullo/Features/Alerts/PeekView.swift | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0934f8a..bf5f4be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to Pullo are listed here, newest first. The format follows [ ## [Unreleased] +### Fixed +- A long account name on an alert stays on one line and shortens in the middle instead of wrapping. +- Wide alert icons, like the team review one, fit inside their circle. + ## [0.11.2] - 2026-10-23 ### Fixed diff --git a/Sources/Pullo/DesignSystem/Components/Chip.swift b/Sources/Pullo/DesignSystem/Components/Chip.swift index a63468b..4a721c9 100644 --- a/Sources/Pullo/DesignSystem/Components/Chip.swift +++ b/Sources/Pullo/DesignSystem/Components/Chip.swift @@ -7,6 +7,8 @@ struct Chip: View { Text(verbatim: text) .font(.panel(.caption, .semibold)) .foregroundStyle(.textSecondary) + .lineLimit(1) + .truncationMode(.middle) .padding(.horizontal, 6) .padding(.vertical, 1) .background(Capsule().fill(.surface)) diff --git a/Sources/Pullo/Features/Alerts/AlertIcon.swift b/Sources/Pullo/Features/Alerts/AlertIcon.swift index 3757c10..020fd78 100644 --- a/Sources/Pullo/Features/Alerts/AlertIcon.swift +++ b/Sources/Pullo/Features/Alerts/AlertIcon.swift @@ -27,7 +27,10 @@ struct AlertIcon: View { Circle().fill(.black) Circle().fill(alert.tint.opacity(alert.actor == nil ? 0.2 : 0.35)) Image(systemName: alert.symbol) - .font(.system(size: diameter * 0.5, weight: .bold)) + .resizable() + .scaledToFit() + .fontWeight(.bold) + .frame(width: diameter * 0.62, height: diameter * 0.42) .foregroundStyle(alert.tint) } .frame(width: diameter, height: diameter) diff --git a/Sources/Pullo/Features/Alerts/PeekView.swift b/Sources/Pullo/Features/Alerts/PeekView.swift index ddea7e8..dcfc6bd 100644 --- a/Sources/Pullo/Features/Alerts/PeekView.swift +++ b/Sources/Pullo/Features/Alerts/PeekView.swift @@ -19,6 +19,7 @@ struct PeekView: View { .font(.panel(.headline, .semibold)) .foregroundStyle(.white) .lineLimit(1) + .layoutPriority(1) accountChip } Text(alert.detail)