Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AppleNugs/Core/Models.swift
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ enum AudioFormat: String {
}

/// Whether the format is compressed without loss — the single source of
/// truth for the lossless badge tint and the cassette's lossless tick.
/// truth for the price sticker (the lossless badge).
///
/// Deliberately an exhaustive switch rather than a `Set` literal or a
/// `default: false`: adding a case to `AudioFormat` should be a compile
Expand Down
18 changes: 9 additions & 9 deletions AppleNugs/Theme/Components/NowPlayingMetaText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import SwiftUI
///
/// Renders **exactly one** `Text(AttributedString)` — no wrapper stack, no
/// `contentShape`, no frame of its own — so it is a drop-in for the plain
/// `Text` it replaces at all sixteen render sites. Callers keep their entire
/// `Text` it replaces at every render site. Callers keep their entire
/// modifier chain (`.font`, `.tracking`, `.lineLimit`, `.truncationMode`,
/// `.multilineTextAlignment`); those are View modifiers and propagate to the
/// descendant Text, so metrics and truncation are unchanged. That matters:
/// several of these surfaces have no slack at all (the cassette's 25:16 ratio,
/// the pill's text budget, the faceplate's fixed-width ticker).
/// several of these surfaces have no slack at all (the pill's text budget above
/// all).
///
/// **Invisible at rest.** Each link run is given the surrounding foreground
/// color explicitly, which SwiftUI honors over its own link tint — verified by
Expand All @@ -29,9 +29,10 @@ struct NowPlayingMetaText: View {
var mode: NowPlayingMetaLine.Mode = .joined
var casing: NowPlayingMetaLine.Casing = .asIs
/// The glyph color. Callers that paint from a theme token can leave this
/// nil and set `.foregroundStyle` as they always have; the cassette passes
/// its local paper `ink` here because the run color has to be set on the
/// attributed string, not inherited, for the link runs to match.
/// nil and set `.foregroundStyle` as they always have; a caller painting
/// from a local color passes it here instead, because the run color has to
/// be set on the attributed string, not inherited, for the link runs to
/// match.
var tint: Color?
/// Rendered when there is no track. Absorbs the ticker surfaces' idle copy.
var idle: String?
Expand Down Expand Up @@ -60,9 +61,8 @@ struct NowPlayingMetaText: View {
if segments.isEmpty, (idle ?? "").isEmpty {
// Nothing to say — render NOTHING, not an empty Text, which would
// still claim a line's height. Most of the sites this replaces were
// `if let` and depended on that: the cassette's 25:16 ratio budget
// has ~19pt of slack and has already been yielded twice by a label
// growing a line.
// `if let` and depended on that: a phantom empty line moves every
// layout that budgets its height (the pill above all).
EmptyView()
} else {
Text(attributed)
Expand Down
2 changes: 1 addition & 1 deletion AppleNugs/Views/HapticButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import SwiftUI

/// The transport's tactile vocabulary. Three feelings, used everywhere, so a
/// tap means the same thing whichever surface it lands on — the docked bar,
/// the full-screen player, the faceplate, the Click Wheel.
/// the full-screen player, the pill and its expanded panel.
extension SensoryFeedback {
/// Play/pause: the one press that commits to something.
static let transportToggle = SensoryFeedback.impact(weight: .medium, intensity: 0.9)
Expand Down
7 changes: 4 additions & 3 deletions AppleNugs/Views/HomeColumns.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import Foundation
/// `AppleNugsTests` bundle (the `PillLayout` trick).
///
/// Home is one column on a phone. On a wide canvas — the iPhone Duo's inner
/// display (~870pt of Home content flat, ~629pt upright), or a landscape
/// iPhone — one column stretches the hero into a long strip of bare card
/// stock and leaves little else above the fold. There, Home splits instead:
/// display (~870pt of Home content flat, ~629pt upright; regular iPhones are
/// portrait-locked by `OrientationGate`, so they never get here) — one column
/// stretches the hero into a long strip of bare card stock and leaves little
/// else above the fold. There, Home splits instead:
/// the hero keeps its designed upright blister pack in a leading column, and
/// favorites, the nice list and the crate stack beside it.
///
Expand Down
4 changes: 2 additions & 2 deletions AppleNugs/Views/NowPlaying/NowPlayingFitWidth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ extension View {
/// column such as the ~300pt player column beside the queue on iPhone Duo's
/// upright inner display.
///
/// Click Wheel's `controlPad` pattern, with the natural size MEASURED rather
/// than hard-coded (SF Symbol advances aren't known up front): the row is
/// `NowPlayingFit.scale` + `scaleEffect` + a matching frame, with the natural
/// size MEASURED rather than hard-coded (SF Symbol advances aren't known up front): the row is
/// measured at its ideal size before `scaleEffect`, which changes only the
/// drawing, so the measurement doesn't depend on the scale; the available
/// width is measured on the full-width container, whose width is the
Expand Down
5 changes: 2 additions & 3 deletions AppleNugs/iOS/NowPlayingArrangement.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ import SwiftUI
/// whose ScrollView keeps its own vertical scrolling) moves the whole
/// arrangement down 1:1 and closes it past a threshold, otherwise springs it
/// back — policy in `NowPlayingDismissDrag`. It is a plain `.gesture`, so any
/// child gesture that recognizes wins: the scrub and volume sliders, every
/// button, and The Receiver's volume ladder (`DragGesture(minimumDistance: 0)`,
/// which recognizes on touch-down). The cover is presented with a clear
/// child gesture that recognizes wins: the scrub and volume sliders and every
/// button. The cover is presented with a clear
/// presentation background so the app shows through as the player slides;
/// at rest every player and the panel paint their own opaque, safe-area-
/// ignoring backgrounds, and the `palette.base` backing below covers any seam
Expand Down
4 changes: 2 additions & 2 deletions AppleNugs/iOS/NowPlayingPill/PillLayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ enum PillLayout {
/// The narrowest text column that also carries the show after the artist
/// ("Goose · 11/11/26 The Truth, Nashville, TN"). Regular iPhones (~104pt
/// with the chevron) and the Duo's folded outer display stay artist-only;
/// the Duo's inner display flat (~560pt) and a landscape iPhone have room
/// to spare. (Upright, the Duo's tab bar is horizontal again and the pill
/// the Duo's inner display flat (~560pt) has room to spare. (Phones are
/// portrait-locked, so no regular iPhone gets here. Upright, the Duo's tab bar is horizontal again and the pill
/// is ~400pt: artist only.)
static let minShowLineWidth: CGFloat = 220

Expand Down
10 changes: 3 additions & 7 deletions AppleNugs/iOS/NowPlayingPill/PillLeadingSlot.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@ import SwiftUI

/// The pill's 32pt leading slot: the cover, wrapped in the progress ring.
///
/// This was five themed faces (Tape Room's reel, the Receiver's VU, Click
/// Wheel's disc, Shoebox's J-card spine, and a plain chip for Soundboard).
/// The ring changed that calculus — a ring wants one consistent shape to
/// encircle, and three of those faces are themselves circles, so the slot
/// would have carried two concentric rings. Theme identity lives on in the
/// full-screen player, the palette, the typography, the copy, and the macOS
/// miniplayer.
/// One uniform `ArtChip`, clipped to a circle: a ring wants one consistent
/// shape to encircle, and the circle keeps the ring's 1pt gap at every angle
/// (a rounded square's corners would put the arc on the cover).
///
/// Nothing in THIS view observes `player.currentTime`; the ring is a separate
/// leaf so the 4Hz playback tick stops there. See `PillProgressRing`.
Expand Down
Loading
Loading