Skip to content

Conversation

@amjiao
Copy link
Contributor

@amjiao amjiao commented Sep 21, 2025

Overview

Fixes #80 and #66
Also fixes small bug with the logic of coloring the winning team's total score green.

Changes Made

  • Fixed lacrosse icon
  • Fixed border cutoffs by wrapping ScoreBox component in a Surface
  • Fixed team name cutoff error by setting a max width of 70.dp (approximately how long "Cornell" is in the font size for > 4 data columns) to allow adequate space for both the team name column and all of the data columns (if there's < 4 data columns, then I allow the team name column to take up IntrinsicSize.Max to fill up empty space
  • Fixed alignment issues by refactoring table to a Row of Columns structure as opposed to a Column of Rows.
  • Added if-else statement in the total scores column so that the color is green if that team won
  • Accounted for edge case where the number of data columns > 10, in which case the data columns become a LazyRow that scrolls between the fixed team name column and totals column

Test Coverage

  • Wrote more test data for different game lengths (2, 4, 6, 10, 12 in total)
  • appears correct in previews

Screenshots (delete if not applicable)

Screenshot 2025-09-21 at 7 16 27 PM

amjiao and others added 8 commits September 17, 2025 15:31
- static height in surface (to make the lazy column work)
- weight(1f) in CompleteTableData for the data columns and the TotalsColumn: need equal spacing but issues when there's not enough room (i.e. 8+ data columns) and "Totals" wraps into two lines
@amjiao amjiao requested a review from zachseidner1 September 22, 2025 12:04
@amjiao
Copy link
Contributor Author

amjiao commented Sep 22, 2025

(fix) I was basing my sizing estimates off of previews that were using fillMaxWidth, but there's start/end padding around the ScoreBoxes in the actual screen. Updated the thresholds where the sizing settings change to accommodate games with more data columns. (this seems like not best practice though because I'm picking .dp sizes based off of visual estimates, is there a better way to do this?)

Also, didn't end up using autosizing since each column is a different component so I was worried about text autosizing differently in each column.

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.

There are some minor code quality improvements to be made, but overall really nice job and clever approach!

Comment on lines +235 to +238
LazyRow(
modifier = Modifier.weight(1f)
) {
items(periodScores) { periodScore ->
Copy link
Collaborator

Choose a reason for hiding this comment

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

The only thing changing here is the period scores row. I wonder if we could just have the lazy and non lazy versions as separate composables, instead of having the entire table datas as separate composables? Lmk if that makes sense

Copy link
Contributor Author

@amjiao amjiao Oct 1, 2025

Choose a reason for hiding this comment

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

Tried this but ultimately had to keep the olde way because for the non-lazy version, the width of the TotalsColumn needs to be the same as each individual data column, so I had to construct the data row in the same component as the TotalsColumn so that I could set each column to have the same width.

@amjiao amjiao requested a review from zachseidner1 October 1, 2025 13:21
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.

Nice, thanks for resolving the comments!

@amjiao amjiao merged commit 261fdcc into main Oct 1, 2025
4 checks passed
@amjiao amjiao deleted the Amy branch October 1, 2025 19:39
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.

Scoring summary UI additional fixes

3 participants