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 {
1414 ))
1515 }
1616
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
1727 var body: some View {
1828 List {
1929 ForEach(list.state.value ?? []) { repo in
2030 NavigationLink(value: RepoRoute.repo(repo.path)) {
2131 VStack(alignment: .leading, spacing: 4) {
2232 HStack(spacing: 6) {
23 Text(repo.owner + "/")
24 .foregroundStyle(.secondary)
25 + Text(repo.name)
26 .fontWeight(.medium)
33 Text(path(of: repo))
2734 if repo.isArchived {
2835 GBChip("archived", .secondary)
2936 }