Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement navigation and past games screen UI/ViewModel/majority of networking #31

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

helenjb
Copy link
Collaborator

@helenjb helenjb commented Mar 18, 2025

Overview

Implemented Past Games (aka Scores) screen, with the associated ViewModel and most of networking. Also implemented bottom bar and navigation between game cards (on both Home and Past Games Screen) to a dummy game details screen.

Changes Made

  • Refactored some component names to make it more applicable to games that are not upcoming and/or to make the names be more descriptive of the component (e.g. UpcomingGameCard to FeaturedGameCard, SportCard to GameCard, UpcomingGamesCarousel to GamesCarousel)
  • Implemented UI for PastGameCard and PastGamesScreen (PastGameCards are properly spaced on this screen)
  • Implemented PastGamesViewModel
  • Implemented bottom bar that allows for navigation to between home screen and past games screen
  • Implemented navigation from GameCard/PastGameCard to a dummy GameDetailsPage -- will currently navigate back to the correct page when clicking the back arrow on the GameDetailsScreen
  • Implemented networking for PastGamesScreen
  • Minor UI fix to GameCard so long event/university names don't push the sport/gender icon off the card

Additional Notes

  • The final scores in the past game cards were obtained by parsing a result string, which is oftentimes in the format Result, CornellScore-OpponentScore (e.g. "W, 2-1"). Not all of the strings are in this format (e.g. 4th of 6, 1498 points for women's Swimming and Diving), but in this case, the cornellScore and otherScore parameters of the game and associated card should be null, and as of right now, null-scored games are filtered out.
  • Int and decimal scores should properly be displayed as such
  • Filters do not work -- should be fixed by Amy's code

@helenjb helenjb requested a review from zachseidner1 March 18, 2025 18:34
@helenjb helenjb marked this pull request as draft March 18, 2025 19:15
@zachseidner1 zachseidner1 removed their request for review March 18, 2025 20:57
@helenjb helenjb marked this pull request as ready for review March 20, 2025 04:31
@helenjb helenjb requested a review from zachseidner1 March 20, 2025 04:31
Copy link
Collaborator

@zachseidner1 zachseidner1 left a comment

Choose a reason for hiding this comment

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

Helen, this is a really impressive first draft! Everything looks nice overall, and I am hoping that after resolving the merge conflicts and taking a look at my comments you should be good. Please try to do this as soon as you reasonably can in case I end up having more comments, since we want to make sure this gets in in time. You did some real clever stuff in this PR that I even learned something lol.

gradientColor1: Color,
gradientColor2: Color,
modifier: Modifier = Modifier
) {
val isPast = (leftScore != null && rightScore != null)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is business logic, we should move it out of the view. We should probably pass this in as a parameter to FeaturedGameHeader instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants