Skip to content
Open
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: 2 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ dependencies {
implementation(libs.material3)
implementation("com.google.dagger:hilt-android:2.51.1")
implementation(libs.androidx.foundation)
implementation(libs.foundation)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify what each alias resolves to in the version catalog.
fd 'libs.versions.toml|versions.toml' -t f | xargs -I{} sh -c '
  echo "=== {} ==="
  rg -n "foundation|androidx\\.foundation|compose-bom|material-icons-extended" "{}"
'

Repository: cuappdev/score-android

Length of output: 385


Remove duplicate Foundation dependency with conflicting versions

The version catalog aliases resolve libs.foundation and libs.androidx-foundation to the same module (androidx.compose.foundation:foundation) but with different versions (1.10.3 vs 1.9.4). Having both dependencies creates a version conflict risk. Keep only one alias, preferably the newer version.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/build.gradle.kts` at line 84, Remove the duplicate Foundation dependency
that causes a version conflict: delete the implementation(libs.foundation) entry
and keep the newer alias implementation(libs.androidx-foundation) (or vice versa
keep only the one that resolves to version 1.10.3). Ensure only a single
androidx.compose.foundation dependency remains in the dependencies block to
avoid mixing libs.foundation and libs.androidx-foundation.

kapt("com.google.dagger:hilt-android-compiler:2.51.1")
implementation("androidx.hilt:hilt-navigation-compose:1.0.0")
implementation("com.google.accompanist:accompanist-pager:0.24.0-alpha")
Expand All @@ -103,6 +104,7 @@ dependencies {
lintChecks(libs.compose.lint.checks)
implementation(platform("com.google.firebase:firebase-bom:34.3.0"))
implementation("com.google.firebase:firebase-analytics")
implementation("androidx.compose.material:material-icons-extended:1.6.0")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Confirm BOM usage + explicit compose versions in this file.
rg -n 'compose-bom|androidx\.compose\..*:[0-9]+\.[0-9]+(\.[0-9]+)?|material-icons-extended' app/build.gradle.kts

Repository: cuappdev/score-android

Length of output: 222


🏁 Script executed:

# Read the build.gradle.kts file around the relevant lines
sed -n '70,120p' app/build.gradle.kts | cat -n

Repository: cuappdev/score-android

Length of output: 2477


🌐 Web query:

androidx.compose compose-bom 2025.11.01 material-icons-extended version

💡 Result:

For androidx.compose:compose-bom:2025.11.01, the mapped version of:

Citations:


🌐 Web query:

androidx.compose compose-bom 2025.11.01 navigation-compose version

💡 Result:

androidx.compose:compose-bom:2025.11.01 does not manage androidx.navigation:navigation-compose (Navigation artifacts aren’t included in the Compose BOM mapping list), so there’s no “navigation-compose version” implied by that BOM. [1]

If you want a contemporary stable Navigation Compose version from around that timeframe, androidx.navigation:navigation-compose:2.9.6 was released November 5, 2025. [2] (The Compose BOM 2025.11.01 itself was published Nov 19, 2025.) [3]

Sources
[1] https://developer.android.com/develop/ui/compose/bom/bom-mapping
[2] https://developer.android.com/jetpack/androidx/releases/navigation
[3] https://mvnrepository.com/artifact/androidx.compose/compose-bom/2025.11.01


Remove explicit version from material-icons-extended to align with Compose BOM

Line 107 pins version 1.6.0 while the Compose BOM on Line 75 (2025.11.01) specifies 1.7.8. This explicit pin forces a downgrade and breaks version alignment.

Proposed fix
-    implementation("androidx.compose.material:material-icons-extended:1.6.0")
+    implementation("androidx.compose.material:material-icons-extended")
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
implementation("androidx.compose.material:material-icons-extended:1.6.0")
implementation("androidx.compose.material:material-icons-extended")
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/build.gradle.kts` at line 107, Remove the explicit version suffix from
the implementation dependency for
"androidx.compose.material:material-icons-extended:1.6.0" so it inherits the
version from the Compose BOM (the compose BOM declaration in the build script),
preventing the BOM from being downgraded; locate the dependency string
"implementation(\"androidx.compose.material:material-icons-extended:1.6.0\")"
and change it to the form without a version so it aligns with the BOM-managed
Compose version.

}

