[Refactor/#225] 디자인 시스템 타이포그래피 구조 개선#226
Conversation
Walkthrough앱 루트에 Changes타이포그래피 및 테마 적용
Estimated code review effort: 3 (Moderate) | ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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.
🧹 Nitpick comments (1)
core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/typography/Type.kt (1)
17-33: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
textStyle()헬퍼 구현 확인.
Dp.toSp()는fontScale에만 의존해 변환되므로(density.density와 무관), 시스템 폰트 배율이 바뀌어도 실제 렌더링 크기는 dp 값 그대로 유지됩니다.Theme.kt의remember(density)와 결합해 fontScale 변경 시에만 재계산되는 구조도 올바릅니다. 다만 이 division-only 동작은 비직관적일 수 있어, 향후 유지보수자가 오해하지 않도록 간단한 주석을 남기는 것도 좋을 것 같습니다.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/typography/Type.kt` around lines 17 - 33, In the textStyle() helper, add a brief comment documenting that converting the typography dimensions with Dp.toSp() intentionally depends on fontScale rather than display density, so rendered text sizes remain based on the dp values while responding to system font scaling. Keep the existing conversion logic and Theme.kt recomposition behavior unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/typography/Type.kt`:
- Around line 17-33: In the textStyle() helper, add a brief comment documenting
that converting the typography dimensions with Dp.toSp() intentionally depends
on fontScale rather than display density, so rendered text sizes remain based on
the dp values while responding to system font scaling. Keep the existing
conversion logic and Theme.kt recomposition behavior unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ad3600f7-10c4-49c8-af9a-da4596012fc8
📒 Files selected for processing (4)
app/src/main/java/com/threegap/bitnagil/MainActivity.ktcore/designsystem/src/main/java/com/threegap/bitnagil/designsystem/Theme.ktcore/designsystem/src/main/java/com/threegap/bitnagil/designsystem/typography/BitnagilTextStyle.ktcore/designsystem/src/main/java/com/threegap/bitnagil/designsystem/typography/Type.kt
💤 Files with no reviewable changes (1)
- core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/typography/BitnagilTextStyle.kt
[ PR Content ]
디자인 시스템 타이포그래피의 구조를 개선합니다. 공개 토큰 이름 38개와 dp 기반 폰트 크기 정책은 그대로 유지되며, feature 모듈 호출부 변경은 없습니다.
Related issue
Screenshot 📸
UI 변경 없음 (렌더링 결과 동일)
Work Description
val로 보관하는 구조로 변경했습니다. 토큰 접근이 단순 필드 읽기가 되어 리컴포지션마다 발생하던 객체 할당·단위 변환이 제거됩니다.copy1줄 패턴으로, 스타일 추가 시 수정 지점이 3곳 → 1곳이 됩니다.textStyle()헬퍼로 흡수했습니다. 미사용이던toSpTextStyle(dp 정책에 어긋나는 sp 변환 선택지)도 함께 제거됩니다.LocalBitnagilTypography provides LocalBitnagilTypography.current를remember(density) { BitnagilTypography(density) }실제 주입으로 교체했습니다. 시스템 글꼴 크기 변경 시 자동 재계산됩니다.BitnagilTheme으로 래핑했습니다. 기존에는 BitnagilTheme이 프로덕션에서 한 번도 적용되지 않고 있었는데(사용처 전부 프리뷰), 새 구조에서는 테마 미적용 시 fontScale=1 폴백이 쓰여 dp 고정 정책이 깨지므로 루트 래핑으로 유지시켰습니다.To Reviewers 📢
LocalBitnagilTypography기본값을Density(1f)폴백 인스턴스로 둔 것은 BitnagilTheme으로 감싸지 않은 기존 프리뷰(80여 개 파일)를 깨뜨리지 않기 위함입니다. 프리뷰 기본 fontScale=1에서는 기존과 동일하게 렌더링됩니다.:core:designsystem/:presentation/:app컴파일,assembleDebug,ktlintCheck통과.LocalDensity provides오버라이드가 프로젝트에 없음을 확인했습니다. 실기기에서 시스템 글꼴 크기 변경 시 텍스트 크기 불변 확인을 함께 부탁드립니다.Summary by CodeRabbit