-
Notifications
You must be signed in to change notification settings - Fork 0
Profile and edit profile screen UI #106
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
Open
mqiu90
wants to merge
7
commits into
main
Choose a base branch
from
profile-ui
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c1b0570
Profile and edit profile screen UI
mqiu90 b9064ef
Merge branch 'main' into profile-ui
EmilJiang d6a14ec
Fixed some of the reviews and added profile icon picker
mqiu90 152765a
Merge branch 'profile-ui' of https://github.com/cuappdev/score-androi…
mqiu90 f931b20
Fixed BaseBall Scoring and IsLive (#102)
EmilJiang d02c837
profile work
mqiu90 e525d28
Move profile nav to top right on home screen
mqiu90 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ query Games{ | |
| games{ | ||
| id | ||
| date | ||
| time | ||
| city | ||
| sport | ||
| team{ | ||
|
|
||
96 changes: 96 additions & 0 deletions
96
app/src/main/java/com/cornellappdev/score/components/ProfileGameCarousel.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| package com.cornellappdev.score.components | ||
|
|
||
| import androidx.compose.foundation.layout.Arrangement | ||
| import androidx.compose.foundation.layout.Column | ||
| import androidx.compose.foundation.layout.PaddingValues | ||
| import androidx.compose.foundation.layout.Row | ||
| import androidx.compose.foundation.layout.Spacer | ||
| import androidx.compose.foundation.layout.fillMaxWidth | ||
| import androidx.compose.foundation.layout.height | ||
| import androidx.compose.foundation.layout.size | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.layout.width | ||
| import androidx.compose.foundation.lazy.LazyRow | ||
| import androidx.compose.foundation.lazy.items | ||
| import androidx.compose.material.icons.Icons | ||
| import androidx.compose.material.icons.outlined.ChevronRight | ||
| import androidx.compose.material3.Icon | ||
| import androidx.compose.material3.Text | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Alignment | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.res.painterResource | ||
| 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.GrayMedium | ||
| import com.cornellappdev.score.theme.Style | ||
|
|
||
| @Composable | ||
| fun ProfileGameCarousel( | ||
| title: String, | ||
| games: List<GameCardData>, | ||
| onClick: (String) -> Unit, | ||
| modifier: Modifier = Modifier | ||
| ) { | ||
| Column( | ||
| modifier = modifier.fillMaxWidth() | ||
| ) { | ||
| Row( | ||
| modifier = Modifier | ||
| .fillMaxWidth() | ||
| .padding(horizontal = 20.dp), | ||
| horizontalArrangement = Arrangement.SpaceBetween, | ||
| verticalAlignment = Alignment.CenterVertically | ||
| ) { | ||
| Text( | ||
| text = title, | ||
| style = Style.heading6 | ||
| ) | ||
|
|
||
| Row(verticalAlignment = Alignment.CenterVertically) { | ||
| Text( | ||
| text = "${games.size} Results", | ||
| style = Style.bodyNormalGray | ||
| ) | ||
| Icon( | ||
| imageVector = Icons.Outlined.ChevronRight, | ||
| contentDescription = null, | ||
| tint = GrayMedium, | ||
| modifier = Modifier.size(18.dp) | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| Spacer(modifier = Modifier.height(12.dp)) | ||
|
|
||
| LazyRow( | ||
| contentPadding = PaddingValues(horizontal = 20.dp), | ||
| horizontalArrangement = Arrangement.spacedBy(12.dp) | ||
| ) { | ||
| items(games) { game -> | ||
| FeaturedGameCard( | ||
| leftTeamLogo = painterResource(R.drawable.cornell_logo), | ||
| rightTeamLogo = game.teamLogo, | ||
| team = game.team, | ||
| date = game.dateString, | ||
| isLive = game.isLive, | ||
| isPast = game.isPast, | ||
| genderIcon = painterResource(game.genderIcon), | ||
| sportIcon = painterResource(game.sportIcon), | ||
| location = game.location, | ||
| gradientColor1 = CornellRed, | ||
| gradientColor2 = game.teamColor, | ||
| leftScore = game.cornellScore?.toInt(), | ||
| rightScore = game.otherScore?.toInt(), | ||
| onClick = { onClick(game.id) }, | ||
| modifier = Modifier.width(241.dp), | ||
| headerModifier = Modifier | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| Spacer(modifier = Modifier.height(24.dp)) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
looks good!