-
Notifications
You must be signed in to change notification settings - Fork 1
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
[UI/#206] 프로필 수정 뷰 / UI 구현 #207
Conversation
into ui/#206-profile-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.
역시 리드네요,, 본받아서 열심히 해야겠습니닷
LaunchedEffect(viewModel.sideEffects, lifecycleOwner) { | ||
viewModel.sideEffects.flowWithLifecycle(lifecycle = lifecycleOwner.lifecycle) | ||
.collect { sideEffect -> | ||
when (sideEffect) { | ||
is ProfileEditSideEffect.NavigateUp -> navigateUp() | ||
} | ||
} | ||
} |
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.
viewModel -> sideEffect -> navigate 식으로 탐색을 하는 건 리컴포지션을 줄이기 위한 이유도 있는건가요? 아니면 단순히 로직 분리를 위한건가요??
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.
흠 처음에 의도한 건 로직분리를 위함이었습니다! navigateUp도 어떻게 보면 화면이 전환되는 것이기 때문에 sideEffect를 통해 처리해줘야 된다고 생각했어요!
RectangleButton( | ||
style = TerningTheme.typography.button1, | ||
paddingVertical = 20.dp, | ||
text = R.string.profile_edit_save, |
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.
컴포넌트마다 문자열을 인자로 받는게 있고 리소스를 인자로 받는게 있는데, 이런 부분들은 통일성을 주는게 좋을 것 같아요!
.align(Alignment.CenterHorizontally), | ||
index = profileEditState.character | ||
) | ||
Spacer(modifier = Modifier.height(48.dp)) |
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.
Spacer는 새로운 Modifier객체를 사용하고 Scope 컴포저블에는 상위 컴포저블에서 넘겨받은 modifier를 사용하는 이유는 뭔가요??
그리고 들은 바론 같은 수정자를 반복해서 사용해야 하는 경우, 하나의 객체를 만들어놓고 재사용하는게 낫답니다!! 지금처럼 Spacer 마다 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.
아하 좋은 의견 감사합니당 ㅎㅎ
onInputChange = { editName -> | ||
viewModel.isInputValid(editName) | ||
}, |
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.
이렇게 하나의 함수만 사용하고, 람다 내 변수의 타입이 함수 매개변수 타입과 같으면 참조 연산자 (::)를 사용할 수 있답니다!
onInputChange = { editName -> | |
viewModel.isInputValid(editName) | |
}, | |
onInputChange = viewModel::isInputValid, |
취향따라 사용하면 되지만 저는 이게 더 깔끔해보이더라요ㅎㅎ
.addFocusCleaner(focusManager) | ||
) { | ||
BackButtonTopAppBar( | ||
onBackButtonClick = { onBackButtonClick() }, |
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.
이런 부분에도 중괄호는 굳이 없어도 될 것 같아요!
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.
얼른 습관화를 들여야겠어요,,
} | ||
|
||
companion object { | ||
const val NAME_ERROR = "[!@#\$%^&*(),.?\":{}|<>\\[\\]\\\\/\\-=+~`\\p{S}\\p{P}]" |
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.
👽
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.
이거 관련해서 수정해봤는데 확인부탁드려요!!
@@ -44,6 +45,8 @@ fun SignUpRoute( | |||
val context = LocalContext.current | |||
val lifecycleOwner = LocalLifecycleOwner.current | |||
|
|||
var showBottomSheet by remember { mutableStateOf(false) } |
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.
이렇게 바텀시트, 다이얼로그 등이 부가적인 화면을 표현하는 경우, 컴포저블 내부의 remember로 관리하는게 더 효율적인가요??
뷰모델에서 관리해야하는지 여기 방법처럼 관리해야하는지 항상 헷갈려요ㅠ
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.
음 저도 이 부분에 대해서 고민이 되더라구요
이전까진 아무 생각 없이 사용하긴 했는데 다시 생각해보니까 뷰모델에서 한번에 관리하는 게 좋을 것 같아서 이젠 바꿔서 사용하려구 했습니당
요 부분은 수정해놓을게요!
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.
복잡한 부분 easy하게 하는 짱리드.., 고생하셨어용 !!!!!!
Image( | ||
painter = painterResource(id = R.drawable.ic_sign_up_button), | ||
contentDescription = "plus button", | ||
modifier = Modifier.align(Alignment.BottomEnd) | ||
) |
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.
여기는 터닝이미지 적용이 안되는 건가욥?
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.
지난번 회의 때 나눴던 내용인데 Image에서 contentDescription 사용을 지향하자는 방향으로 얘기가 나왔어요!
확인해보구 궁금한 점 있으면 말해주세요!!
) { | ||
val focusManager = LocalFocusManager.current | ||
val keyboardController = LocalSoftwareKeyboardController.current | ||
|
||
val nameErrorRegex = NAME_ERROR_REGEX | ||
val trimmedName: String | ||
var outOfBoundName = false |
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.
outOfBoundName보다 좀 더 boolean 타입스러운 네이밍이면 좋을 것 같아용!
into ui/#206-profile-edit
⛳️ Work Description
📸 Screenshot
Screen_Recording_20240905_032900_.terning.mp4
➕추가 수정사항
📌확인해주세요
자세한 사항은 노션에 넣어뒀습니다! [터닝 노션 링크!!!]