[Fix/#203] 홈 화면 Collapsible Header 플링 시 하단 검정 배경 노출문제 해결#204
[Fix/#203] 홈 화면 Collapsible Header 플링 시 하단 검정 배경 노출문제 해결#204
Conversation
…산 적용 - onGloballyPositioned를 사용하여 StickyHeader의 실제 하단 위치를 기반으로 content offset을 계산하도록 수정 - NestedScrollConnection 내 fling 핸들링 및 snap 애니메이션 로직 최적화 - 불필요한 postFling 로직 제거 및 변수명 명확화 (stickyHeaderHeightDp -> initialStickyHeaderHeightDp)
WalkthroughStickyHeader의 실제 하단 위치를 런타임에 측정해 상태로 저장하고, 초기 StickyHeader 높이 값 사용을 조정하며 플링/스냅 처리 로직과 애니메이션 업데이트를 변경했습니다. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@presentation/src/main/java/com/threegap/bitnagil/presentation/screen/home/model/CollapsibleHeaderState.kt`:
- Around line 31-35: The collapsed offset is 0 until onGloballyPositioned fills
stickyHeaderActualBottomPx, causing a visual jump; to fix, provide a safe
fallback instead of 0 by either initializing stickyHeaderActualBottomPx with a
fallback px value or making collapsedContentOffsetDp return with(density) {
max(stickyHeaderActualBottomPx, fallbackPx).toDp() }; use a deterministic
fallback derived from your known collapsed header height (or a passed-in
default) and update stickyHeaderActualBottomPx in the existing
onGloballyPositioned handler so the real measured value replaces the fallback
once available.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 263dc035-f7cf-4608-86a6-af5987aac606
📒 Files selected for processing (2)
presentation/src/main/java/com/threegap/bitnagil/presentation/screen/home/HomeScreen.ktpresentation/src/main/java/com/threegap/bitnagil/presentation/screen/home/model/CollapsibleHeaderState.kt
...src/main/java/com/threegap/bitnagil/presentation/screen/home/model/CollapsibleHeaderState.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@presentation/src/main/java/com/threegap/bitnagil/presentation/screen/home/model/CollapsibleHeaderState.kt`:
- Around line 41-42: expansionProgress 계산이 expandedHeaderHeightPx가 0 이하일 때 NaN을
반환하므로, CollapsibleHeaderState의 expansionProgress 게터에서 expandedHeaderHeightPx가 0f
이하인 경우 0f를 반환하도록 보호하세요; 즉 currentHeightPx / expandedHeaderHeightPx 연산을 수행하기 전에
expandedHeaderHeightPx <= 0f 조건을 검사하고, 그럴 때는 0f를 반환하고 그렇지 않으면 (currentHeightPx /
expandedHeaderHeightPx).coerceIn(0f, 1f)를 반환하도록 변경하면 됩니다 (참조 심볼:
expansionProgress, expandedHeaderHeightPx, currentHeightPx,
minExpandedHeaderHeight).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f080a24b-0e3b-428b-a6e9-4ef4195e733c
📒 Files selected for processing (1)
presentation/src/main/java/com/threegap/bitnagil/presentation/screen/home/model/CollapsibleHeaderState.kt
[ PR Content ]
홈 화면 Collapsible Header 플링 시 하단 검정 배경 노출되던 문제를 수정했습니다.
Related issue
Screenshot 📸
Screen_recording_20260325_175825.MOV
Screen_recording_20260325_180813.mp4
Work Description
To Reviewers 📢
Summary by CodeRabbit
버그 수정
리팩터