Skip to content

[#417] sceneWidth를 사용해서 프레임 크기를 잡은 ui를 재구성한다#431

Merged
opficdev merged 7 commits intodevelopfrom
ui/#417-screenWidthHeight
May 7, 2026
Merged

[#417] sceneWidth를 사용해서 프레임 크기를 잡은 ui를 재구성한다#431
opficdev merged 7 commits intodevelopfrom
ui/#417-screenWidthHeight

Conversation

@opficdev
Copy link
Copy Markdown
Owner

@opficdev opficdev commented May 7, 2026

🔗 연관된 이슈

📝 작업 내용

📌 요약

  • iPad, Mac 지원을 위해 sceneWidth 기반 UI 의존성을 줄이고, 실제 컨테이너 및 텍스트 기준 크기를 사용하는 방향으로 개선

🔍 상세

  • 로그인 버튼 크기를 sceneWidth 기준에서 고정 너비 및 Dynamic Type 기반 높이로 변경
  • 로그인 관련 에셋의 idiom을 universal로 변경하여 iPad, Mac 환경 대응
  • Home, Todo, Web, PushNotification row의 아이콘 크기를 sceneWidth * 0.08에서 largeTitle 기준 크기로 변경
  • 프로필 히트맵을 실제 컨테이너 폭 기준으로 계산하도록 변경
  • 히트맵 셀 크기에 최소/최대값 적용 및 스크롤 비활성화 처리
  • 미사용 sceneWidth 환경 의존성 제거

📸 영상 / 이미지 (Optional)

@opficdev opficdev self-assigned this May 7, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

이번 PR은 에셋의 idiom 설정을 universal로 변경하고, 여러 UI 컴포넌트에서 sceneWidth 의존성을 제거하여 폰트 크기 기반의 레이아웃으로 개선하는 작업을 포함합니다. 주요 변경 사항으로 LoginButton의 레이아웃 단순화와 HeatmapViewGeometryReader를 이용한 크기 추적 로직 도입이 있습니다. 리뷰 피드백에서는 Dynamic Type 대응을 위해 UIFont.preferredFont 대신 @ScaledMetric 사용을 권장하였으며, HeatmapView에서 스크롤을 비활성화할 경우 발생할 수 있는 가독성 및 사용자 경험 문제를 지적했습니다.

@State private var text = ""
@State private var height = CGFloat.zero
let action: () -> Void
private let height = UIFont.preferredFont(forTextStyle: .body).lineHeight
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

UIFont.preferredFont를 사용하여 높이를 계산하는 대신, SwiftUI의 @ScaledMetric을 사용하는 것이 좋습니다. @ScaledMetric은 Dynamic Type 설정 변경에 따라 자동으로 값을 업데이트하며, SwiftUI의 선언적 스타일에 더 적합합니다. .body 스타일의 기본 line height인 22를 기준으로 설정할 수 있습니다.

Suggested change
private let height = UIFont.preferredFont(forTextStyle: .body).lineHeight
@ScaledMetric(relativeTo: .body) private var height: CGFloat = 22

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

반영

Comment thread DevLog/UI/Common/Component/TodoItemRow.swift Outdated
Comment thread DevLog/UI/Common/Component/WebItemRow.swift Outdated
Comment thread DevLog/UI/Home/HomeView.swift Outdated
Comment thread DevLog/UI/Home/HomeView.swift Outdated
Comment thread DevLog/UI/Profile/HeatmapView.swift
Comment thread DevLog/UI/PushNotification/PushNotificationListView.swift Outdated
@opficdev opficdev merged commit f9cd8d3 into develop May 7, 2026
1 check passed
@opficdev opficdev deleted the ui/#417-screenWidthHeight branch May 7, 2026 01:13
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.

sceneWidth를 사용해서 프레임 크기를 잡은 ui를 재구성한다

1 participant