Skip to content

Conversation

l5x5l
Copy link
Contributor

@l5x5l l5x5l commented Aug 8, 2025

[ PR Content ]

일부 화면에서 statusBar 영역 색상과 화면 내 배경 색상이 일치하지 않은 문제를 수정합니다.

Related issue

Screenshot 📸

x

Work Description

  • statusBarsPadding이 background 전에 설정되던 부분을 background이후에 적용되도록 수정

To Reviewers 📢

x

Summary by CodeRabbit

  • Style
    • 여러 화면에서 배경색과 상태바 패딩의 적용 순서가 변경되어, 배경색이 먼저 적용된 후 상태바 패딩이 추가됩니다.
    • UI 요소나 기능에는 변화가 없으며, 일부 레이아웃의 시각적 일관성이 개선됩니다.

Copy link

coderabbitai bot commented Aug 8, 2025

Walkthrough

여러 Compose 화면의 루트 Column에서 Modifier 체인의 순서가 변경되었습니다. 기존에는 statusBarsPadding()이 먼저 적용되고 그 다음에 background()가 적용되었으나, 이번 변경으로 background()가 먼저 적용되고 그 다음에 statusBarsPadding()이 적용되도록 수정되었습니다. UI 요소나 로직에는 변화가 없습니다.

Changes

Cohort / File(s) Change Summary
Modifier 순서 변경: Column 배경 및 패딩
presentation/src/main/java/com/threegap/bitnagil/presentation/emotion/EmotionScreen.kt, presentation/src/main/java/com/threegap/bitnagil/presentation/intro/IntroScreen.kt, presentation/src/main/java/com/threegap/bitnagil/presentation/login/LoginScreen.kt, presentation/src/main/java/com/threegap/bitnagil/presentation/onboarding/OnBoardingScreen.kt, presentation/src/main/java/com/threegap/bitnagil/presentation/setting/SettingScreen.kt, presentation/src/main/java/com/threegap/bitnagil/presentation/terms/TermsAgreementScreen.kt, presentation/src/main/java/com/threegap/bitnagil/presentation/webview/BitnagilWebViewScreen.kt, presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineScreen.kt
Column의 Modifier 체인에서 배경(background) 적용이 statusBarsPadding()보다 먼저 오도록 순서 변경. UI 및 로직 변화 없음.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2분

Poem

하얀 배경 먼저 깔고
토끼는 패딩을 두르네
Compose 화면 곳곳마다
순서만 살짝 바꿨을 뿐
깔끔한 코드, 기분도 산뜻!
🐇✨

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 Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ui/#82-status_bar_color

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@l5x5l l5x5l requested a review from wjdrjs00 August 8, 2025 10:34
@l5x5l l5x5l self-assigned this Aug 8, 2025
@l5x5l l5x5l added 📱 UI UI 추가 및 수정 (비지니스 로직을 포함하지 않는 작업) 세환 labels Aug 8, 2025
Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 456d752 and 4411937.

📒 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()"

Copy link
Member

@wjdrjs00 wjdrjs00 left a comment

Choose a reason for hiding this comment

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

LGTM~!

@l5x5l l5x5l merged commit 4877f78 into develop Aug 9, 2025
2 checks passed
@l5x5l l5x5l deleted the ui/#82-status_bar_color branch August 9, 2025 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

세환 📱 UI UI 추가 및 수정 (비지니스 로직을 포함하지 않는 작업)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI] 일부 화면의 배경색과 statusBar색상이 일치하지 않은 문제 수정

2 participants