[CHORE] 디자인 시스템 토큰(Color/Typography/Spacing/Radius) 추가 - #11
Open
cchanmi wants to merge 7 commits into
Open
Conversation
dlrjswns
requested changes
Aug 3, 2026
dlrjswns
left a comment
Contributor
There was a problem hiding this comment.
수고많으셨습니다 !! p1부분 확인부탁드립니다
디자인시스템넣느라 고생많으셨습니다 :)
| content | ||
| .font(.custom(metrics.weight.postScriptName, size: metrics.fontSize)) | ||
| .tracking(metrics.letterSpacing) | ||
| .lineSpacing(metrics.lineHeight - metrics.fontSize) |
Contributor
There was a problem hiding this comment.
p1
lineHeight - fontSize는 Typography의 규칙이라 TypographyModifier보다는 Metrics 내부에서 계산하도록 하는게 좋아보여요
Suggested change
| .lineSpacing(metrics.lineHeight - metrics.fontSize) | |
| var lineSpacing: CGFloat { | |
| lineHeight - fontSize | |
| } |
Collaborator
Author
There was a problem hiding this comment.
반영했습니다. lineSpacing 계산을 Metrics.lineSpacing 계산 프로퍼티로 옮겼습니다 (f2c4644).
Comment on lines
+1
to
+12
| enum FontWeight: Hashable { | ||
| case regular, medium, semiBold, bold | ||
|
|
||
| var postScriptName: String { | ||
| switch self { | ||
| case .regular: "Pretendard-Regular" | ||
| case .medium: "Pretendard-Medium" | ||
| case .semiBold: "Pretendard-SemiBold" | ||
| case .bold: "Pretendard-Bold" | ||
| } | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
개인적으로 이 구조가 추후에 다른 커스텀 폰트로 변경될 상황을 생각해보면 폰트 패밀리랑 Weight를 분리해서 관리하는 방식도 고려해보면 좋을꺼같아요 !!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe
Figma에서 전달받은 Color / Typography / Spacing / Radius 값들을 iOS 코드로 옮기는 작업입니다.
Works made
GAMSS/Sources/Core/DesignSystem/Spacing.swift,Radius.swift—CGFloat상수로 정의GAMSS/Resources/Assets.xcassets/Colors/아래 23개 Color Set(Base/Gray/Chromatic/Semantic) 추가,Color+GAMSS.swift로Color.colorWhite,Color.colorGray500등 피그마 설정된 이름 그대로 노출. Gray 13단계·Semantic 2종·Chromatic 중 green만 라이트/다크 값이 달라 Color Set의 Any/Dark Appearance로 시스템 다크모드에 자동 대응하게 구성. 모든 토큰에color접두사를 붙여 SwiftUI 내장Color.white/.red/.pink등과의 네이밍 충돌을 피함Info.plist에 등록, PostScript 이름을 매핑하는FontWeightenum 추가.Typographyenum(30개 스케일: Display/Title/Subtitle/BodyMedium/BodyRegular/Paragraph/Caption)에 fontSize/letterSpacing/lineHeight/weight를 정의하고,.typography(_:)뷰 모디파이어로 한 번에 적용 가능하게 구성GAMSSTests/에 새 테스트 파일을 추가하며project.pbxproj를 수동으로 함께 수정Changes Made
UI 변경 없음(토큰 정의만 추가, 기존 화면 미적용). 스크린샷 생략합니다.
How to Test
전체 30개 테스트(Spacing/Radius/Color/FontWeight/Typography) 통과 확인.
Additional context
typography-lineHeight-020이라는 존재하지 않는 값이 적혀 있어서 일단은 임의로 14px(=lineHeight-025)로 확정했습니다..fontWeight()로 굵기 전환이 되지 않아 웨이트별 PostScript 이름을 직접 매핑했습니다.References