Skip to content

[#366] PushNotificationListView의 헤더에서 토글 형태의 필터링 버튼을 탭했을 시 불필요한 애니메이션이 렌더링되는 현상을 해결한다#367

Merged
opficdev merged 3 commits intodevelopfrom
fix/#366-PushNotificationListView-header
Apr 6, 2026
Merged

[#366] PushNotificationListView의 헤더에서 토글 형태의 필터링 버튼을 탭했을 시 불필요한 애니메이션이 렌더링되는 현상을 해결한다#367
opficdev merged 3 commits intodevelopfrom
fix/#366-PushNotificationListView-header

Conversation

@opficdev
Copy link
Copy Markdown
Owner

@opficdev opficdev commented Apr 6, 2026

@opficdev opficdev self-assigned this Apr 6, 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에서는 PushNotificationListView의 초기화 로직을 정리하고 헤더 뷰의 레이아웃 및 버튼 동작 방식을 수정했습니다. 리뷰 결과, UIFont를 직접 사용하여 높이를 계산하는 방식은 Dynamic Type 대응에 취약하므로 @ScaledMetric이나 패딩 활용을 권장하며, 애니메이션 억제를 위해 사용된 DispatchQueue.main.async 대신 SwiftUI의 의도에 맞는 withAnimation(.none)을 사용하도록 개선이 필요합니다.

.frame(maxWidth: .infinity, alignment: .leading)
}
}
.frame(height: UIFont.preferredFont(forTextStyle: .body).lineHeight.rounded(.up) + 20)
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을 사용하여 뷰의 높이를 직접 계산하는 방식은 SwiftUI의 선언적 UI 패턴에 부합하지 않으며, 사용자의 Dynamic Type 설정 변경에 유연하게 대응하기 어렵습니다. 고정된 높이를 지정해야 한다면 @ScaledMetric을 사용하거나, 내부 콘텐츠(headerContent)에 패딩을 추가하여 시스템이 폰트 크기에 맞춰 적절한 높이를 결정하도록 하는 것이 유지보수 및 접근성 측면에서 더 좋습니다.

@opficdev opficdev merged commit 4553d7a into develop Apr 6, 2026
1 check passed
@opficdev opficdev deleted the fix/#366-PushNotificationListView-header branch April 6, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant