Skip to content

Conversation

@sonms
Copy link
Member

@sonms sonms commented Jan 9, 2026

ISSUE

❗ WORK DESCRIPTION

  • 스낵바와 토스트 그리고 공통 다이얼로그의 상태를 전역에서 관리할 수 있도록CompositionLocalProvider 을 통해 주입하였습니다.
  • 앱 뒤로가기 시 감지하는 기능을 추가하였습니다.
  • gitignore을 추가하였습니다.
  • 공통으로 사용될 Flow 확장함수와 Preview용 공통 클래스를 추가하였습니다.
  • 핸드폰의 사용 가능한 데이터(와이파이 등)의 감지 기능을 추가하였습니다.

📢 TO REVIEWERS

  • Flow.collectSideEffect 는 기존의 SideEffect를 처리하는 방식을 확장함수로 사용하기 위해 Wrapping한 함수로 순차처리 방식입니다 따라서 단발성 이벤트인 네비게이션 이동, 토스트, 스낵바, 분석 로그 전송 등에 사용하시면됩니다!

  • Flow.collectSingleEvent는 위 collectSideEffect 와 마찬가지이나 쓰로틀 방식을 적용하여 0.5초 이내에 들어온 추가 요청은 무시하고 첫번째 클릭만 인정하도록 하여 안정성을 보장합니다
    특히 중요한 로그인 버튼, 스플래시에서 부모와 아이 그래프로 이동 시에 사용하면 좋을 것 같습니다

  • NetworkMonitor를 통해 인터넷을 사용 가능한 와이파이나 데이터에 연결을 모니터링 할 수 있도록 합니다 온라인과 오프라인 상태를 감지 가능합니다

  • BaseUiStateProvider 로 UiState의 상태 3개를 Preview에서 사용 가능하도록 합니다
    EX

// feature:provider 혹은 feature:preview
class DummyPreviewProvider : BaseUiStateProvider<PersistentList<DummyEntity>>(
    successData = persistentListOf(
        DummyEntity(1, "주완"),
        DummyEntity(2, "민성"),
        DummyEntity(3, "승재"),
        DummyEntity(4, "규현"),
    )
)

// screen
@Preview
@Composable
fun DummyScreenPreview(
    @PreviewParameter(DummyPreviewProvider::class) uiState: UiState<PersistentList<DummyEntity>>
) {
  • +추가) IDE에서 보여지는 프로젝트 구분을 돕기 위해 아이콘을 추가합니다~
    나중에 정식으로 확정되면 다시 변경하도록 하겠습니다! 지금은 피그마에 있는 거 가져온거라 그런지 조금 작네요..

📸 SCREENSHOT

실행 화면 상세 요소




🎥 구동 영상

KakaoTalk_20260109_173749147.mp4

minseong-PC and others added 30 commits January 8, 2026 17:50
@sonms sonms added feature ✨ 신규 기능 구현 🪐민성 민성 전용 라벨 labels Jan 9, 2026
@vvan2
Copy link
Member

vvan2 commented Jan 10, 2026

교수님 진도가 너무 빠릅니다
천천히 보고 코리 달겠습니다 ㅎㅎ

…into feat/#10-core-provider-setting

# Conflicts:
#	app/src/main/java/com/kiero/presentation/main/navigation/MainAppState.kt
#	app/src/main/java/com/kiero/presentation/main/screen/MainScreen.kt
Copy link
Collaborator

@dmp100 dmp100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

별미다 별미,,

Copy link
Collaborator

@seungjae708 seungjae708 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다 8주차때 연사님께 배운 PreviewProvider까지 구현하셨네요!!
많이 배워갑니다~~

class GlobalUiEventHolder(
val dialogTrigger: DialogTrigger,
val showToast: (String) -> Unit,
val showSnackbar: (String, String?, () -> Unit) -> Unit
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p1) KieroSnackbar는 액션이 없는 단순 알림용으로 사용하고 있어서 액션 관련 파라미터는 제거하는게 좋을 것 같아요

Suggested change
val showSnackbar: (String, String?, () -> Unit) -> Unit
val showSnackbar: (String) -> Unit

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 반영하겠습니다!

Comment on lines 6 to 10
data class SnackbarState(
val message: String = "",
val buttonText: String? = null,
val onActionClick: (() -> Unit)? = null
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p1) 여기도 위랑 마찬가지로 제거해야 될듯요

}
}

val onShowSnackbar: (String, String?, (() -> Unit)?) -> Unit = remember(scope, snackBarHostState) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GlobalUiEventHolder에서는 (String, String?, (() -> Unit)으로 non-nullable한데 여기서는 nullable한 이유가 있나요??

@vvan2 vvan2 changed the title [Feat/#10] UI Event Provider Setting [feat/#10] UI Event Provider Setting Jan 10, 2026
@angryPodo
Copy link

잘 보고 갑니다~👍🏻

@vvan2 vvan2 self-requested a review January 11, 2026 16:42
Copy link
Member

@vvan2 vvan2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

옆에서 같이 확인했습니다.. 대 민 성 수고해쓰요 어푸푸

Copy link
Collaborator

@seungjae708 seungjae708 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고했으요~

Copy link
Collaborator

@dmp100 dmp100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

대 민 성

@sonms sonms merged commit ba2d3b6 into develop Jan 11, 2026
@vvan2 vvan2 added this to the [키어로] AppJam milestone Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature ✨ 신규 기능 구현 🪐민성 민성 전용 라벨

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] 공통 함수 만들기 + provider 세팅

6 participants