-
Notifications
You must be signed in to change notification settings - Fork 1
Typography System 설계 및 적용 #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PrezelColors 파일의 위치를 theme 패키지에서 foundation/color 패키지로 변경하고, 관련 import 구문을 수정했습니다.
* feat: Pretendard Bold 폰트 추가 * feat: Pretendard Medium 폰트 추가 * feat: Pretendard SemiBold 폰트 추가
Prezel Design System에서 사용할 폰트의 Weight, Size, LineHeight, LetterSpacing에 대한 enum class를 정의합니다. * `PrezelFontWeight`: Regular, Medium, Bold 정의 * `PrezelFontSize`: 12dp부터 24dp까지 5단계 크기 정의 및 `sp` 변환 함수 추가 * `PrezelFontLineHeight`: 16sp부터 32sp까지 6단계 줄 높이 정의 * `PrezelFontLetterSpacing`: 폰트 크기에 따라 동적으로 자간을 계산하는 로직 추가
Prezel 디자인 시스템의 타이포그래피를 정의하기 위해 `PrezelTextStyle` 데이터 클래스를 추가합니다. 이 클래스는 `fontWeight`, `fontSize`, `lineHeight`, `letterSpacing`을 포함하며, 이를 Compose의 `TextStyle`로 변환하는 `toTextStyle()` 함수를 제공합니다.
* feat: Suit 폰트 PrezelFontFamily 추가 * feat: 폰트의존성 추가
Prezel 디자인 시스템에 사용될 Text Style을 정의합니다. Title, Body, Caption 스타일에 대해 각각 Medium, Bold, Regular 등의 Weight를 적용한 스타일들을 추가했습니다.
Prezel 디자인 시스템에 사용될 Typography 데이터 클래스를 추가합니다. - `Title`, `Body`, `Caption` 스타일을 정의합니다. - 각 스타일에 대해 `Medium`, `Bold`, `Regular` 등의 가중치를 포함합니다.
`PrezelTypographyScheme`를 추가하여 디자인 시스템의 타이포그래피를 정의합니다. 이 객체는 `PrezelTextStyles`를 `TextStyle`로 변환하여 `PrezelTypography`를 생성하는 `Default` 함수를 제공합니다.
* PrezelTheme에 Typography를 사용할 수 있도록 `LocalPrezelTypography` 및 관련 속성을 추가합니다. * `PrezelTheme` Composable에서 `PrezelTypographyScheme`을 제공하도록 수정합니다.
* `PrezelFontLineHeight`의 단위를 sp에서 dp로 변경 * 사용자의 기기 글꼴 크기 설정에 따라 lineHeight가 동적으로 sp로 변환되도록 `sp()` 확장 함수 추가 * `PrezelTextStyle`에서 `lineHeight.value` 대신 `lineHeight.sp()`를 사용하도록 수정
* `PrezelFontSpec.kt`
* `PrezelFontSize` 및 `PrezelFontLineHeight`의 `sp()` 함수를 `sp` 속성으로 변경하여 가독성을 개선했습니다.
* `PrezelFontLetterSpacing`의 단위를 `em`으로 변경하여 글꼴 크기에 상대적으로 적용되도록 수정했습니다.
* `PrezelTextStyle.kt`
* `toTextStyle()` 함수를 단일 표현식 함수로 단순화했습니다.
* 변경된 `PrezelFontSpec`의 속성들을 직접 사용하도록 수정했습니다.
* `PrezelTypographyScheme.kt`에 모든 타이포그래피 스타일을 표시하는 미리보기(@Preview)를 추가합니다. * 각 타이포그래피 스타일에 대한 이름, 크기, 줄 높이, 자간 및 굵기 정보를 포함합니다.
Walkthroughcore:designsystem 모듈에 Material 기반이 아닌 커스텀 Typography System을 도입합니다. 폰트 가중치, 크기, 줄높이, 자간을 정의하는 열거형들(PrezelFontWeight, PrezelFontSize, PrezelFontLineHeight, PrezelFontLetterSpacing)과 SuitFamily 폰트를 추가합니다. PrezelTextStyle 데이터 클래스와 미리 정의된 텍스트 스타일 집합(PrezelTextStyles)을 생성하고, 이를 집계하는 PrezelTypography 타입을 도입합니다. 기존 Material3 기반 TypeTokens 파일을 제거하고, PrezelTheme에 composition local을 통한 typography 프로퍼티(LocalPrezelTypography 및 PrezelTheme.typography)를 추가합니다. 또한 PrezelTypographyScheme에 Default 구성과 타이포그래피 미리보기 UI가 포함됩니다. Possibly related PRs
🚥 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. Comment |
HamBeomJoon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니당
...stem/src/main/java/com/team/prezel/core/designsystem/foundation/typography/PrezelFontSpec.kt
Outdated
Show resolved
Hide resolved
* feat: PrezelTextStyle에 Suit 폰트 적용
Prezel 디자인 시스템의 폰트 관련 상수의 네이밍 컨벤션을 통일합니다. 기존 `V_100`과 같이 언더스코어(_)를 사용하던 방식에서 `V100`으로 변경하여 일관성을 확보하고 가독성을 개선합니다. * `PrezelFontSize` enum 상수명 변경 (e.g., `V_100` -> `V100`) * `PrezelFontLineHeight` enum 상수명 변경 (e.g., `V_100` -> `V100`) * `PrezelFontLetterSpacing` enum 상수명 변경 (e.g., `V_100` -> `V100`) * 변경된 enum 상수를 사용하도록 `PrezelTextStyles` 객체 업데이트
There was a problem hiding this 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
`@Prezel/core/designsystem/src/main/java/com/team/prezel/core/designsystem/foundation/typography/PrezelFontSpec.kt`:
- Around line 11-17: The PrezelFontWeight enum's names (REGULAR, MEDIUM, BOLD)
map to non-standard FontWeight values (FontWeight.Medium, FontWeight.SemiBold,
FontWeight.Bold) and need a KDoc to explain this intentional mapping; add a KDoc
comment directly above the enum PrezelFontWeight that states Suit only provides
Medium/SemiBold/Bold and documents the mapping (REGULAR -> Suit Medium (500),
MEDIUM -> Suit SemiBold (600), BOLD -> Suit Bold (700)) and the rationale so
future readers understand why REGULAR != FontWeight.Normal.
🧹 Nitpick comments (1)
Prezel/core/designsystem/src/main/java/com/team/prezel/core/designsystem/foundation/typography/PrezelFontSpec.kt (1)
34-48:value프로퍼티 가시성 불일치
PrezelFontSize.value는private인 반면,PrezelFontLineHeight.value는public입니다. 의도적인 설계가 아니라면 API 일관성을 위해 동일한 가시성 수준을 유지하는 것이 좋습니다.♻️ 일관성을 위한 수정 제안
enum class PrezelFontLineHeight( - val value: Dp, + private val value: Dp, ) {
📌 작업 내용
🧩 관련 이슈
📸 스크린샷
📢 논의하고 싶은 내용
Summary by CodeRabbit
릴리스 노트
신기능
리팩토링
✏️ Tip: You can customize this high-level summary in your review settings.