-
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
[UI] 미션 제안 상세 화면 UI 작업(compose 활용) (#206) #207
Conversation
915dbfl
commented
Jan 31, 2024
- closed [UI] 미션 제안 상세 화면 UI 작업 #206
common-ui/build.gradle.kts
Outdated
} | ||
|
||
composeOptions { | ||
kotlinCompilerExtensionVersion = "1.3.2" |
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.
요고 version catalog 활용하면 좋을것같다!
//compose | ||
val composePlatform = platform(libs.compose.bom) | ||
implementation(composePlatform) | ||
implementation(libs.compose.ui) | ||
implementation(libs.compose.ui.tooling) | ||
implementation(libs.compose.preview) | ||
implementation(libs.compose.activity) | ||
implementation(libs.compose.material) | ||
implementation(libs.compose.foundation) | ||
implementation(libs.compose.constraintlayout) | ||
implementation(libs.compose.appcompat.theme) |
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.
방금 든 생각인뎨! 요고 commin-ui
모듈에서 api로 제공해주는것도 방법이겠네!
다른 constraintlayout
같은것들은 나중에 내가 바꿔볼게~
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.
앗 그러네!! 수정할게~~!!
compileSdk = "34" | ||
minSdk = "26" | ||
targetSdk = "33" | ||
targetSdk = "34" |
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.
유리야~ 나 sdk관련해서는 잘 몰라서 그러는데 이거 버전 올리면서 대응해야하는것들 따로 없었어?ㅎㅎㅎ
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.
compose preview 사용하려면 sdk 버전이 최소 34여야 한다고 해서 sdk 올리게 됐어~!!
sdk 34로 하면 gradlePlugin 버전도 올려야 한다고 해서 "8.1.1"로 같이 변경했어!
빌드 과정에서는 별도로 발생하는 오류는 없었어~!!
import com.lgtm.android.common_ui.model.SuggestionUI | ||
|
||
sealed class SuggestionDetailState { | ||
object Loading: SuggestionDetailState() |
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.
유리유리! 혹시 네이밍 특별히 이렇게 한 이유가 있을까!??
우리가 skeleton(로딩중일때 보여주는 화면)을 안넣고 있자나!
나중에 로딩중 화면같은거 추가한다고 생각하면 그때 UI가 Loading이라는 state랑 더 적합하지 않을까 싶어서~ Loading
-> �Init
이라는 워딩은 어때?
그리구 Main
도 보다 직관적으로 Success
나 Error
라는 �State를 추가하는게 어떨까 싶네!
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.
그러네!! 이것도 Init
, Success
로 워딩 변경할게~~
Error일 때는 Firebase로 crash만 보내고, 별도로 화면 처리를 하지 않아서 따로 State를 두지는 않았는데!
혹시 Error도 따로 두는 게 좋을까??
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.
사실 에러화면이 있긴해ㅋㅋㅋㅋ 만들어두면 좋을듯 ㅎㅎㅎ
그리구 이렇게 화면마다 State 클래스 다 만드는것두 좋지만,
아래 처럼 공용으로 쓸수있는 Sealed class 만들어두면 재활용하기 더 좋을것같어~!!
Success 부분은 Generic으로 만들어서 ui model 넣어주는식으로!?
sealed class NetworkStatus {
class Init : NetworkStatus()
class Loading : NetworkStatus()
class Success : NetworkStatus()
class Error(val throwable: Throwable?) : NetworkStatus()
}
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.
허거걱 저 부분이 전체적인 오류 화면이었구나~
오케이!! 제너릭으로 해서 한 번 수정해볼게!!
binding.composeView.setContent { | ||
MaterialTheme { | ||
SuggestionDetailScreen( | ||
suggestionDetailStateHolder = suggestionDetailViewModel.detailState.collectAsState() | ||
) | ||
} | ||
} |
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.
이거 함수 분리 하면 더 꺨꼼할것같네!^____^
고생했어 유리 |
…escriptions [UI] 미션 생성 과정 UX 개선
…coding-club/LGTM-Android into ui/suggestion-detail