[Feat] Snackbar, Dialog를 compose component로 만들어요#419
Open
[Feat] Snackbar, Dialog를 compose component로 만들어요#419
Conversation
f308e99 to
0760ff1
Compare
0760ff1 to
0e27187
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
기존의 xml로 제작된 Snackbar, Dialog를 compose component로 작성합니다.
Describe your changes
Compose에서는 boolean 기반의 상태(State) 변수를 하나 두고, 이 값이 true일 때만 다이얼로그 컴포저블을 호출하는 방식으로 사용합니다.
Snackbar는 비동기로 일정 시간 동안 띄웠다가 사라져야 하므로, Compose에서 기본 제공하는 SnackbarHostState와 코루틴을 이용합니다. Scaffold의 snackbarHost에 우리가 만든 EatSsuSnackbarHost를 연결해 주면 됩니다.
Issue
To reviewers
#409 가 머지되면 리소스 파일 및 enum을 사용하려 합니다