-
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
[refactor] AddSubjectScreen 코드정리 #83
base: develop
Are you sure you want to change the base?
Conversation
…ubjectTextFieldInputState로 네이밍 변경
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.
p5 : 디테일 와캬퍄
|
||
data object NavigateToBack : AddSubjectSideEffect | ||
|
||
data class ShowSuccessAddSubjectSnackBar(val message: String) : AddSubjectSideEffect |
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.
p5 : 저희가 snackBar 함수를 사용할때 동일한 snackBar함수를 사용합니다. 특정 이유가 아니라면 ShowSnackBar함수 네이밍을 바꿀 필요가 없지않을까요?
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.
p5
하나의 스크린에서 다른 스낵바가 여러개 띄워질 수 있는 경우에 이런 식으로 사이드이펙트를 분리하고 싶다면, message를 인자로 주는 것이 아니라 그냥 고정된 걸로 사용하는게 분리의 측면에서 더 맞는 게 아닐까 싶어요
그게 아니라면 승범오빠 말대로 공통된 스낵바 네이밍을 사용하면서 메세지만 갈아끼우는 걸로 하는게 좋을 듯합니당
import org.android.bbangzip.presentation.type.BbangZipButtonSize | ||
import org.android.bbangzip.presentation.type.BbangZipButtonType | ||
import org.android.bbangzip.presentation.util.modifier.addFocusCleaner | ||
import org.android.bbangzip.ui.theme.BbangZipTheme | ||
|
||
private const val TEXT_FIELD_MAX_CHARACTER = 10 |
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 : 이 상수를 screen이 아닌 어디에 적을지 고민해보면 좋을 것 같습니다
) { | ||
(LocalView.current.context as Activity).window.statusBarColor = BbangZipTheme.colors.backgroundNormal_FFFFFF.toArgb() |
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.
p5 : route가 아닌 screen에 선언하는 이유는 무엇인가요?
@@ -102,7 +106,7 @@ class AddSubjectViewModel | |||
return when { | |||
text.isEmpty() && !isFocused -> BbangZipTextFieldInputState.Default | |||
text.isEmpty() && isFocused -> BbangZipTextFieldInputState.Placeholder | |||
text.contains(Regex("[^가-힣ㄱ-ㅎㅏ-ㅣa-zA-Z0-9 ]")) -> BbangZipTextFieldInputState.Alert | |||
text.contains(Regex(NON_KOREAN_ENGLISH_NUMERIC_REGEX)) -> BbangZipTextFieldInputState.Alert |
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.
p5 : regex에서 제공하는건가요? 신기하네요!
@@ -165,4 +170,5 @@ | |||
<string name="modify_subject_name_guideline">한글/영문/숫자 조합으로 최대 10자까지 입력 가능해요</string> | |||
<string name="modify_motivation_message_placeholder">예) 이번에 열심히 공부해서 빵점 탈출!</string> | |||
<string name="modify_motivation_message_guideline">한글/영문/숫자/기호 조합으로 최대25자까지 입력 가능해요</string> | |||
<string name="add_subject_textfield_label">과목명</string> |
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.
p5 : 위치 조정해주세요!
@@ -0,0 +1,5 @@ | |||
package org.android.bbangzip.presentation.util.constant | |||
|
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.
굿뜨!
@@ -102,7 +106,7 @@ class AddSubjectViewModel | |||
return when { | |||
text.isEmpty() && !isFocused -> BbangZipTextFieldInputState.Default | |||
text.isEmpty() && isFocused -> BbangZipTextFieldInputState.Placeholder | |||
text.contains(Regex("[^가-힣ㄱ-ㅎㅏ-ㅣa-zA-Z0-9 ]")) -> BbangZipTextFieldInputState.Alert | |||
text.contains(Regex(NON_KOREAN_ENGLISH_NUMERIC_REGEX)) -> BbangZipTextFieldInputState.Alert |
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.
p4
요거 Regex 사용하면 객체가 하나 생성되어서 성능 측면에서 좋지 않다고 해요. 싱글톤으로 생성하는 방식에 대해 고만해보면 조을거같타툐
저도 과제 때 받은 코리라 아직 반영못한 부분이라 같이 생각해보면 조을듯해요
Related issue 🛠
Work Description ✏️
Screenshot 📸
Uncompleted Tasks 😅
To Reviewers 📢
제일 만만한 뷰부터 시작해보았습니다.
하면서 고민을 했던점