Restore Live shelf on Today, flatten Feed to time-ordered highlights
Today tab: Removed LiveSituationBar, restored the full Live game shelf below the featured Astros card where it belongs. Feed tab: Changed from two grouped shelves (condensed / highlights) to a single horizontal scroll with ALL highlights ordered by timestamp (most recent first). Added condensed game badge overlay on thumbnails. Added date field to Highlight model for time-based ordering. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -35,23 +35,18 @@ struct FeedView: View {
|
||||
if viewModel.highlights.isEmpty && !viewModel.isLoading {
|
||||
emptyState
|
||||
} else {
|
||||
// Condensed Games
|
||||
if !viewModel.condensedGames.isEmpty {
|
||||
highlightShelf(
|
||||
title: "Condensed Games",
|
||||
icon: "film.stack",
|
||||
items: viewModel.condensedGames
|
||||
)
|
||||
}
|
||||
|
||||
// Latest Highlights
|
||||
if !viewModel.latestHighlights.isEmpty {
|
||||
highlightShelf(
|
||||
title: "Latest Highlights",
|
||||
icon: "play.circle.fill",
|
||||
items: viewModel.latestHighlights
|
||||
)
|
||||
// All highlights in one horizontal scroll, ordered by time
|
||||
ScrollView(.horizontal) {
|
||||
LazyHStack(spacing: DS.Spacing.cardGap) {
|
||||
ForEach(viewModel.highlights) { item in
|
||||
highlightCard(item)
|
||||
.frame(width: cardWidth)
|
||||
}
|
||||
}
|
||||
.padding(.vertical, 8)
|
||||
}
|
||||
.platformFocusSection()
|
||||
.scrollClipDisabled()
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, edgeInset)
|
||||
@@ -79,31 +74,6 @@ struct FeedView: View {
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private func highlightShelf(title: String, icon: String, items: [HighlightItem]) -> some View {
|
||||
VStack(alignment: .leading, spacing: 14) {
|
||||
Label(title, systemImage: icon)
|
||||
#if os(tvOS)
|
||||
.font(.system(size: 24, weight: .bold, design: .rounded))
|
||||
#else
|
||||
.font(.system(size: 18, weight: .bold, design: .rounded))
|
||||
#endif
|
||||
.foregroundStyle(DS.Colors.textSecondary)
|
||||
|
||||
ScrollView(.horizontal) {
|
||||
LazyHStack(spacing: DS.Spacing.cardGap) {
|
||||
ForEach(items) { item in
|
||||
highlightCard(item)
|
||||
.frame(width: cardWidth)
|
||||
}
|
||||
}
|
||||
.padding(.vertical, 8)
|
||||
}
|
||||
.platformFocusSection()
|
||||
.scrollClipDisabled()
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private func highlightCard(_ item: HighlightItem) -> some View {
|
||||
Button {
|
||||
@@ -136,6 +106,25 @@ struct FeedView: View {
|
||||
.font(.system(size: playIconSize))
|
||||
.foregroundStyle(.white.opacity(0.8))
|
||||
.shadow(radius: 4)
|
||||
|
||||
// Condensed/Recap badge
|
||||
if item.isCondensedGame {
|
||||
VStack {
|
||||
HStack {
|
||||
Spacer()
|
||||
Text("CONDENSED")
|
||||
.font(DS.Fonts.caption)
|
||||
.foregroundStyle(.white)
|
||||
.kerning(0.8)
|
||||
.padding(.horizontal, 8)
|
||||
.padding(.vertical, 4)
|
||||
.background(DS.Colors.media)
|
||||
.clipShape(Capsule())
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(8)
|
||||
}
|
||||
}
|
||||
.frame(height: thumbnailHeight)
|
||||
.clipShape(RoundedRectangle(cornerRadius: DS.Radii.compact))
|
||||
|
||||
Reference in New Issue
Block a user