마이페이지 레벨 프로그레스바 stop indicator 렌더링 오류 수정#387
Conversation
Material3 최신 버전(BOM 2026.03.01)에서 LinearProgressIndicator가 기본적으로 트랙 끝에 stop indicator(점)를 그려 progress=0일 때도 바가 꽉 찬 것처럼 보이는 문제 수정
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR updates the ChangesLevel Progress UI Styling
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 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)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
| color = M1, | ||
| trackColor = G4, | ||
| drawStopIndicator = {}, | ||
| gapSize = 0.dp, |
There was a problem hiding this comment.
[Nit] gapSize = 0.dp 중복
drawStopIndicator = {}로 indicator 자체를 그리지 않으므로 gapSize(indicator와 progress bar 사이 간격)는 영향이 없습니다. 제거해도 동일하게 동작합니다.
단, 명시적으로 gap 의도를 제거한다는 의미로 남겨두는 것도 나쁘지 않아서 필수 수정은 아닙니다.
There was a problem hiding this comment.
현재 코드 유지
M3 1.4.0 소스(ProgressIndicator.kt) 직접 확인 결과, gapSize와 drawStopIndicator는 서로 독립적으로 동작합니다.
// ProgressIndicator.kt 핵심 로직
val gapSizeFraction = adjustedGapSize / size.width.toDp()
val trackStartFraction =
currentCoercedProgress + min(currentCoercedProgress, gapSizeFraction)
drawLinearIndicator(trackStartFraction, 1f, trackColor, ...) // track
drawLinearIndicator(0f, currentCoercedProgress, color, ...) // progress
drawStopIndicator(this) // stop indicator (별개)gapSize는 progress bar와 track 사이의 시각적 간격을 제어하며, drawStopIndicator(indicator 점) 렌더링과 무관합니다. gapSize = 0.dp가 없으면 progress가 0%보다 클 때 progress와 track 사이에 기본 간격(LinearIndicatorTrackGapSize)이 생깁니다.
원래 리뷰 코멘트의 전제가 틀렸습니다. 수정하지 않는 것이 맞습니다.
작업 배경
LinearProgressIndicator가 기본적으로 트랙 끝에 stop indicator(작은 점)를 그리는 스펙 변경levelPercent = 0일 때도 오른쪽 끝에 점이 표시되어 바가 꽉 찬 것처럼 보이는 시각적 오류 발생변경 사항
MyPageScreen.ktLinearProgressIndicator에drawStopIndicator = {},gapSize = 0.dp추가영향 범위
Test Plan
levelPercent = 0일 때 빈 바로 표시되는지 확인levelPercent값(0, 50, 100)에서 바 채움 비율이 정확한지 확인🤖 Generated with Claude Code
Summary by CodeRabbit