Skip to content

[#193] iOS 17에서 PushNotificationListView의 내비게이션바가 inline이 안되는 현상을 해결한다#196

Merged
opficdev merged 6 commits intodevelopfrom
fix/#193-navigationbar
Mar 6, 2026
Merged

[#193] iOS 17에서 PushNotificationListView의 내비게이션바가 inline이 안되는 현상을 해결한다#196
opficdev merged 6 commits intodevelopfrom
fix/#193-navigationbar

Conversation

@opficdev
Copy link
Copy Markdown
Owner

@opficdev opficdev commented Mar 6, 2026

@opficdev opficdev self-assigned this Mar 6, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 Pull Request는 주로 iOS 17에서 PushNotificationListView의 내비게이션 바가 예상대로 인라인으로 표시되지 않던 문제를 해결합니다. NavigationBarConfigurator에 alwaysVisible 옵션을 도입하여 일관된 배경 가시성을 보장합니다. 또한, PushNotificationListView는 더 나은 코드 구성을 위해 리팩토링되었으며, iOS 18에 대한 조건부 UI 조정이 포함되어 있습니다. 다른 뷰에서는 사소한 스타일 변경도 이루어졌습니다.

Highlights

  • NavigationBarConfigurator 개선: NavigationBarConfigurator에 alwaysVisible 매개변수를 추가하여 NavigationStack 뷰에서 스크롤 시 내비게이션 바 배경이 사라지는 현상(특히 iOS 17에서)을 해결하고 배경이 항상 표시되도록 했습니다.
  • PushNotificationListView 리팩토링: PushNotificationListView의 가독성과 유지보수성을 향상시키기 위해 목록 내용을 notificationList computed property로, 안전 영역 헤더를 safeAreaHeader로 분리했습니다.
  • iOS 18 헤더 호환성: PushNotificationListView의 headerView를 iOS 18 이상에서는 contentMargins를 사용하는 ScrollView를, 이전 iOS 버전에서는 더 간단한 HStack을 조건부로 사용하도록 업데이트하여 다양한 OS 버전에서 적절한 레이아웃을 보장합니다.
  • 볼드체 스타일 제거: WebItemRow 및 HomeView에서 .bold() modifier를 제거하여 텍스트 스타일을 표준화하거나 디자인 변경 사항에 맞췄습니다.
  • navigationBarTitleDisplayMode(.large) 제거: TodoListView에서 이 modifier를 제거하여 레이아웃 문제를 해결하거나 새로운 내비게이션 바 동작에 맞췄습니다.
Changelog
  • DevLog/UI/Common/Component/WebItemRow.swift
    • Text(item.title)에서 .bold() modifier가 제거되었습니다.
  • DevLog/UI/Common/NavigationBarConfigurator.swift
    • NavigationBarConfigurator 구조체에 alwaysVisible 프로퍼티가 추가되었습니다.
    • alwaysVisible 파라미터를 포함하는 새로운 init 메서드가 추가되었습니다.
    • alwaysVisible이 true일 때 내비게이션 바 배경이 항상 표시되도록 scrollEdgeAppearance 설정 로직이 추가되었습니다.
    • 새로운 init 메서드에 iOS 18 이상에서는 alwaysVisible 파라미터가 없는 생성자를 사용하도록 @available 속성이 추가되었습니다.
  • DevLog/UI/Home/HomeView.swift
    • Text(todo.title)에서 .bold() modifier가 제거되었습니다.
    • Spacer() 뒤의 불필요한 빈 줄이 제거되었습니다.
  • DevLog/UI/Home/TodoListView.swift
    • .navigationBarTitleDisplayMode(.large) modifier가 제거되었습니다.
  • DevLog/UI/PushNotification/PushNotificationListView.swift
    • 알림 목록 UI가 notificationList computed property로 추출되었습니다.
    • 안전 영역 헤더 UI가 safeAreaHeader computed property로 추출되었습니다.
    • NavigationBarConfigurator에 alwaysVisible: true 파라미터가 추가되었습니다.
    • onAppear 클로저에서 headerOffset 초기화 및 isScrollTrackingEnabled 로직이 조정되었습니다.
    • headerView가 Group으로 감싸지고 iOS 버전에 따라 다른 레이아웃을 적용하도록 변경되었습니다 (iOS 18 이상에서는 ScrollView, 이전 버전에서는 HStack).
    • 헤더의 실제 내용이 headerContent computed property로 추출되었습니다.
Activity
  • 이 Pull Request에는 현재 기록된 활동이 없습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

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은 iOS 17에서 PushNotificationListView의 내비게이션 바가 inline으로 변경되지 않는 문제를 해결하고 있습니다. NavigationBarConfigurator를 수정하여 scrollEdgeAppearance를 조건부로 설정함으로써, 스크롤이 최상단에 있을 때도 내비게이션 바 배경이 유지되도록 변경한 점이 좋습니다. 전반적인 변경 사항은 훌륭하지만, PushNotificationListView 리팩토링 과정에서 iOS 18 미만 버전에 대해 수평 스크롤뷰가 제거되어 UI가 깨질 수 있는 잠재적 회귀(regression)를 발견했습니다. 또한 코드 가독성 향상을 위해 지연된 작업에 대한 주석 추가를 제안하는 의견을 남겼습니다.

Comment on lines +162 to +164
headerContent
.padding(.leading, 16)
.frame(maxWidth: .infinity, alignment: .leading)
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.

high

iOS 18 미만 버전에서 headerContentScrollView로 감싸여 있지 않아, 필터 버튼들이 많아질 경우 화면을 벗어나 보이지 않게 될 수 있습니다. 이는 이전 버전의 동작에서 벗어난 회귀(regression)로 보입니다. ScrollView로 감싸서 수평 스크롤을 지원해야 합니다.

                ScrollView(.horizontal) {
                    headerContent
                        .padding(.leading, 16)
                }
                .scrollIndicators(.never)
                .scrollDisabled(!isScrollTrackingEnabled)

Comment on lines +34 to 36
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
isScrollTrackingEnabled = true
}
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

0.3초 지연은 뷰가 나타날 때 초기 스크롤 위치가 잘못 계산되는 것을 막기 위한 것으로 보입니다. 이는 SwiftUI에서 종종 사용되는 해결책이지만, 특정 기기나 상황에서는 여전히 문제가 발생할 수 있습니다. 왜 이 지연이 필요한지에 대한 주석을 추가하여 코드의 의도를 명확히 하고, 향후 다른 개발자가 이 코드를 이해하는 데 도움을 주는 것이 좋겠습니다. 예를 들어, // 뷰 초기화 시 발생하는 불필요한 스크롤 이벤트 방지와 같은 주석을 추가할 수 있습니다.

@opficdev opficdev merged commit 5e4b22a into develop Mar 6, 2026
1 check passed
@opficdev opficdev deleted the fix/#193-navigationbar branch March 6, 2026 00:58
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.

iOS 17에서 PushNotificationListView의 내비게이션바가 inline이 안되는 현상을 해결한다

1 participant