-
Notifications
You must be signed in to change notification settings - Fork 0
ScoreBox fix (+ lacrosse icon mini fix) #83
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
Conversation
- 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
|
(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. |
zachseidner1
left a comment
There was a problem hiding this 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!
app/src/main/java/com/cornellappdev/score/components/ScoreBox.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/score/components/ScoreBox.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/score/components/ScoreBox.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/score/components/ScoreBox.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/score/components/ScoreBox.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/score/components/ScoreBox.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/score/components/ScoreBox.kt
Outdated
Show resolved
Hide resolved
| LazyRow( | ||
| modifier = Modifier.weight(1f) | ||
| ) { | ||
| items(periodScores) { periodScore -> |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
zachseidner1
left a comment
There was a problem hiding this 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!
Overview
Fixes #80 and #66
Also fixes small bug with the logic of coloring the winning team's total score green.
Changes Made
Test Coverage
Screenshots (delete if not applicable)