-
Notifications
You must be signed in to change notification settings - Fork 1
[UI/#37] 상세페이지 화면 구현 #43
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
Merged
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
254a6ff
[ADD/#37] String 추가
jangsjw 4726d6f
[MOD/#37] ItemChatScreen Composable
jangsjw 62718f2
[ADD/#37] 아이콘 SVG 추가
jangsjw 2387536
[FEAT/#37] DetailPage Navi
jangsjw 3568ab7
[ADD/#37] DetailPageScreen
jangsjw 6b25248
[ADD/#37] DetailPageUiState
jangsjw 14e0ead
[ADD/#37] DetailPageViewModel
jangsjw 2d42af1
[ADD/#37] ProductChipType
jangsjw 8fd9f82
[ADD/#37] ProductConditionType
jangsjw e23f24f
[ADD/#37] ProductInfoSection
jangsjw a914d3c
[ADD/#37] ProductChipType 수정
jangsjw 08a8528
[ADD/#37] SnackBar 공통 컴포넌트
jangsjw 319fae9
[MOD/#37] SnackBar 작은 수정
jangsjw d32d2ea
[MOD/#37] DetailPageScreen TODO 추가
jangsjw dbf6845
[MOD/#37] DetailPageScreen 수정
jangsjw 53eb168
[MERGE/#37] pulled develop
jangsjw ad06af7
[CHORE/#37] 수정자 오류 수정
jangsjw bf05759
[RENAME/#37] 채팅 루트 이름 수정
jangsjw 81f0099
[REFACTOR/#37] 채팅 화면 수정
jangsjw 44ff9b5
[REFACTOR/#37] 거래 타입 수정
jangsjw 349c0f7
[ADD/#37] 이미지 추가
jangsjw f6a47f4
[CHORE/#37] 이미지 코드 수정
jangsjw 826e44c
[FEAT/#37] 뒤로가기 구현
jangsjw 01930c2
[FEAT/#37] padding 추가
jangsjw d16d745
[MOD/#37] Screen에 ViewModel 추가
jangsjw 77eb57b
[MOD/#37] onNavigateUp 수정
jangsjw caa4bee
[ADD/#37] 트레일링 콤마 추가
jangsjw cd9a58d
[DEL/#37] 주석 삭제
jangsjw 768db84
[MOD/#37] likes 변수명 수정
jangsjw 08004e4
[MOD/#37] 개행 수정
jangsjw 5cdb74d
[MOD/#37] string import 추출
jangsjw 9a516de
[MOD/#37] 개행 수정
jangsjw db26824
[MOD/#37] chipType 네이밍 변경
jangsjw 43a361f
[MOD/#37] spacer 제거 및 horizontalArrangement 추가
jangsjw ca387d0
[ADD/#37] 트레일링 콤마 추가
jangsjw e7dc7cd
[ADD/#37] 상세페이지 설명 왼쪽 정렬
jangsjw cc29ab0
[ADD/#37] String 삭제 및 label 수정
jangsjw fc73f4f
[ADD/#37] 트레일링 콤마
jangsjw 1275869
[ADD/#37] CommonSnackBarWithoutIcon 추가
jangsjw 467bd5f
[MOD/#37] immutable 적용
jangsjw 15d017b
[MOD/#37] 개행
jangsjw fa1bfd9
[MOD/#37] ProductConditionType 아주 좋은 상태
jangsjw 173c0cc
[MOD/#37] String 수정
jangsjw 5e34b13
[MOD/#37] 공통 type으로 이동
jangsjw 0934cbb
[MOD/#37] 상품설명 uiState 연결
jangsjw 5624741
[MOD/#37] CommonSnackBar 수정
jangsjw 30442a2
[MERGE/#37] pulled develop
jangsjw 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
113 changes: 113 additions & 0 deletions
113
app/src/main/java/com/napzak/market/core/designsystem/component/snackbar/CommonSnackBar.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,113 @@ | ||
package com.napzak.market.core.designsystem.component.snackbar | ||
|
||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.size | ||
import androidx.compose.foundation.layout.width | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
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.graphics.Color | ||
import androidx.compose.ui.graphics.Shape | ||
import androidx.compose.ui.graphics.vector.ImageVector | ||
import androidx.compose.ui.res.vectorResource | ||
import androidx.compose.ui.text.TextStyle | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import androidx.compose.ui.unit.dp | ||
import com.napzak.market.R | ||
import com.napzak.market.core.designsystem.theme.NapzakMarketTheme | ||
|
||
/** | ||
* 공통 SnackBar 컴포넌트. | ||
* | ||
* 메시지와 아이콘을 포함한 스낵바 메시지를 표시합니다. | ||
* 사용자 지정 배경색, 텍스트 색상, 텍스트 스타일, 모양 등을 지원하며, 모든 인자는 명시적으로 전달해야 합니다. | ||
* | ||
* @param message 표시할 메시지 | ||
* @param icon 아이콘 리소스, null이면 아이콘이 안보임 | ||
* @param modifier Modifier | ||
* @param backgroundColor 배경색 | ||
* @param textColor 텍스트 색상 | ||
* @param textStyle 텍스트 스타일 | ||
* @param shape 모양 | ||
*/ | ||
@Composable | ||
fun CommonSnackBar( | ||
message: String, | ||
backgroundColor: Color, | ||
textColor: Color, | ||
textStyle: TextStyle, | ||
modifier: Modifier = Modifier, | ||
icon: ImageVector? = null, | ||
shape: Shape = RoundedCornerShape(12.dp), | ||
) { | ||
Box( | ||
modifier = modifier | ||
.background( | ||
color = backgroundColor, | ||
shape = shape, | ||
) | ||
.padding( | ||
horizontal = 20.dp, | ||
vertical = 12.dp, | ||
), | ||
) { | ||
Row(verticalAlignment = Alignment.CenterVertically) { | ||
if(icon != null) { | ||
Icon( | ||
imageVector = icon, | ||
contentDescription = null, | ||
tint = Color.Unspecified, | ||
modifier = Modifier.size(18.dp), | ||
) | ||
Spacer(modifier = Modifier.width(8.dp)) | ||
} | ||
Text( | ||
text = message, | ||
style = textStyle, | ||
color = textColor, | ||
) | ||
} | ||
} | ||
} | ||
|
||
@Preview(showBackground = true) | ||
@Composable | ||
fun CommonSnackBarPreview() { | ||
NapzakMarketTheme { | ||
CommonSnackBar( | ||
message = "상품을 찜했어요!", | ||
icon = ImageVector.vectorResource(id = R.drawable.ic_heart_toast_18), | ||
backgroundColor = NapzakMarketTheme.colors.black70, | ||
textColor = NapzakMarketTheme.colors.white, | ||
textStyle = NapzakMarketTheme.typography.bodyMedium14, | ||
shape = RoundedCornerShape(12.dp), | ||
modifier = Modifier | ||
.padding(16.dp) | ||
.width(320.dp) | ||
) | ||
} | ||
} | ||
|
||
@Preview(showBackground = true) | ||
@Composable | ||
fun CommonSnackBarWithoutIconPreview() { | ||
NapzakMarketTheme { | ||
CommonSnackBar( | ||
message = "버튼을 한번 더 누르시면 종료 돼요.", | ||
backgroundColor = NapzakMarketTheme.colors.black70, | ||
textColor = NapzakMarketTheme.colors.white, | ||
textStyle = NapzakMarketTheme.typography.bodyMedium14, | ||
shape = RoundedCornerShape(12.dp), | ||
modifier = Modifier | ||
.padding(16.dp) | ||
.width(320.dp) | ||
) | ||
} | ||
} |
26 changes: 18 additions & 8 deletions
26
app/src/main/java/com/napzak/market/core/type/ProductConditionType.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 |
---|---|---|
@@ -1,10 +1,20 @@ | ||
package com.napzak.market.core.type | ||
|
||
enum class ProductConditionType( | ||
val condition: String, | ||
) { | ||
UNUSED(condition = "미개봉"), | ||
GOOD(condition = "아주 좋은 상태"), | ||
SOSO(condition = "약간의 사용감"), | ||
USED(condition = "사용감"), | ||
} | ||
enum class ProductConditionType(val label: String) { | ||
GOOD("아주 좋은 상태"), | ||
UNUSED("미개봉"), | ||
SOSO("약간의 사용감"), | ||
USED("사용감 있음"); | ||
|
||
companion object { | ||
fun fromCondition(condition: String?): ProductConditionType { | ||
return when (condition) { | ||
GOOD.label -> GOOD | ||
UNUSED.label -> UNUSED | ||
SOSO.label -> SOSO | ||
USED.label -> USED | ||
else -> UNUSED | ||
} | ||
} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
app/src/main/java/com/napzak/market/presentation/chat/navigation/ChatNavigation.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,29 @@ | ||
package com.napzak.market.presentation.chat.navigation | ||
|
||
import androidx.compose.ui.Modifier | ||
import androidx.navigation.NavController | ||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.NavOptions | ||
import androidx.navigation.compose.composable | ||
import com.napzak.market.core.common.navigation.Route | ||
import com.napzak.market.presentation.chat.screen.ItemChatRoute | ||
import kotlinx.serialization.Serializable | ||
|
||
fun NavController.navigateToItemChat(navOptions: NavOptions? = null) { | ||
navigate(ItemChat, navOptions) | ||
} | ||
|
||
fun NavGraphBuilder.itemChatGraph( | ||
onNavigateUp: () -> Unit, | ||
modifier: Modifier = Modifier, | ||
) { | ||
composable<ItemChat> { | ||
ItemChatRoute( | ||
modifier = modifier, | ||
onNavigateUp = onNavigateUp, | ||
) | ||
} | ||
} | ||
|
||
@Serializable | ||
data object ItemChat : Route |
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.
p3: 채팅관련 코드가 상세페이지 피알에 왜 같이 있는걸까요?
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.
저번에 리드분이랑 만든 코드 다 같이 보면서 수정하느라 커밋에 들어갔습니다ㅠ