From b1942df58d370be34a93a2127772d3406ce978d9 Mon Sep 17 00:00:00 2001 From: systemBlue Date: Tue, 9 Jun 2026 12:21:05 +0200 Subject: [PATCH] feat: compact notification rows (#55) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What Notification rows now put the repository name and timestamp on one line ("repo · time") instead of two stacked caption lines, so the list scans like Mail and fits more per screen. The unread dot drops its `glassEffect` for a plain filled circle (cleaner, and avoids GPU glass compositing on a 10pt element inside a scrolling list). Before: title / repo / time on three lines. After: title, then "repo · time", with the repo truncating in the middle and the timestamp fixed-width. Verified: builds clean (Xcode 26, iPhone 17 Pro simulator), SwiftLint passes, confirmed in the simulator with preview data. --- I grant Stefan Hausotte an irrevocable, worldwide, royalty-free license to use, sublicense, and distribute my contribution, including through Apple's App Store under the project's App Store exception. Reviewed-on: https://codeberg.org/secana/Forji/pulls/55 --- .../MergedNotificationsOverviewView.swift | 19 +++++++++++-------- .../Views/NotificationsOverviewView.swift | 19 +++++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/Forji/Forji/Views/MergedNotificationsOverviewView.swift b/Forji/Forji/Views/MergedNotificationsOverviewView.swift index 76fbc88..3e4fdcd 100644 --- a/Forji/Forji/Views/MergedNotificationsOverviewView.swift +++ b/Forji/Forji/Views/MergedNotificationsOverviewView.swift @@ -267,13 +267,17 @@ private struct MergedNotificationRow: View { } } - Text(notification.repository.fullName) - .font(.caption) - .foregroundStyle(.secondary) - - Text(formatRelativeDate(notification.updatedAt)) - .font(.caption) - .foregroundStyle(.secondary) + HStack(spacing: 4) { + Text(notification.repository.fullName) + .lineLimit(1) + .truncationMode(.middle) + Text("·") + .foregroundStyle(.tertiary) + Text(formatRelativeDate(notification.updatedAt)) + .fixedSize() + } + .font(.caption) + .foregroundStyle(.secondary) } Spacer() @@ -282,7 +286,6 @@ private struct MergedNotificationRow: View { Circle() .fill(.blue) .frame(width: 10, height: 10) - .glassEffect(.regular.tint(.blue)) .padding(.top, 6) } } diff --git a/Forji/Forji/Views/NotificationsOverviewView.swift b/Forji/Forji/Views/NotificationsOverviewView.swift index 7a4e9ec..3539fa1 100644 --- a/Forji/Forji/Views/NotificationsOverviewView.swift +++ b/Forji/Forji/Views/NotificationsOverviewView.swift @@ -249,13 +249,17 @@ private struct NotificationRow: View { .font(.body) .lineLimit(2) - Text(notification.repository.fullName) - .font(.caption) - .foregroundStyle(.secondary) - - Text(formatRelativeDate(notification.updatedAt)) - .font(.caption) - .foregroundStyle(.secondary) + HStack(spacing: 4) { + Text(notification.repository.fullName) + .lineLimit(1) + .truncationMode(.middle) + Text("·") + .foregroundStyle(.tertiary) + Text(formatRelativeDate(notification.updatedAt)) + .fixedSize() + } + .font(.caption) + .foregroundStyle(.secondary) } Spacer() @@ -264,7 +268,6 @@ private struct NotificationRow: View { Circle() .fill(.blue) .frame(width: 10, height: 10) - .glassEffect(.regular.tint(.blue)) .padding(.top, 6) } }