feat: enforce custom Theme colors app-wide, add debug sample trips and poll
Replace all system colors (.secondary, Color(.secondarySystemBackground), etc.) with Theme.textPrimary/textSecondary/textMuted/cardBackground/ surfaceGlow across 13 views. Remove PostHog debug logging. Add debug settings for sample trips and hardcoded group poll preview. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -46,6 +46,8 @@ struct PollCreationView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.scrollContentBackground(.hidden)
|
||||
.themedBackground()
|
||||
.navigationTitle("Create Poll")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
@@ -94,6 +96,7 @@ struct PollCreationView: View {
|
||||
// MARK: - Trip Selection Row
|
||||
|
||||
private struct TripSelectionRow: View {
|
||||
@Environment(\.colorScheme) private var colorScheme
|
||||
let trip: Trip
|
||||
let isSelected: Bool
|
||||
let onTap: () -> Void
|
||||
@@ -104,18 +107,18 @@ private struct TripSelectionRow: View {
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text(trip.displayName)
|
||||
.font(.headline)
|
||||
.foregroundStyle(.primary)
|
||||
.foregroundStyle(Theme.textPrimary(colorScheme))
|
||||
|
||||
Text(tripSummary)
|
||||
.font(.subheadline)
|
||||
.foregroundStyle(.secondary)
|
||||
.foregroundStyle(Theme.textSecondary(colorScheme))
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
Image(systemName: isSelected ? "checkmark.circle.fill" : "circle")
|
||||
.font(.title2)
|
||||
.foregroundStyle(isSelected ? Theme.warmOrange : .secondary)
|
||||
.foregroundStyle(isSelected ? Theme.warmOrange : Theme.textMuted(colorScheme))
|
||||
.accessibilityHidden(true)
|
||||
}
|
||||
.contentShape(Rectangle())
|
||||
|
||||
@@ -452,7 +452,7 @@ private struct TripPreviewCard: View {
|
||||
|
||||
Text(trip.displayName)
|
||||
.font(.headline)
|
||||
.foregroundStyle(.primary)
|
||||
.foregroundStyle(Theme.textPrimary(colorScheme))
|
||||
}
|
||||
|
||||
// Date range and duration
|
||||
@@ -462,7 +462,7 @@ private struct TripPreviewCard: View {
|
||||
Label("\(trip.tripDuration) days", systemImage: "clock")
|
||||
}
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
.foregroundStyle(Theme.textSecondary(colorScheme))
|
||||
|
||||
HStack {
|
||||
Label("\(trip.stops.count) stops", systemImage: "mappin.and.ellipse")
|
||||
@@ -470,13 +470,13 @@ private struct TripPreviewCard: View {
|
||||
Label("\(trip.stops.flatMap { $0.games }.count) games", systemImage: "sportscourt")
|
||||
}
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
.foregroundStyle(Theme.textSecondary(colorScheme))
|
||||
}
|
||||
|
||||
Image(systemName: "chevron.right")
|
||||
.font(.caption)
|
||||
.fontWeight(.semibold)
|
||||
.foregroundStyle(.tertiary)
|
||||
.foregroundStyle(Theme.textMuted(colorScheme))
|
||||
.accessibilityHidden(true)
|
||||
}
|
||||
.padding()
|
||||
@@ -484,7 +484,7 @@ private struct TripPreviewCard: View {
|
||||
.clipShape(RoundedRectangle(cornerRadius: 12))
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 12)
|
||||
.strokeBorder(Color.secondary.opacity(0.1), lineWidth: 1)
|
||||
.strokeBorder(Theme.surfaceGlow(colorScheme), lineWidth: 1)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,17 +34,21 @@ struct PollVotingView: View {
|
||||
onMoveDown: { viewModel.moveTripDown(at: index) }
|
||||
)
|
||||
.accessibilityHint("Drag to change ranking position, or use move up and move down buttons")
|
||||
.listRowBackground(Theme.cardBackground(colorScheme))
|
||||
.listRowSeparatorTint(Theme.surfaceGlow(colorScheme))
|
||||
}
|
||||
.onMove { source, destination in
|
||||
viewModel.moveTrip(from: source, to: destination)
|
||||
}
|
||||
}
|
||||
.listStyle(.plain)
|
||||
.scrollContentBackground(.hidden)
|
||||
.environment(\.editMode, .constant(.active))
|
||||
|
||||
// Submit button
|
||||
submitButton
|
||||
}
|
||||
.themedBackground()
|
||||
.navigationTitle("Rank Trips")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
@@ -88,10 +92,11 @@ struct PollVotingView: View {
|
||||
|
||||
Text("Drag to rank your preferences")
|
||||
.font(.headline)
|
||||
.foregroundStyle(Theme.textPrimary(colorScheme))
|
||||
|
||||
Text("Your top choice should be at the top. You can drag, or use the move buttons.")
|
||||
.font(.subheadline)
|
||||
.foregroundStyle(.secondary)
|
||||
.foregroundStyle(Theme.textSecondary(colorScheme))
|
||||
}
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity)
|
||||
@@ -130,6 +135,7 @@ struct PollVotingView: View {
|
||||
// MARK: - Ranking Row
|
||||
|
||||
private struct RankingRow: View {
|
||||
@Environment(\.colorScheme) private var colorScheme
|
||||
let rank: Int
|
||||
let trip: Trip
|
||||
let canMoveUp: Bool
|
||||
@@ -150,10 +156,11 @@ private struct RankingRow: View {
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
Text(trip.displayName)
|
||||
.font(.headline)
|
||||
.foregroundStyle(Theme.textPrimary(colorScheme))
|
||||
|
||||
Text(tripSummary)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
.foregroundStyle(Theme.textMuted(colorScheme))
|
||||
}
|
||||
|
||||
Spacer()
|
||||
@@ -175,7 +182,7 @@ private struct RankingRow: View {
|
||||
.disabled(!canMoveDown)
|
||||
.accessibilityLabel("Move \(trip.displayName) down")
|
||||
}
|
||||
.foregroundStyle(.secondary)
|
||||
.foregroundStyle(Theme.textSecondary(colorScheme))
|
||||
}
|
||||
.padding(.vertical, 4)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user