Cinematic UI overhaul: focus states, full-bleed hero, score bug cards, grid Intel
Phase 1 - Focus & Typography: New TVFocusButtonStyle with 1.04x scale +
white glow border on focus, 0.97x press. Enforced 22px minimum text on
tvOS across DesignSystem (tvCaption 22px, tvBody 24px, tvDataValue 24px).
DataLabelStyle uses tvOS caption with reduced kerning.
Phase 2 - Today Tab: FeaturedGameCard redesigned as full-bleed hero with
away team left, home team right, 96pt score centered, DiamondView for
live count/outs. Removed side panel, replaced with single subtitle row.
GameCardView redesigned as horizontal score-bug style (~120px tall vs
320px) with team color accent bar, stacked logos, centered score, inline
mini linescore. Both show record + streak on every card.
Phase 3 - Intel Tab: Side-by-side layout on tvOS with standings
horizontal scroll on left (60%) and leaders vertical column on right
(40%). Both visible without scrolling past each other. iOS keeps the
stacked layout.
Phase 4 - Feed: Cards now horizontal with thumbnail left (300px tvOS),
info right. Added timestamp ("2h ago") to every card. All text meets
22px minimum on tvOS. Condensed game badge uses larger font.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -40,14 +40,14 @@ enum DS {
|
||||
static let bodySmall = Font.system(size: 13, weight: .medium)
|
||||
static let caption = Font.system(size: 11, weight: .bold, design: .rounded)
|
||||
|
||||
// tvOS scaled variants
|
||||
// tvOS scaled variants — 22px minimum for readability at 10ft
|
||||
#if os(tvOS)
|
||||
static let tvSectionTitle = Font.system(size: 36, weight: .bold, design: .rounded)
|
||||
static let tvCardTitle = Font.system(size: 26, weight: .bold, design: .rounded)
|
||||
static let tvScore = Font.system(size: 34, weight: .black, design: .rounded).monospacedDigit()
|
||||
static let tvDataValue = Font.system(size: 22, weight: .bold, design: .rounded).monospacedDigit()
|
||||
static let tvBody = Font.system(size: 20, weight: .medium)
|
||||
static let tvCaption = Font.system(size: 15, weight: .bold, design: .rounded)
|
||||
static let tvSectionTitle = Font.system(size: 38, weight: .bold, design: .rounded)
|
||||
static let tvCardTitle = Font.system(size: 28, weight: .bold, design: .rounded)
|
||||
static let tvScore = Font.system(size: 36, weight: .black, design: .rounded).monospacedDigit()
|
||||
static let tvDataValue = Font.system(size: 24, weight: .bold, design: .rounded).monospacedDigit()
|
||||
static let tvBody = Font.system(size: 24, weight: .medium)
|
||||
static let tvCaption = Font.system(size: 22, weight: .bold, design: .rounded)
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -87,10 +87,15 @@ enum DS {
|
||||
struct DataLabelStyle: ViewModifier {
|
||||
func body(content: Content) -> some View {
|
||||
content
|
||||
#if os(tvOS)
|
||||
.font(DS.Fonts.tvCaption)
|
||||
.kerning(1.0)
|
||||
#else
|
||||
.font(DS.Fonts.caption)
|
||||
.kerning(1.5)
|
||||
#endif
|
||||
.foregroundStyle(DS.Colors.textQuaternary)
|
||||
.textCase(.uppercase)
|
||||
.kerning(1.5)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import SwiftUI
|
||||
|
||||
// MARK: - iOS Press Style
|
||||
|
||||
struct PlatformPressButtonStyle: ButtonStyle {
|
||||
func makeBody(configuration: Configuration) -> some View {
|
||||
configuration.label
|
||||
@@ -9,11 +11,38 @@ struct PlatformPressButtonStyle: ButtonStyle {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - tvOS Focus Style
|
||||
|
||||
#if os(tvOS)
|
||||
struct TVFocusButtonStyle: ButtonStyle {
|
||||
@Environment(\.isFocused) private var isFocused
|
||||
|
||||
func makeBody(configuration: Configuration) -> some View {
|
||||
configuration.label
|
||||
.scaleEffect(configuration.isPressed ? 0.97 : isFocused ? 1.04 : 1.0)
|
||||
.opacity(configuration.isPressed ? 0.85 : 1.0)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 24, style: .continuous)
|
||||
.strokeBorder(.white.opacity(isFocused ? 0.3 : 0), lineWidth: 2)
|
||||
)
|
||||
.shadow(
|
||||
color: isFocused ? .white.opacity(0.12) : .clear,
|
||||
radius: isFocused ? 20 : 0,
|
||||
y: isFocused ? 8 : 0
|
||||
)
|
||||
.animation(.easeInOut(duration: 0.2), value: isFocused)
|
||||
.animation(.easeOut(duration: 0.12), value: configuration.isPressed)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// MARK: - Platform Extensions
|
||||
|
||||
extension View {
|
||||
@ViewBuilder
|
||||
func platformCardStyle() -> some View {
|
||||
#if os(tvOS)
|
||||
self.buttonStyle(.card)
|
||||
self.buttonStyle(TVFocusButtonStyle())
|
||||
#else
|
||||
self.buttonStyle(PlatformPressButtonStyle())
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user