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

[PC-566] 프로필 미리보기 화면 ui 구현 #64

Merged
merged 33 commits into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
782c336
[PC-566] 프로필 미리보기 기본 세팅 설정
sksowk156 Feb 11, 2025
cef1172
[PC-565] OnBoarding 화면 이미지 나온거 적용
tgyuuAn Feb 11, 2025
c2916bc
[PC-565] MatchingLoading 화면 이미지 나온거 적용
tgyuuAn Feb 11, 2025
f1b6c3d
Merge remote-tracking branch 'origin/develop' into feature/tgyuu/PC-565
tgyuuAn Feb 11, 2025
692a499
[PC-566] 프로필 미리보기 ui 구현
sksowk156 Feb 11, 2025
be536c8
[PC-565] Snsplatform -> ContactType 네이밍 변경
tgyuuAn Feb 12, 2025
c844a03
[PC-565] 내 프로필 조회 API 추가
tgyuuAn Feb 12, 2025
7827722
[PC-565] LocalProfileDataSource Room -> DataStore로 마이그레이션
tgyuuAn Feb 12, 2025
0ddc459
[PC-565] LocalTermDataSource Room -> DataStore 마이그레이션
tgyuuAn Feb 12, 2025
9b1f157
[PC-565] Database 모듈 제거
tgyuuAn Feb 12, 2025
20e2185
[PC-565] 마이그레이션 이후 깨진 테스트 코드 알맞게 변경
tgyuuAn Feb 12, 2025
2bb80cd
[PC-566] 사진 미리 보기에서 매칭 수락하기 버튼 숨기기
sksowk156 Feb 12, 2025
29588a9
[PC-565] GetMyProfileUseCase 테스트 코드 추가
tgyuuAn Feb 12, 2025
e89e414
[PC-565] MatchingHome 화면에서 MyProfile 케싱 로직 추가
tgyuuAn Feb 12, 2025
d422bb0
[PC-565] UpdateMyProfile API 추가
tgyuuAn Feb 12, 2025
9ea5af3
[PC-565] ProfileRepository에서 MyProfile을 핸들링 하던 로직 3개로 분리
tgyuuAn Feb 12, 2025
b3fbc49
[PC-565] GetMyProfileUseCase 분리
tgyuuAn Feb 12, 2025
6dd4756
[PC-565] 변경된 코드에 맞게 테스트 코드 구현
tgyuuAn Feb 12, 2025
80dcad6
[PC-565] 내 프로필 진짜 데이터로 변경
tgyuuAn Feb 12, 2025
6eac887
[PC-565] 내 가치관 Pick 진짜 데이터로 변경
tgyuuAn Feb 12, 2025
79ef5e5
[PC-565] 내 가치관 Talk 진짜 데이터로 변경
tgyuuAn Feb 12, 2025
0fdcf11
[PC-565] 내 가치관 Pick 수정 로직 추가
tgyuuAn Feb 12, 2025
f1fb371
[PC-565] 내 가치관 Talk 수정 로직 추가
tgyuuAn Feb 12, 2025
ebf01cf
[PC-565] 내 기본 프로필 수정 로직 추가
tgyuuAn Feb 12, 2025
52acc1e
[PC-565] 테스트 코드가 더 가독성이 좋도록 리팩토링
tgyuuAn Feb 12, 2025
dd856b3
[PC-566] 네이밍 수정
sksowk156 Feb 13, 2025
92c3952
Merge pull request #65 from YAPP-Github/feature/tgyuu/PC-565
tgyuuAn Feb 13, 2025
ced9bcd
[PC-566] 프로필 미리보기 기본 세팅 설정
sksowk156 Feb 11, 2025
bf3b810
[PC-566] 프로필 미리보기 ui 구현
sksowk156 Feb 11, 2025
26fd8c2
[PC-566] 사진 미리 보기에서 매칭 수락하기 버튼 숨기기
sksowk156 Feb 12, 2025
df49b93
[PC-566] conflict 수정
sksowk156 Feb 13, 2025
cd7d433
[PC-566] conflict 수정
sksowk156 Feb 13, 2025
0e6adfc
[PC-566] conflict 수정
sksowk156 Feb 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ fun PieceLoginButton(
}

@Composable
fun PieceRoundingButton(
fun PieceRoundingSolidButton(
label: String,
onClick: () -> Unit,
modifier: Modifier = Modifier,
Expand Down Expand Up @@ -238,6 +238,35 @@ fun PieceRoundingButton(
}
}

@Composable
fun PieceRoundingOutlinedButton(
label: String,
onClick: () -> Unit,
modifier: Modifier = Modifier,
enabled: Boolean = true,
) {
Button(
onClick = onClick,
enabled = enabled,
shape = RoundedCornerShape(46.dp),
border = BorderStroke(width = 1.dp, color = PieceTheme.colors.primaryDefault),
colors = ButtonDefaults.buttonColors(
containerColor = PieceTheme.colors.white,
contentColor = PieceTheme.colors.primaryDefault,
disabledContainerColor = PieceTheme.colors.light1,
disabledContentColor = PieceTheme.colors.primaryDefault,
),
modifier = modifier
.height(52.dp)
.widthIn(min = 100.dp),
) {
Text(
text = label,
style = PieceTheme.typography.bodyMSB,
)
}
}

@Preview
@Composable
fun PreviewPieceSolidButton() {
Expand Down Expand Up @@ -312,9 +341,23 @@ fun PreviewPieceIconButton() {

@Preview
@Composable
fun PreviewPieceRoundingButton() {
fun PreviewPieceRoundingSolidButton() {
PieceTheme {
PieceRoundingSolidButton(
label = "Label",
onClick = {},
modifier = Modifier
.fillMaxWidth()
.padding(16.dp),
)
}
}

@Preview
@Composable
fun PreviewPieceRoundingOutlinedButton() {
PieceTheme {
PieceRoundingButton(
PieceRoundingOutlinedButton(
label = "Label",
onClick = {},
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ fun PieceImageDialog(
imageUri: Any?,
buttonLabel: String,
onDismissRequest: () -> Unit,
onButtonClick: () -> Unit,
onApproveClick: () -> Unit = {},
isApproveButtonEnabled: Boolean = true,
) {
Dialog(
onDismissRequest = onDismissRequest,
Expand Down Expand Up @@ -239,13 +240,15 @@ fun PieceImageDialog(
.size(180.dp),
)

PieceRoundingButton(
label = buttonLabel,
onClick = onButtonClick,
modifier = Modifier
.align(Alignment.BottomCenter)
.padding(bottom = 10.dp),
)
if (isApproveButtonEnabled) {
PieceRoundingSolidButton(
label = buttonLabel,
onClick = onApproveClick,
modifier = Modifier
.align(Alignment.BottomCenter)
.padding(bottom = 10.dp),
)
}
Copy link
Member

Choose a reason for hiding this comment

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

p2)

enabled라는 속성은 버튼 내에서 실제로 있는 속성이니까

가시성 여부는 isShow 같은 걸로 바꾸면 좋을 것 같습니다~

}
}
}
Expand Down Expand Up @@ -308,7 +311,7 @@ fun PreviewPieceImageDialog() {
imageUri = R.drawable.ic_image_default,
buttonLabel = "매칭 수락하기",
onDismissRequest = {},
onButtonClick = {},
onApproveClick = {},
)
}
}
25 changes: 25 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_right_disable.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="52dp"
android:height="52dp"
android:viewportWidth="52"
android:viewportHeight="52">
<group>
<clip-path android:pathData="M0,0h52v52h-52z" />
<path
android:pathData="M26,26m-26,0a26,26 0,1 1,52 0a26,26 0,1 1,-52 0"
android:fillColor="#CBD1D9" />
<path
android:pathData="M26,17.466L34.533,26L26,34.533"
android:strokeLineJoin="round"
android:strokeWidth="1.6"
android:fillColor="#00000000"
android:strokeColor="#ffffff"
android:strokeLineCap="round" />
<path
android:pathData="M34.532,26L17.465,26"
android:strokeWidth="1.6"
android:fillColor="#00000000"
android:strokeColor="#ffffff"
android:strokeLineCap="round" />
</group>
</vector>
1 change: 1 addition & 0 deletions core/designsystem/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
<string name="other_accepted_matching">상대방이 매칭을 수락했어요!</string>
<string name="connected_with_other">상대방과 연결되었어요!</string>
<string name="check_contact">연락처 확인하기</string>
<string name="check_photo">사진 보기</string>

<!--login-->
<string name="login_description">서로의 빈 곳을 채우며 맞물리는 퍼즐처럼.\n서로의 가치관과 마음이 연결되는 순간을 만들어갑니다.</string>
Expand Down
5 changes: 4 additions & 1 deletion core/navigation/src/main/java/com/puzzle/navigation/Route.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ sealed class MatchingGraphDest : Route {
data class BlockRoute(val userId: Int, val userName: String) : MatchingGraphDest()

@Serializable
data object ContactRoute: MatchingGraphDest()
data object ContactRoute : MatchingGraphDest()

@Serializable
data object ProfilePreviewRoute : MatchingGraphDest()
}

@Serializable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import com.puzzle.designsystem.component.PieceDialogBottom
import com.puzzle.designsystem.component.PieceDialogDefaultTop
import com.puzzle.designsystem.component.PieceImageDialog
import com.puzzle.designsystem.component.PieceLoading
import com.puzzle.designsystem.component.PieceRoundingButton
import com.puzzle.designsystem.component.PieceRoundingSolidButton
import com.puzzle.designsystem.component.PieceSubCloseTopBar
import com.puzzle.designsystem.foundation.PieceTheme
import com.puzzle.domain.model.profile.OpponentProfile
Expand Down Expand Up @@ -171,7 +171,7 @@ private fun MatchingDetailScreen(
PieceImageDialog(
imageUri = state.profile?.imageUrl,
buttonLabel = "매칭 수락하기",
onButtonClick = { dialogType = DialogType.ACCEPT_MATCHING },
onApproveClick = { dialogType = DialogType.ACCEPT_MATCHING },
onDismissRequest = { showDialog = false },
)
}
Expand Down Expand Up @@ -256,14 +256,12 @@ private fun MatchingDetailScreen(

@Composable
private fun BackgroundImage(modifier: Modifier = Modifier) {
Box(modifier = modifier.fillMaxSize()) {
Image(
painter = painterResource(id = R.drawable.matchingdetail_bg),
contentDescription = "basic info 배경화면",
contentScale = ContentScale.Crop,
modifier = Modifier.matchParentSize(),
)
}
Image(
painter = painterResource(id = R.drawable.matchingdetail_bg),
contentDescription = "basic info 배경화면",
contentScale = ContentScale.Crop,
modifier = Modifier.fillMaxSize(),
)
}

@Composable
Expand Down Expand Up @@ -367,7 +365,7 @@ private fun MatchingDetailBottomBar(
Spacer(modifier = Modifier.width(8.dp))

if (currentPage == MatchingDetailPage.ValuePickPage) {
PieceRoundingButton(
PieceRoundingSolidButton(
label = stringResource(R.string.accept_matching),
onClick = onAcceptClick,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.puzzle.matching.graph.detail.common.component

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
Expand All @@ -10,6 +11,7 @@ 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.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.puzzle.common.ui.clickable
import com.puzzle.designsystem.R
Expand All @@ -19,8 +21,9 @@ import com.puzzle.designsystem.foundation.PieceTheme
internal fun BasicInfoHeader(
nickName: String,
selfDescription: String,
onMoreClick: () -> Unit,
modifier: Modifier = Modifier
modifier: Modifier = Modifier,
hasMoreButton: Boolean = true,
onMoreClick: () -> Unit = {}
) {
Column(verticalArrangement = Arrangement.spacedBy(8.dp), modifier = modifier) {
Text(
Expand All @@ -37,13 +40,29 @@ internal fun BasicInfoHeader(
modifier = Modifier.weight(1f)
)

Image(
painter = painterResource(id = R.drawable.ic_more),
contentDescription = "basic info 배경화면",
modifier = Modifier
.size(32.dp)
.clickable { onMoreClick() },
)
if (hasMoreButton) {
Image(
painter = painterResource(id = R.drawable.ic_more),
contentDescription = "basic info 배경화면",
modifier = Modifier
.size(32.dp)
.clickable { onMoreClick() },
)
}
}
}
}

@Preview
@Composable
private fun BasicInfoHeaderPreview() {
PieceTheme {
BasicInfoHeader(
nickName = "nickName",
selfDescription = "selfDescription",
onMoreClick = {},
hasMoreButton = false,
modifier = Modifier.background(PieceTheme.colors.white)
)
}
}
Loading