feat: compact notification rows (#55)

## 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
This commit is contained in:
systemBlue 2026-06-09 12:21:05 +02:00 committed by secana
parent 78c91cd2a9
commit b1942df58d
2 changed files with 22 additions and 16 deletions

View file

@ -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)
}
}

View file

@ -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)
}
}