Conversation
zachseidner1
left a comment
There was a problem hiding this comment.
Pass CI before requesting review please. Thank you!
zachseidner1
left a comment
There was a problem hiding this comment.
Emil, this is a really strong first draft, especially as a new member. Really great work. There are still some fixes to be made, but you did a nice job. Also please provide a way for me to test the game details screen! Right now the function is just unused.
app/src/main/java/com/cornellappdev/score/viewmodel/GameDetailsViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/score/model/ScoreRepository.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/score/screen/GameDetailsScreen.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/score/screen/GameDetailsScreen.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/score/screen/GameDetailsScreen.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/score/screen/GameDetailsScreen.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
I found some more UI issues: you should update this screen so that the padding matches the Figma page. Please use dev mode to see the padding easier, and add the missing score header.
We can fix the score box card in a separate PR since that's not something you worked on.
|
UI fixes still need to be done, but I think all the logic should be done. |
zachseidner1
left a comment
There was a problem hiding this comment.
Great job on this Emil! So happy to see this page coming together. I left a few comments for you to address 🫡
There was a problem hiding this comment.
What's the deal with this if statement?
There was a problem hiding this comment.
Can we get a function spec, and have you tested this?
Also, this function shouldn't be specific to DetailsGameCard. Maybe instead it could take in some kind of CalendarEvent data class that takes in the minimum data needed to add an event to a calendar?
app/src/main/java/com/cornellappdev/score/components/NavigationHeader.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
This should be of type () -> Unit not (Boolean) -> Unit
There was a problem hiding this comment.
hey sorry for responding to this a bit late, but thank you for pushing those fixes! for the boolean, navigateToGameDetails should not take in a boolean as an argument. It should take in a string instead. Then we should pass in the string to the navController here instead of the empty string.
Also, do you think you’re able to resolve merge conflicts on your own, or do you want me to help out with that? it seems like there are a lot so lmk what you think.
zachseidner1
left a comment
There was a problem hiding this comment.
For situations like these, we can use Spacers with weight modifier. This way it will take up as much space as it can, but it will never cut off the button. We can kinda eye-ball the Figma as a general guideline for weight ratios.
…s_ui # Conflicts: # app/src/main/java/com/cornellappdev/score/components/GamesCarousel.kt # app/src/main/java/com/cornellappdev/score/screen/HomeScreen.kt # app/src/main/java/com/cornellappdev/score/screen/PastGamesScreen.kt
zachseidner1
left a comment
There was a problem hiding this comment.
Thank you for responding to my comments! I have a few more 😭 but these are mostly minor. I want to say you did a really great job with this! I really appreciate you being receptive and being able to address most things I say quite quickly.
Make sure to pull before beginning work again since I made a couple small fixes to this branch.
Also, the scoring summary shouldn't be a LazyColumn, it should just only show the first 3 items. You can use Kotlin's Iterable<T>.take extension function for this.
There was a problem hiding this comment.
We should never require an id to show a Composable, the only parameters Composables should take are things related to its view state, or click methods. So really, this composable should have an onClick: () -> Unit method. Then we would write:
onClick = {
onClick(game.id)
}And pass it through like that. Lmk if that makes sense.
| painterResource(R.drawable.ic_calendar), | ||
| onClick = { | ||
| gameCard.toCalendarEvent()?.let { event -> | ||
| addToCalendar(context = context, event) |
There was a problem hiding this comment.
Optional nit: I don't think you need to pass in context as a named parameter, feels a bit redundant.
There was a problem hiding this comment.
The addTocalendar still does not work, so I think I will be working on that as the first issue.
app/src/main/java/com/cornellappdev/score/components/PastGameCard.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/score/model/ScoreRepository.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/score/util/TestingConstants.kt
Outdated
Show resolved
Hide resolved
|
I think in this case, GameCardData needs to have an id because the uistate uses GameCardData. If there is a better way, please let me know! |
Are you sure add to calendar doesn't work? I tried it and it opened google calendar, but not much else happened. Does the same issue happen on your end? |
zachseidner1
left a comment
There was a problem hiding this comment.
Finally ready to merge this in! Thank you so much again for responding to all of my comments. I think we've had good discussion and I hope you've learned a lot!
Yes that was my bad about the GameCardData, it's fine for it to have an ID. But it definitely shouldn't be a parameter to the Composable and I'm glad you were able to remove that.




So, for gamedetails there are still a lot of things to work on. I will attach a picture of what it looks like now, and a list of things to work on. I just wanted to create this PR for comments because there is a lot of changes, and I am not totally done with everything. I tried to follow the code structure of Amy's as much as possible :).
What I did
The networking should be all done, but sometimes it does not load which I think is a backend issue. In the slack, Skye said he will look into it. The Screen with all the components is mostly done.
Specific things that still needs work
hopfully quick ones
longer ones
Current result
