Skip to content

Conversation

@jihee-dev
Copy link
Member

@jihee-dev jihee-dev commented Jan 23, 2026

NDGL-30 디자인 시스템 리소스 추가(typography, color, theme)

컴포넌트 구현은 길어질 것 같아서 별도 PR로 올리는 것이 좋을 것 같아서 먼저 올립니다


연관 문서

디자인

변경사항

  • typography 추가
  • color 추가
  • theme 추가
    • typography 사용 시 -> NDGLTheme.typography.body14Medium
    • color 사용 시(NDGLTheme 안에서만 호출) -> NDGLTheme.colors.primary500

테스트 체크 리스트

  • 빌드 테스트

Summary by CodeRabbit

  • 리팩토링

    • 색상·타이포 테마를 데이터 기반 구조로 통합하고 테마 제공 방식을 단순화해 유지보수성과 일관성 향상
  • 신규

    • 통합된 색상(NDGLColors)과 타이포그래피(NDGLTypography) 공개 접근자 및 로컬 제공자 추가로 UI 커스터마이징 및 재사용성 개선
    • NDGLTheme를 통해 테마 적용 흐름을 단일화
  • 제거

    • 기존 개별 색상 상수 및 이전 중앙화된 타이포 설정 일부 삭제

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 23, 2026

Walkthrough

테마 시스템을 CompositionLocal 기반으로 재구성했습니다. 색상 상수를 NDGLColors 데이터 클래스로 통합하고 LocalNDGLColors를 추가했으며, 폰트 기반 NDGLTypographyLocalNDGLTypography를 도입하고 NDGLTheme 객체로 색상·타이포그래피 접근을 중앙화했습니다.

Changes

Cohort / File(s) 변경 요약
Color 테마 구조화
core/ui/src/main/java/com/yapp/ndgl/core/ui/theme/Color.kt
공개 색상 상수 6개(Purple80, PurpleGrey80, Pink80, Purple40, PurpleGrey40, Pink40) 제거. @Immutable NDGLColors 데이터 클래스 추가, 내부 ndglColors 인스턴스 및 공개 LocalNDGLColors: CompositionLocal<NDGLColors> 추가 (+77/-6).
Theme 시스템 개편
core/ui/src/main/java/com/yapp/ndgl/core/ui/theme/Theme.kt
NDGLTheme 객체 추가. NDGLTheme.colors/NDGLTheme.typography@Composable 읽기 전용 접근자 추가. NDGLTheme 컴포저블 시그니처를 단순화하고 CompositionLocalProviderLocalNDGLColors·LocalNDGLTypography를 공급하여 MaterialTheme에 매핑 (+41/-42).
Typography 신규 추가
core/ui/src/main/java/com/yapp/ndgl/core/ui/theme/Typography.kt
Pretendard 폰트 패밀리 정의 및 @Immutable NDGLTypography 데이터 클래스 도입. 내부 ndglTypography 인스턴스와 공개 LocalNDGLTypography: CompositionLocal<NDGLTypography> 추가(여러 TextStyle: title/subtitle/body 등) (+121/-0).
기존 Type 파일 제거
core/ui/src/main/java/com/yapp/ndgl/core/ui/theme/Type.kt
이전 Material3 Typography 정의 파일 삭제(공개 val Typography 선언 제거) (+0/-34).

Sequence Diagram(s)

sequenceDiagram
    participant App as AppComposable
    participant NDGL as NDGLTheme
    participant CL as CompositionLocalProvider
    participant MT as MaterialTheme
    participant Content as ContentComposable

    App->>NDGL: call NDGLTheme(content)
    NDGL->>CL: provide LocalNDGLColors, LocalNDGLTypography
    CL->>MT: construct colorScheme and typography from NDGLColors/NDGLTypography
    MT->>Content: render content() with provided locals
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 변경 사항의 주요 내용과 일치합니다. 디자인 시스템 리소스(typography, color, theme) 추가라는 명확한 내용을 담고 있으며, 파일 수정 내용과 PR 목표를 정확히 반영합니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment on lines 49 to 53
internal fun ndglColors() = NDGLColors(
white = colorResource(R.color.white),

primary50 = colorResource(R.color.primary_50),
primary100 = colorResource(R.color.primary_100),
Copy link
Contributor

Choose a reason for hiding this comment

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

color를 xml로 만들어서 colorResource로 불러오는 이유가 있을까요? 컴포즈 전용이면 Color(헥사코드)로 선언하고 사용하는게 가독성이나 성능 측면에서 더 좋지 않을까요? colorResource를 사용할 때 Composable 제약도 생기기도 하구요.

Copy link
Member Author

Choose a reason for hiding this comment

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

나중에 다크모드 대응할 때 편하지 않을까 해서 했었는데 상관 없을 것 같아요!
추가할 때 다크모드 버전으로 넣으면 되니까..! Color로 선언하도록 수정했습니다~!

@jihee-dev jihee-dev self-assigned this Jan 24, 2026
Base automatically changed from refactor/NDGL-44 to develop January 24, 2026 02:45
@jihee-dev jihee-dev force-pushed the feature/NDGL-30 branch 2 times, most recently from 5b9d1e7 to d6c73ba Compare January 24, 2026 04:18
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: 1

🤖 Fix all issues with AI agents
In `@core/ui/src/main/java/com/yapp/ndgl/core/ui/theme/Theme.kt`:
- Around line 25-38: CompositionLocalProvider currently only provides
LocalNDGLColors so NDGLTheme.typography falls back to the default
NDGLTypography(); update the CompositionLocalProvider (the one wrapping
MaterialTheme) to also provide LocalNDGLTypography with the theme typography
instance (e.g., ndglTypography) used by NDGLTheme.typography. Ensure the
provider key is LocalNDGLTypography and the value is the NDGL typography object
created alongside ndglColors so NDGLTheme.typography reads the intended
design-system typography.

@jihee-dev jihee-dev force-pushed the feature/NDGL-30 branch 3 times, most recently from a0090c7 to d1c64eb Compare January 24, 2026 05:56
@jihee-dev
Copy link
Member Author

Typography 네이밍 변경사항이 있어서 반영했습니다~!

@jihee-dev jihee-dev merged commit 77884cc into develop Jan 24, 2026
2 checks passed
@jihee-dev jihee-dev deleted the feature/NDGL-30 branch January 24, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants