fix: add contentShape to all tappable rows so entire row area registers taps
Adds .contentShape(Rectangle()) or .contentShape(Capsule()) to 11 buttons, NavigationLinks, and onTapGesture handlers across 8 files where only the visible content (text/icons) was receiving taps instead of the full row. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -209,6 +209,7 @@ struct AchievementsListView: View {
|
||||
) {
|
||||
ForEach(filtered) { achievement in
|
||||
AchievementCard(achievement: achievement)
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
selectedAchievement = achievement
|
||||
}
|
||||
@@ -283,6 +284,7 @@ struct SportFilterButton: View {
|
||||
.background(isSelected ? color : Theme.cardBackground(colorScheme))
|
||||
.foregroundStyle(isSelected ? .white : Theme.textPrimary(colorScheme))
|
||||
.clipShape(Capsule())
|
||||
.contentShape(Capsule())
|
||||
.overlay {
|
||||
Capsule()
|
||||
.stroke(isSelected ? Color.clear : color.opacity(0.3), lineWidth: 1)
|
||||
|
||||
@@ -135,6 +135,7 @@ private struct SportChip: View {
|
||||
Capsule()
|
||||
.fill(isSelected ? sport.themeColor : Theme.cardBackgroundElevated(colorScheme))
|
||||
)
|
||||
.contentShape(Capsule())
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.accessibilityValue(isSelected ? "Selected" : "Not selected")
|
||||
@@ -173,6 +174,7 @@ private struct GamesListByYear: View {
|
||||
visit: visit,
|
||||
stadium: AppDataProvider.shared.stadium(for: visit.stadiumId)
|
||||
)
|
||||
.contentShape(Rectangle())
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user