-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Feature/#5] : 그룹 상세 페이지 구현 #7
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3ab282d
#5 [UI] 그룹 상세 페이지 구현
gaeulzzang 0bf6c2e
#5 [UI] noRippleClickable 추가
gaeulzzang 5b66922
#5 [UI] 확정 약속 정보 페이지 구현
gaeulzzang ae0fff4
#5 [REFACTOR] chip 컴포넌트화
gaeulzzang 6dde4a5
#5 [FEAT] 화면 연결
gaeulzzang 73390b7
#5 [REFACTOR] ktlint 적용 및 네이밍 통일
gaeulzzang effa364
#5 [UI] 그룹 멤버 페이지 구현
gaeulzzang 7403f17
#5 [REFACTOR] add horizontal padding to dimens.xml
gaeulzzang 490bfe0
#5 [FEAT] 공유 기능 추가
gaeulzzang 32741e1
#5 [MOD] Lazy Vertical Staggered Grid -> LazyRow로 수정
gaeulzzang ba377e6
#5 [REFACTOR] 코드리뷰 반영
gaeulzzang 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
47 changes: 47 additions & 0 deletions
47
.../src/main/java/com/sopt/core/designsystem/component/button/NoostakFloatingActionButton.kt
This file contains 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,47 @@ | ||
package com.sopt.core.designsystem.component.button | ||
|
||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.width | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material3.ExtendedFloatingActionButton | ||
import androidx.compose.material3.FloatingActionButtonDefaults | ||
import androidx.compose.material3.Icon | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.vector.ImageVector | ||
import androidx.compose.ui.res.dimensionResource | ||
import androidx.compose.ui.res.vectorResource | ||
import androidx.compose.ui.unit.dp | ||
import com.sopt.core.R | ||
import com.sopt.core.designsystem.theme.NoostakTheme | ||
import com.sopt.core.util.NoRippleInteractionSource | ||
|
||
@Composable | ||
fun NoostakFloatingActionButton( | ||
title: String, | ||
modifier: Modifier = Modifier, | ||
onClick: () -> Unit | ||
) { | ||
ExtendedFloatingActionButton( | ||
modifier = modifier, | ||
shape = RoundedCornerShape(dimensionResource(id = R.dimen.fab_radius)), | ||
containerColor = NoostakTheme.colors.black, | ||
contentColor = NoostakTheme.colors.white, | ||
elevation = FloatingActionButtonDefaults.elevation(4.dp), | ||
onClick = { onClick() }, | ||
interactionSource = NoRippleInteractionSource | ||
) { | ||
Icon( | ||
imageVector = ImageVector.vectorResource(id = R.drawable.ic_add), | ||
contentDescription = null, | ||
tint = NoostakTheme.colors.white | ||
) | ||
Spacer(modifier = Modifier.width(5.dp)) | ||
Text( | ||
text = title, | ||
color = NoostakTheme.colors.white, | ||
style = NoostakTheme.typography.b4SemiBold1 | ||
) | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
core/src/main/java/com/sopt/core/designsystem/component/chip/NoostakCategoryChip.kt
This file contains 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,24 @@ | ||
package com.sopt.core.designsystem.component.chip | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.res.dimensionResource | ||
import androidx.compose.ui.unit.dp | ||
import com.sopt.core.R | ||
import com.sopt.core.designsystem.theme.NoostakTheme | ||
|
||
@Composable | ||
fun NoostakCategoryChip( | ||
text: String, | ||
backgroundColor: Color | ||
) { | ||
NoostakChip( | ||
text = text, | ||
textStyle = NoostakTheme.typography.c2SemiBold, | ||
textColor = NoostakTheme.colors.white, | ||
backgroundColor = backgroundColor, | ||
borderColor = Color.Transparent, | ||
horizontalPaddingValues = dimensionResource(id = R.dimen.category_chip_horizontal_padding), | ||
verticalPaddingValues = dimensionResource(id = R.dimen.category_chip_vertical_padding) | ||
) | ||
} |
78 changes: 78 additions & 0 deletions
78
core/src/main/java/com/sopt/core/designsystem/component/chip/NoostakChip.kt
This file contains 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,78 @@ | ||
package com.sopt.core.designsystem.component.chip | ||
|
||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.border | ||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.defaultMinSize | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.wrapContentSize | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.res.dimensionResource | ||
import androidx.compose.ui.text.TextStyle | ||
import androidx.compose.ui.text.style.TextAlign | ||
import androidx.compose.ui.text.style.TextOverflow | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import androidx.compose.ui.unit.Dp | ||
import androidx.compose.ui.unit.dp | ||
import com.sopt.core.R | ||
import com.sopt.core.designsystem.theme.NoostakAndroidTheme | ||
import com.sopt.core.designsystem.theme.NoostakTheme | ||
|
||
@Composable | ||
fun NoostakChip( | ||
text: String, | ||
textStyle: TextStyle, | ||
textColor: Color, | ||
backgroundColor: Color, | ||
borderColor: Color, | ||
horizontalPaddingValues: Dp, | ||
verticalPaddingValues: Dp | ||
) { | ||
Box( | ||
modifier = Modifier | ||
.background( | ||
color = backgroundColor, | ||
shape = RoundedCornerShape(dimensionResource(id = R.dimen.chip_radius)) | ||
) | ||
.border( | ||
width = 1.dp, | ||
color = borderColor, | ||
shape = RoundedCornerShape(dimensionResource(id = R.dimen.chip_radius)) | ||
) | ||
.defaultMinSize(minWidth = 39.dp) | ||
.padding(horizontal = horizontalPaddingValues, vertical = verticalPaddingValues) | ||
) { | ||
Text( | ||
modifier = Modifier | ||
.align(Alignment.Center) | ||
.wrapContentSize(), | ||
text = text, | ||
style = textStyle, | ||
color = textColor, | ||
textAlign = TextAlign.Center, | ||
overflow = TextOverflow.Ellipsis, | ||
maxLines = 1 | ||
) | ||
} | ||
} | ||
|
||
@Preview(showBackground = true) | ||
@Composable | ||
fun NoostakChipPreview() { | ||
NoostakAndroidTheme { | ||
NoostakChip( | ||
text = "나", | ||
textStyle = NoostakTheme.typography.c3Regular, | ||
textColor = NoostakTheme.colors.gray900, | ||
backgroundColor = NoostakTheme.colors.blue200, | ||
borderColor = NoostakTheme.colors.blue200, | ||
horizontalPaddingValues = 8.dp, | ||
verticalPaddingValues = 6.dp | ||
) | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
core/src/main/java/com/sopt/core/designsystem/component/chip/NoostakUserChip.kt
This file contains 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,26 @@ | ||
package com.sopt.core.designsystem.component.chip | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.res.dimensionResource | ||
import androidx.compose.ui.unit.dp | ||
import com.sopt.core.R | ||
import com.sopt.core.designsystem.theme.NoostakTheme | ||
|
||
@Composable | ||
fun NoostakUserChip( | ||
text: String, | ||
textColor: Color, | ||
backgroundColor: Color, | ||
borderColor: Color | ||
) { | ||
NoostakChip( | ||
text = text, | ||
textStyle = NoostakTheme.typography.c3Regular, | ||
textColor = textColor, | ||
backgroundColor = backgroundColor, | ||
borderColor = borderColor, | ||
horizontalPaddingValues = dimensionResource(id = R.dimen.user_chip_horizontal_padding), | ||
verticalPaddingValues = dimensionResource(id = R.dimen.user_chip_vertical_padding) | ||
) | ||
} |
69 changes: 69 additions & 0 deletions
69
core/src/main/java/com/sopt/core/designsystem/component/topappbar/NoostakTopAppBar.kt
This file contains 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,69 @@ | ||
package com.sopt.core.designsystem.component.topappbar | ||
|
||
import androidx.compose.foundation.layout.WindowInsets | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.material3.CenterAlignedTopAppBar | ||
import androidx.compose.material3.ExperimentalMaterial3Api | ||
import androidx.compose.material3.Icon | ||
import androidx.compose.material3.Text | ||
import androidx.compose.material3.TopAppBarDefaults | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color.Companion.White | ||
import androidx.compose.ui.res.painterResource | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.text.style.TextAlign | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import androidx.compose.ui.unit.dp | ||
import com.sopt.core.R | ||
import com.sopt.core.designsystem.theme.NoostakAndroidTheme | ||
import com.sopt.core.designsystem.theme.NoostakTheme | ||
import com.sopt.core.extension.noRippleClickable | ||
import com.sopt.core.extension.showIf | ||
|
||
@OptIn(ExperimentalMaterial3Api::class) | ||
@Composable | ||
fun NoostakTopAppBar( | ||
title: String = "", | ||
modifier: Modifier = Modifier, | ||
isIconVisible: Boolean, | ||
onBackButtonClick: () -> Unit = {} | ||
) { | ||
CenterAlignedTopAppBar( | ||
modifier = modifier.fillMaxWidth(), | ||
title = { | ||
Text( | ||
text = title, | ||
textAlign = TextAlign.Center, | ||
style = NoostakTheme.typography.b2Regular, | ||
color = NoostakTheme.colors.black | ||
) | ||
}, | ||
navigationIcon = { | ||
Icon( | ||
painter = painterResource(id = R.drawable.ic_back), | ||
contentDescription = stringResource(id = R.string.ic_back), | ||
modifier = Modifier | ||
.padding(start = 8.dp) | ||
.noRippleClickable { onBackButtonClick() } | ||
.showIf(isIconVisible), | ||
tint = NoostakTheme.colors.black | ||
) | ||
}, | ||
colors = TopAppBarDefaults.topAppBarColors(White), | ||
windowInsets = WindowInsets(0) | ||
) | ||
} | ||
|
||
@Preview(showBackground = true) | ||
@Composable | ||
fun NoostakTopAppBarPreview() { | ||
NoostakAndroidTheme { | ||
NoostakTopAppBar( | ||
modifier = Modifier.fillMaxWidth(), | ||
isIconVisible = true, | ||
title = "그룹" | ||
) | ||
} | ||
} |
This file contains 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,19 @@ | ||
package com.sopt.core.util | ||
|
||
import androidx.lifecycle.ViewModel | ||
import androidx.lifecycle.viewModelScope | ||
import kotlinx.coroutines.flow.MutableSharedFlow | ||
import kotlinx.coroutines.flow.SharedFlow | ||
import kotlinx.coroutines.flow.asSharedFlow | ||
import kotlinx.coroutines.launch | ||
|
||
abstract class BaseViewModel<T> : ViewModel() { | ||
private val _sideEffects = MutableSharedFlow<T>() | ||
val sideEffects: SharedFlow<T> get() = _sideEffects.asSharedFlow() | ||
|
||
protected fun emitSideEffect(sideEffect: T) { | ||
viewModelScope.launch { | ||
_sideEffects.emit(sideEffect) | ||
} | ||
} | ||
} |
This file contains 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,18 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="12dp" | ||
android:height="13dp" | ||
android:viewportWidth="12" | ||
android:viewportHeight="13"> | ||
<path | ||
android:pathData="M6,1.5L6,11.5" | ||
android:strokeWidth="1.5" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#ffffff" | ||
android:strokeLineCap="round"/> | ||
<path | ||
android:pathData="M11,6.5L1,6.5" | ||
android:strokeWidth="1.5" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#ffffff" | ||
android:strokeLineCap="round"/> | ||
</vector> |
This file contains 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,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<dimen name="chip_radius">16dp</dimen> | ||
<dimen name="user_chip_horizontal_padding">8dp</dimen> | ||
<dimen name="user_chip_vertical_padding">6dp</dimen> | ||
<dimen name="category_chip_horizontal_padding">15dp</dimen> | ||
<dimen name="category_chip_vertical_padding">6dp</dimen> | ||
<dimen name="fab_radius">30dp</dimen> | ||
</resources> |
15 changes: 15 additions & 0 deletions
15
domain/src/main/java/com/sopt/domain/entity/ConfirmedDetailEntity.kt
This file contains 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,15 @@ | ||
package com.sopt.domain.entity | ||
|
||
data class ConfirmedDetailEntity( | ||
val appointName: String, | ||
val date: String, | ||
val weekday: String, | ||
val startTime: String, | ||
val endTime: String, | ||
val category: String, | ||
val likes: Int, | ||
val availableMembersCount: Int, | ||
val availableMembers: List<String>, | ||
val unavailableMembersCount: Int, | ||
val unavailableMembers: List<String> | ||
) |
8 changes: 8 additions & 0 deletions
8
domain/src/main/java/com/sopt/domain/entity/ConfirmedEntity.kt
This file contains 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,8 @@ | ||
package com.sopt.domain.entity | ||
|
||
data class ConfirmedEntity( | ||
val appointmentId: Long, | ||
val appointmentName: String, | ||
val date: String, | ||
val weekday: String | ||
) |
8 changes: 8 additions & 0 deletions
8
domain/src/main/java/com/sopt/domain/entity/GroupDetailEntity.kt
This file contains 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,8 @@ | ||
package com.sopt.domain.entity | ||
|
||
data class GroupDetailEntity( | ||
val groupName: String, | ||
val groupMembersCount: Int, | ||
val progressEntities: List<ProgressEntity>, | ||
val confirmedEntities: List<ConfirmedEntity> | ||
) |
18 changes: 18 additions & 0 deletions
18
domain/src/main/java/com/sopt/domain/entity/GroupMembersEntity.kt
This file contains 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,18 @@ | ||
package com.sopt.domain.entity | ||
|
||
data class GroupMembersEntity( | ||
val groupName: String, | ||
val groupMembersCount: Int, | ||
val groupLeader: GroupLeaderEntity, | ||
val groupMembers: List<GroupMemberEntity> | ||
) | ||
|
||
data class GroupLeaderEntity( | ||
val groupLeaderName: String, | ||
val groupLeaderImage: String | ||
) | ||
|
||
data class GroupMemberEntity( | ||
val groupMemberName: String, | ||
val groupMemberImage: String | ||
) |
12 changes: 12 additions & 0 deletions
12
domain/src/main/java/com/sopt/domain/entity/ProgressEntity.kt
This file contains 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,12 @@ | ||
package com.sopt.domain.entity | ||
|
||
data class ProgressEntity( | ||
val appointmentId: Int, | ||
val appointmentName: String, | ||
val date: String, | ||
val weekday: String, | ||
val startTime: String, | ||
val endTime: String, | ||
val participants: Int, | ||
val maxParticipants: Int | ||
) |
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.
P2 : string 파일에 test string 하나 만들어서 재사용하면 좋을듯