diff --git a/AppleNugs/Views/ArtistListView.swift b/AppleNugs/Views/ArtistListView.swift index a0cdbfb..309b924 100644 --- a/AppleNugs/Views/ArtistListView.swift +++ b/AppleNugs/Views/ArtistListView.swift @@ -10,7 +10,7 @@ struct ArtistListView: View { @State private var filter = "" @State private var loading = false @State private var error: String? - /// Every artist's photo, by id (iOS). Empty until the walk lands, and for + /// Every artist's photo, by id. Empty until the walk lands, and for /// good if it fails — rows show the monogram meanwhile. @State private var avatars: [String: URL] = [:] @FocusState private var filterFocused: Bool @@ -67,11 +67,9 @@ struct ArtistListView: View { // ruling 2: no show counts), heavy 17 on frost // rules, under heavy slush letter headers. HStack(spacing: 12) { - #if os(iOS) // The artist's photo, as on Home's crate. ArtistPortrait(url: avatars[artist.id], name: artist.name) .frame(width: Self.portraitSide, height: Self.portraitSide) - #endif Text(artist.name) .font(theme.type.title(17)) .foregroundStyle(theme.palette.textPrimary) @@ -187,15 +185,18 @@ struct ArtistListView: View { } catch { self.error = error.localizedDescription } - #if os(iOS) // After the names are on screen: photos are a nicety, never a reason // to hold the list back, and a failure reports nothing. if !artists.isEmpty, avatars.isEmpty { avatars = (try? await app.allArtistAvatars()) ?? [:] } - #endif } - /// The row's photo: 40pt, a size that reads as a face in a dense list. + /// The row's photo: a size that reads as a face in a dense list — 40pt on + /// a phone, 32pt in the Mac's tighter rows. + #if os(iOS) private static let portraitSide: CGFloat = 40 + #else + private static let portraitSide: CGFloat = 32 + #endif } diff --git a/AppleNugs/Views/HomeView.swift b/AppleNugs/Views/HomeView.swift index 6097f9e..b1311a1 100644 --- a/AppleNugs/Views/HomeView.swift +++ b/AppleNugs/Views/HomeView.swift @@ -213,9 +213,9 @@ struct HomeView: View { .padding(.vertical, 2) } - /// The crate's grid. The Mac keeps the design sheet's `.crategrid`: rows of - /// a small monogram and the name, three across a ~800pt Home. iOS gets - /// compact TILES instead — monogram above, name below — because rows sized + /// The crate's grid. The Mac keeps the design sheet's `.crategrid` layout: + /// rows of a small circular photo and the name, three across a ~800pt Home. + /// iOS gets compact TILES instead — photo above, name below — because rows sized /// for the Mac ran the full width of a phone (one ~350pt bar per artist) /// and of the Duo's right column, mostly bare. Tiles put three across a /// portrait phone and five across the flat Duo's column. @@ -273,7 +273,9 @@ struct HomeView: View { private func crateCell(_ artist: ArtistEntry) -> some View { HStack(spacing: 11) { - MonogramTile(text: artist.name, size: 36) + // The artist's photo in a circle, as on iOS and the Artists list. + ArtistPortrait(url: avatars[artist.id], name: artist.name) + .frame(width: 36, height: 36) Text(artist.name) .font(theme.type.body(14)) .foregroundStyle(theme.palette.textPrimary) @@ -359,13 +361,11 @@ struct HomeView: View { } catch { sampleError = error.localizedDescription } - #if os(iOS) // Photos are a nicety on top of a crate that already works: a failure // leaves the monograms, and reports nothing. if !sample.isEmpty { avatars = (try? await app.artistAvatars(ids: sample.map(\.id))) ?? [:] } - #endif } }