-
Notifications
You must be signed in to change notification settings - Fork 9
[FEAT/#1446] 앱잼탬프 미션상세 ui 구현 #1454
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
1971123-seongmin
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.
고생하셨습니다 🤗🤗
angryPodo
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.
지나가다가 오랜만에 효빈이 작업이 있길래..ㅋㅋ
| ) { | ||
| if (profileImage.isNotBlank()) { | ||
| AsyncImage( | ||
| model = "", |
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.
오잉..?? 요거 렌더링안하는게 목적인가요? 그러면 UrlImage 이거 쓰면 될거같아요
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.
헐 이게 뭐냐면 제 바보이슈... 렌더링 하는게 맞는데 왜 이렇게 했을까요 알려주셔서 감사합니다!
| private fun MissionDetailScreen( | ||
| viewType: DetailViewType, | ||
| title: String, | ||
| mission: Mission, | ||
| imageModel: ImageModel, | ||
| date: String, | ||
| content: String, | ||
| writer: User, | ||
| clapCount: Int, | ||
| myClapCount: Int, | ||
| viewCount: Int, | ||
| onBackButtonClick: () -> Unit, | ||
| onToolbarIconClick: () -> Unit, | ||
| onChangeImage: (ImageModel) -> Unit, | ||
| onClickZoomIn: (String) -> Unit, | ||
| onMemoChange: (String) -> Unit, | ||
| onActionButtonClick: () -> Unit, | ||
| onDateSelected: (String) -> Unit | ||
| ) { |
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.
요것도 획기적인 방법이 없을까 매번 고민하는데...
// UI State 클래스로 그룹화
data class MissionDetailUiState(
val viewType: DetailViewType,
val title: String,
val mission: Mission,
val imageModel: ImageModel,
val date: String,
val content: String,
val writer: User,
val clapCount: Int,
val myClapCount: Int,
val viewCount: Int
)
// Event 클래스로 콜백 그룹화
interface MissionDetailEvent {
fun onBackButtonClick()
fun onToolbarIconClick()
fun onChangeImage(imageModel: ImageModel)
fun onClickZoomIn(url: String)
fun onMemoChange(content: String)
fun onActionButtonClick()
fun onDateSelected(date: String)
}
@Composable
private fun MissionDetailScreen(
uiState: MissionDetailUiState,
eventHandler: MissionDetailEvent,
modifier: Modifier = Modifier
) {
// 구현
}이렇게 해보는건 어떻게 생각하시는지?? 과도한가요?
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.
오 뭔가 MVI 같네요
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.
데이터와 관련한 부분은 말씀해주신대로 uiState로 분리할 예정입니다!! 서버 연결하면서 분리하려고 했는데 pr에 적는걸 깜빡했네요😅
이벤트 콜백 함수들은 저도 너무 과한가 싶어서 고민중이었는데요! 이벤트들이 많아서 묶어도 괜찮을 것 같기도 하구,, 좀 더 고민해보겠습니다ㅎㅎ 제안 감사해요!
| val scrollState = rememberScrollState() | ||
|
|
||
| var isDatePickerVisible by remember { mutableStateOf(false) } | ||
| var isEditable by remember { mutableStateOf(viewType == DetailViewType.EDIT) } |
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.
요거 로컬로 관리하게 되면서 viewType이랑 동기화가 안되는 문제가 있을 것 같은데 괜찮나요?
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.
오 맞네요!! 키값 추가할게요ㅎㅎ
sonms
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.
고생하셨습니다!
Related issue 🛠
Work Description ✏️
Screenshot 📸
Uncompleted Tasks 😅
To Reviewers 📢
뷰모델까지 만들까 하다가 우선 스크린만 만들었습니다! 하하.. 나머지 작업은 서버 연결 하면서 같이 해볼게요!