Commit 80f435144b

80f435144bc4dab2a9498711f63ac2858f54412e

parent: 786da630a1

Unsigned

cmc <hello@cleberg.net> · 2026-08-28 04:52 UTC

explore: build the repo path as one attributed run

Text + Text is deprecated in iOS 26. The two halves have to stay a
single Text: the enclosing HStack spaces its children, so splitting
them would put a gap after the slash.

Layout: unified · split

gitbay/Views/Discovery/ExploreView.swift +11 −4
@@ -14,16 +14,23 @@ struct ExploreView: View {
14 )) 14 ))
15 } 15 }
16 16
17 /// One Text, not two: the HStack spaces its children, and a gap
18 /// between the owner and the name would read as part of the path.
19 private func path(of repo: PublicRepo) -> AttributedString {
20 var owner = AttributedString(repo.owner + "/")
21 owner.foregroundColor = .secondary
22 var name = AttributedString(repo.name)
23 name.font = .gbSans(.subheadline).weight(.medium)
24 return owner + name
25 }
26
17 var body: some View { 27 var body: some View {
18 List { 28 List {
19 ForEach(list.state.value ?? []) { repo in 29 ForEach(list.state.value ?? []) { repo in
20 NavigationLink(value: RepoRoute.repo(repo.path)) { 30 NavigationLink(value: RepoRoute.repo(repo.path)) {
21 VStack(alignment: .leading, spacing: 4) { 31 VStack(alignment: .leading, spacing: 4) {
22 HStack(spacing: 6) { 32 HStack(spacing: 6) {
23 Text(repo.owner + "/") 33 Text(path(of: repo))
24 .foregroundStyle(.secondary)
25 + Text(repo.name)
26 .fontWeight(.medium)
27 if repo.isArchived { 34 if repo.isArchived {
28 GBChip("archived", .secondary) 35 GBChip("archived", .secondary)
29 } 36 }