apollo {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,76 +1,33 @@
package com.cornellappdev.score.components

import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.pager.HorizontalPager
import androidx.compose.foundation.pager.rememberPagerState
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyRow
import androidx.compose.foundation.lazy.items
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.cornellappdev.score.R
import com.cornellappdev.score.model.GameCardData
import com.cornellappdev.score.theme.CornellRed
import com.cornellappdev.score.theme.CrimsonPrimary
import com.cornellappdev.score.theme.GrayLight
import com.cornellappdev.score.util.gameList

@Composable
fun DotIndicator(
pagerState: androidx.compose.foundation.pager.PagerState,
totalPages: Int,
modifier: Modifier = Modifier,
dotSize: Dp = 14.dp,
selectedColor: Color = CrimsonPrimary,
unselectedColor: Color = GrayLight
) {
Row(
modifier = modifier,
horizontalArrangement = Arrangement.spacedBy(32.dp)
) {
for (i in 0 until totalPages) {
val color = if (i == pagerState.currentPage) selectedColor else unselectedColor
Canvas(
modifier = Modifier
.size(dotSize)
.padding(2.dp)
) {
drawCircle(color = color)
}
}
}
}

@Composable
fun GamesCarousel(
games: List<GameCardData>,
onClick: (String) -> Unit,
modifier: Modifier = Modifier,
) {
val pagerState = rememberPagerState(pageCount = { games.size })
Column(
modifier = modifier
.fillMaxWidth(),
verticalArrangement = Arrangement.spacedBy(16.dp, Alignment.Top),
LazyRow(
modifier = modifier.fillMaxWidth(),
contentPadding = PaddingValues(horizontal = 24.dp),
horizontalArrangement = Arrangement.spacedBy(16.dp)
) {
HorizontalPager(
state = pagerState,
modifier = Modifier.fillMaxWidth(),
contentPadding = PaddingValues(horizontal = 24.dp),
pageSpacing = 24.dp
) { page ->
val game = games[page]
items(games) { game ->
FeaturedGameCard(
leftTeamLogo = painterResource(R.drawable.cornell_logo),
rightTeamLogo = game.teamLogo,
Expand All @@ -81,21 +38,12 @@ fun GamesCarousel(
genderIcon = painterResource(game.genderIcon),
sportIcon = painterResource(game.sportIcon),
location = game.location,
modifier = Modifier,
headerModifier = Modifier,
gradientColor1 = CornellRed,
gradientColor2 = game.teamColor,
leftScore = game.cornellScore?.toInt(),
rightScore = game.otherScore?.toInt(),
onClick = { onClick(game.id) }
)
}

Box(modifier = Modifier.fillMaxWidth()) {
DotIndicator(
pagerState = pagerState,
totalPages = games.size,
modifier = Modifier.align(Alignment.Center)
onClick = { onClick(game.id) },
modifier = Modifier.width(300.dp)
)
}
}
Expand All @@ -105,4 +53,4 @@ fun GamesCarousel(
@Preview
private fun GamesCarouselPreview() = ScorePreview {
GamesCarousel(gameList, onClick = {})
}
}
17 changes: 16 additions & 1 deletion app/src/main/java/com/cornellappdev/score/nav/ScoreNavHost.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ import androidx.navigation.toRoute
import com.cornellappdev.score.model.ScoreEvent
import com.cornellappdev.score.nav.root.ScoreScreens
import com.cornellappdev.score.nav.root.ScoreScreens.Home
import com.cornellappdev.score.screen.EditProfileScreen
import com.cornellappdev.score.screen.GameDetailsScreen
import com.cornellappdev.score.screen.HighlightsScreen
import com.cornellappdev.score.screen.HighlightsSearchScreen
import com.cornellappdev.score.screen.HomeScreen
import com.cornellappdev.score.screen.PastGamesScreen
import com.cornellappdev.score.screen.ProfileScreen
import com.cornellappdev.score.util.highlightsList
import com.cornellappdev.score.util.recentSearchList
import com.cornellappdev.score.util.sportList
Expand Down Expand Up @@ -47,6 +49,20 @@ fun ScoreNavHost(navController: NavHostController) {
})
}
}
composable<ScoreScreens.Profile> {
ProfileScreen(
navigateToEditProfile = {
navController.navigate(ScoreScreens.EditProfile)
}
)
}
composable<ScoreScreens.EditProfile> {
EditProfileScreen(
onBackClick = {
navController.navigateUp()
}
)
}
composable<ScoreScreens.GameDetailsPage> {
GameDetailsScreen(
onBackArrow = {
Expand Down Expand Up @@ -89,4 +105,3 @@ fun ScoreNavHost(navController: NavHostController) {
// }
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.navigation.NavBackStackEntry
Expand Down Expand Up @@ -38,11 +39,20 @@ fun ScoreNavigationBar(
selectedIndicatorColor = Color.Transparent
),
icon = {
Icon(
painter = painterResource(id = if (isSelected) item.selectedIcon else item.unselectedIcon),
contentDescription = null,
tint = Color.Unspecified
)
val icon = if (isSelected) item.selectedIcon else item.unselectedIcon
if (icon is Int) {
Icon(
painter = painterResource(id = icon),
contentDescription = null,
tint = Color.Unspecified
)
} else if (icon is ImageVector) {
Icon(
imageVector = icon,
contentDescription = null,
tint = if (isSelected) CrimsonPrimary else GrayPrimary
)
}
},
label = {
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Person
import androidx.compose.material.icons.outlined.Person
import androidx.compose.material.icons.outlined.Schedule
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable
Expand All @@ -18,6 +22,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.dropShadow
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.shadow.Shadow
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.unit.DpOffset
import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
Expand Down Expand Up @@ -65,7 +70,8 @@ fun RootNavigation(

Scaffold(
modifier = modifier.fillMaxSize(), bottomBar = {
if (navBackStackEntry?.toScreen() is ScoreScreens.GameDetailsPage) {
val currentScreen = navBackStackEntry?.toScreen()
if (currentScreen is ScoreScreens.GameDetailsPage || currentScreen is ScoreScreens.EditProfile) {
return@Scaffold
}
Surface(
Expand Down Expand Up @@ -110,6 +116,12 @@ sealed class ScoreScreens {
@Serializable
data class GameScoreSummaryPage(val scoreEvents: String) : ScoreScreens()

@Serializable
data object Profile : ScoreScreens()

@Serializable
data object EditProfile : ScoreScreens()

////removed for 2/2026 release
// @Serializable
// data object HighlightsScreen : ScoreScreens()
Expand All @@ -124,17 +136,19 @@ fun NavBackStackEntry.toScreen(): ScoreScreens? =
"GameDetailsPage" -> toRoute<ScoreScreens.GameDetailsPage>()
"ScoresScreen" -> toRoute<ScoreScreens.ScoresScreen>()
"GameScoreSummaryPage" -> toRoute<ScoreScreens.GameScoreSummaryPage>()
"Profile" -> toRoute<ScoreScreens.Profile>()
"EditProfile" -> toRoute<ScoreScreens.EditProfile>()
//removed for 2/2026 release
// "HighlightsScreen" -> toRoute<ScoreScreens.HighlightsScreen>()
// "HighlightsSearchScreen" -> toRoute<ScoreScreens.HighlightsScreen>()
else -> throw IllegalArgumentException("Invalid screen")
else -> null
}

data class NavItem(
val screen: ScoreScreens,
val label: String,
val unselectedIcon: Int,
val selectedIcon: Int
val unselectedIcon: Any,
val selectedIcon: Any
)

val tabs = listOf(
Expand All @@ -157,4 +171,10 @@ val tabs = listOf(
selectedIcon = R.drawable.ic_scores_filled,
screen = ScoreScreens.ScoresScreen,
),
)
NavItem(
label = "Profile",
unselectedIcon = Icons.Outlined.Person,
selectedIcon = Icons.Filled.Person,
screen = ScoreScreens.Profile,
),
)
Loading
Loading