-
Notifications
You must be signed in to change notification settings - Fork 0
[UI 배경 색상 설정 이후 statusBar 패딩이 적용되도록 수정 #84
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
Conversation
Walkthrough여러 Compose 화면의 루트 Column에서 Modifier 체인의 순서가 변경되었습니다. 기존에는 Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2분 Poem
Note 🔌 MCP (Model Context Protocol) integration is now available in Early Access!Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 2
🧹 Nitpick comments (7)
presentation/src/main/java/com/threegap/bitnagil/presentation/login/LoginScreen.kt (1)
85-86
: 전역 일관성 확인 결과
레포 전반에 걸쳐.statusBarsPadding() -> .background()
또는.background() -> .statusBarsPadding()
패턴이 모두 0건으로, 해당 조합은 오직LoginScreen.kt
에서만 사용되고 있습니다.따라서 전역적인 불일치 이슈는 없으나, 아래 사항을 빠른 수동 검증 부탁드립니다:
- Light/Dark 모드에서 상태바 아이콘 가시성
- 노치/펀치홀 기기에서 상단 경계선(색 이음새) 발생 여부
- 다른 화면의 부모/Window 배경색과의 일관성
만약 상태바 영역까지 동일한 흰 배경을 칠하고 싶다면, Modifier 순서를 아래처럼 교체하세요:
- .background(BitnagilTheme.colors.white) - .statusBarsPadding(), + .statusBarsPadding() + .background(BitnagilTheme.colors.white),추가로, 공통 확장 함수(
screenBackgroundWithStatusBarPadding()
등)로 추출해 전역 일관성을 개선하는 것도 고려해 보시면 좋겠습니다.presentation/src/main/java/com/threegap/bitnagil/presentation/intro/IntroScreen.kt (1)
101-103
: padding 체인 간소화 제안가독성과 불필요한 체인 최소화를 위해 padding을 한 번에 적용하는 편이 명확합니다.
- .padding(horizontal = 16.dp) - .padding(bottom = 20.dp), + .padding(horizontal = 16.dp, bottom = 20.dp),presentation/src/main/java/com/threegap/bitnagil/presentation/webview/BitnagilWebViewScreen.kt (3)
67-68
: Modifier 순서 변경에 따른 배경 페인팅 범위 변경 — 의도 확인 요청현재 순서(.background → .statusBarsPadding)는 패딩으로 늘어난 바깥 영역(= 상태바 높이만큼)에는 배경이 칠해지지 않습니다. Edge-to-edge 구성에서 상태바 영역이 투명(또는 windowBackground)으로 보일 수 있습니다. PR 제목처럼 “배경 색상 설정 이후 패딩 적용”이 의도라면 현재 구현이 맞습니다. 다만 디자인이 상태바 뒤까지 흰색이 보이길 원한다면 순서를 반대로 하거나 상위 컨테이너에서 배경을 칠해 주세요.
검증 제안:
- API 33+ 기기에서 Light/Dark 테마 각각 확인
- systemBars를 투명하게 설정한 경우 상태바 영역 배경이 의도대로 보이는지 스크린샷 확인
가능한 대안 (배경을 상태바 영역까지 칠하고 싶을 때):
- .background(BitnagilTheme.colors.white) - .statusBarsPadding(), + .statusBarsPadding() + .background(BitnagilTheme.colors.white),
76-78
: Column 내부 자식에 fillMaxSize 사용 — weight(1f) 권장Column에 TopBar + 콘텐츠 구조에서 두 번째 자식(AndroidView)에 fillMaxSize를 주면 부모의 전체 높이를 요구합니다. 겹치지는 않더라도 측정/배치가 비효율적이고, 의도는 “남은 공간만 차지”에 가깝습니다. weight(1f)로 표현하는 것이 명확합니다.
- AndroidView( - modifier = Modifier.fillMaxSize(), + AndroidView( + modifier = Modifier + .weight(1f) + .fillMaxWidth(),
33-39
: 외부 도메인 클릭 시 무동작 가능성 — 브라우저 Intent 처리 고려현재 로직은 notion.site가 아니면 true를 반환(호스트 앱에서 처리)하지만 별도 처리가 없어 사용자가 링크를 눌러도 반응이 없을 수 있습니다. 외부 링크는 브라우저(또는 Custom Tabs)로 열어주는 처리를 권장합니다.
의도적으로 차단이라면 그대로 두되, 아니라면 아래처럼 처리해 주세요(필요 시
import android.content.Intent
추가):override fun shouldOverrideUrlLoading(view: WebView?, request: WebResourceRequest?): Boolean { val uri = request?.url val isNotion = uri?.host?.contains("notion.site") == true return if (isNotion) { false } else { runCatching { val intent = Intent(Intent.ACTION_VIEW, uri) view?.context?.startActivity(intent) } true } }presentation/src/main/java/com/threegap/bitnagil/presentation/setting/SettingScreen.kt (1)
88-89
: 전체 Screen Composable에서 Modifier 순서 일관성 확인 필요
리포지토리 내 거의 모든 Screen(Setting, Login, Emotion, WebView, TermsAgreement 등)에서.background(…) .statusBarsPadding()순으로 적용되고 있어, 상태바 영역은 배경색이 아닌 시스템바(Window) 색을 보여줍니다. 의도대로라면 괜찮지만, 다음 사항을 꼭 실제 환경에서 확인해 주세요:
- Edge-to-edge(투명 상태바) 모드에서 상단 영역 색 불일치/깜빡임 여부
- 다크 모드 또는 동적 테마 적용 시 시스템바 색과
BitnagilTheme.colors.white
간 일관성만약 “상태바 패딩 영역까지 동일한 배경색을 칠하는 것”이 목적이라면 순서를 아래처럼 변경하거나, 전역 확장 함수로 캡슐화하는 방안을 고려해 보세요:
- Modifier - .background(BitnagilTheme.colors.white) - .statusBarsPadding() + Modifier + .statusBarsPadding() + .background(BitnagilTheme.colors.white)presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineScreen.kt (1)
105-113
: 여러 화면에서 반복되는 루트 Modifier 공통화 제안동일 패턴이 다수 화면에서 반복된다면, 공통 래퍼를 두면 유지보수성과 일관성이 좋아집니다. 예: ScreenRoot/DefaultScreenModifier로 추출.
필요하시면 다음과 같이 공통 Composable을 만들어 드릴 수 있습니다:
@Composable fun ScreenRoot( modifier: Modifier = Modifier, background: Color = BitnagilTheme.colors.white, content: @Composable ColumnScope.() -> Unit ) { Column( modifier = modifier .fillMaxSize() .background(background) .statusBarsPadding() .windowInsetsPadding(WindowInsets.ime.exclude(WindowInsets.navigationBars)) ) { content() } }사용:
ScreenRoot { // 기존 Column 내부 컨텐츠 }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
presentation/src/main/java/com/threegap/bitnagil/presentation/emotion/EmotionScreen.kt
(1 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/intro/IntroScreen.kt
(1 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/login/LoginScreen.kt
(1 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/onboarding/OnBoardingScreen.kt
(1 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/setting/SettingScreen.kt
(1 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/terms/TermsAgreementScreen.kt
(1 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/webview/BitnagilWebViewScreen.kt
(1 hunks)presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineScreen.kt
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (6)
presentation/src/main/java/com/threegap/bitnagil/presentation/intro/IntroScreen.kt (2)
69-71
: Modifier 순서 변경 LGTM (background → statusBarsPadding).PR 의도와 일치하며, 동일 체인 내 순서만 조정되어 기능/레이아웃 로직에 부작용 없어 보입니다.
69-71
: 상태바 영역 색상 처리 확인 필요background를 padding보다 먼저 적용하면, padding으로 확보된 상단 인셋 영역(= status bar 높이)은 이 Column의 배경으로 칠해지지 않습니다. 상위 컨테이너/Window 배경 또는 시스템 바 색상이 화면 배경과 다르면 경계가 보일 수 있어요.
- 앱이 edge-to-edge를 사용한다면 시스템 바 색상/스크림 설정이 기대와 일치하는지 확인해주세요.
- 상태바 뒤까지 흰색으로 칠해야 한다면, 순서를
statusBarsPadding().background(...)
로 두거나 상위 컨테이너에 배경을 적용하는 방식을 검토해 주세요.검증 부탁드립니다.
presentation/src/main/java/com/threegap/bitnagil/presentation/emotion/EmotionScreen.kt (2)
89-90
: Modifier 적용 순서 변경 적절합니다background을 statusBarsPadding보다 먼저 적용해 배경이 status bar 영역까지 그려지도록 보장합니다. PR 의도와 완전히 일치하며 다른 UI/로직 영향 없습니다.
89-90
: statusBarsPadding → background 순서 일관성 수동 검증 필요
자동화 스크립트로 역순(.statusBarsPadding()
이후.background()
)을 검색했으나, 패턴 다양성으로 인해 완벽 검출이 어려울 수 있습니다. 전체 코드베이스에서 아래 순서가 일관되게 적용됐는지 수동으로 확인 부탁드립니다.
- 올바른 순서 예시:
.background(…)
.statusBarsPadding()
presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineScreen.kt (2)
106-113
: 배경 → statusBarsPadding 순서 변경 잘했습니다fillMaxSize 이후 background를 먼저 적용하고 statusBarsPadding을 뒤에 두면, Column의 배경이 시스템바 영역까지 안정적으로 그려지고(edge-to-edge), 컨텐츠만 패딩으로 밀리므로 PR 의도에 부합합니다. 레이아웃 크기 변화 없이 시각적 일관성도 좋아집니다.
110-113
: IME 인셋 처리·내비게이션 바 겹침 및 StatusBar 아이콘 대비 확인 요청아래 코드로 인해 3버튼 내비게이션 기기에서 ‘등록하기’ 버튼이 가려질 수 있으므로, 변경 이후 다음 시나리오를 꼭 점검해 주세요:
대상 코드 (WriteRoutineScreen.kt:109–113)
.background(color = BitnagilTheme.colors.white) .statusBarsPadding() .windowInsetsPadding( WindowInsets.ime.exclude(WindowInsets.navigationBars) )
- 제스처/3버튼 네비게이션 모두에서 ‘등록하기’ 버튼이 가려지지 않는지
- 키보드(IME) 오픈/닫힘 시 버튼이 키보드 위로 정상적으로 떠오르는지
- 배경이 white인 화면들에서 StatusBar 아이콘(다크 아이콘) 대비가 올바르게 적용되는지
• Repo 전역에 Accompanist SystemUiController 관련 사용 흔적(rememberSystemUiController, statusBarDarkIcons, setStatusBarColor 등) 없음
• 테마나 Activity 레벨에서 별도 처리 여부 확인, 필요 시 SystemUiController 도입 고려아래 스크립트로 빠른 검색이 가능합니다:
rg -n -S "SystemUiController|rememberSystemUiController|statusBarDarkIcons|setStatusBarColor" rg -n -A3 -B3 "statusBarsPadding()"
presentation/src/main/java/com/threegap/bitnagil/presentation/onboarding/OnBoardingScreen.kt
Show resolved
Hide resolved
presentation/src/main/java/com/threegap/bitnagil/presentation/terms/TermsAgreementScreen.kt
Show resolved
Hide resolved
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.
LGTM~!
[ PR Content ]
일부 화면에서 statusBar 영역 색상과 화면 내 배경 색상이 일치하지 않은 문제를 수정합니다.
Related issue
Screenshot 📸
x
Work Description
To Reviewers 📢
x
Summary by CodeRabbit