[#164] 스티키 헤더에서 UI가 변경될 때 사각형 모양의 배경이 생기는 현상을 해결한다#168
Conversation
opficdev
commented
Mar 3, 2026
- closed 스티키 헤더의 adaptiveButtonStyle이 Menu의 Label로 쓰일 때 사각형 뒷배경이 생기는 이슈를 해결한다 #164
Summary of ChangesHello, 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는 스티키 헤더에서 UI가 변경될 때 발생하던 불필요한 사각형 배경 문제를 해결하기 위해 여러 UI 컴포넌트의 스타일 적용 방식을 개선합니다. 특히, Highlights
Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request primarily focuses on UI/UX improvements and code readability. It includes a minor localization change in Localizable.xcstrings, updating "완료 시점" to "완료일". The main changes involve refactoring how .adaptiveButtonStyle() and .foregroundStyle() modifiers are applied across several UI components. Specifically, .adaptiveButtonStyle() is moved to be applied directly to the content within button labels in TodoEditorView.swift and PushNotificationListView.swift for improved readability. In TodoInfoSheetView.swift, .foregroundStyle(.white) is moved to apply to an entire HStack. Furthermore, in TodoListView.swift and PushNotificationListView.swift, conditional logic for button styling (color and foreground style) is enhanced by introducing condition variables, which improves readability and ensures correct UI feedback for active filters and sort options. The review comments reinforce these changes, emphasizing the improved readability by adjusting modifier positions and the enhanced UI/UX through conditional styling and variable extraction.
Note: Security Review is unavailable for this PR.
| .adaptiveButtonStyle() | ||
| } |
| .adaptiveButtonStyle() | ||
| } |
| .adaptiveButtonStyle( | ||
| shape: .circle, |
| let condition = viewModel.state.query.sortTarget == .createdAt && viewModel.state.query.sortOrder == .latest | ||
| HStack { | ||
| Text("정렬: \(viewModel.state.query.sortTarget.title) / \(viewModel.state.query.sortOrder.title)") | ||
| Image(systemName: "chevron.down") | ||
| } | ||
| .adaptiveButtonStyle( | ||
| color: viewModel.state.query.sortTarget == .createdAt && | ||
| viewModel.state.query.sortOrder == .latest ? .clear : .blue | ||
| ) | ||
| .foregroundStyle(condition ? Color(.label) : .white) | ||
| .adaptiveButtonStyle(color: condition ? .clear : .blue) |
There was a problem hiding this comment.
조건 변수를 추출하여 코드 가독성을 높이고, .foregroundStyle modifier를 추가하여 UI를 개선합니다.
| let condition = viewModel.state.query.sortTarget == .createdAt && viewModel.state.query.sortOrder == .latest | |
| HStack { | |
| Text("정렬: \(viewModel.state.query.sortTarget.title) / \(viewModel.state.query.sortOrder.title)") | |
| Image(systemName: "chevron.down") | |
| } | |
| .adaptiveButtonStyle( | |
| color: viewModel.state.query.sortTarget == .createdAt && | |
| viewModel.state.query.sortOrder == .latest ? .clear : .blue | |
| ) | |
| .foregroundStyle(condition ? Color(.label) : .white) | |
| .adaptiveButtonStyle(color: condition ? .clear : .blue) | |
| let condition = viewModel.state.query.sortTarget == .createdAt && viewModel.state.query.sortOrder == .latest | |
| HStack { | |
| Text("정렬: \(viewModel.state.query.sortTarget.title) / \(viewModel.state.query.sortOrder.title))") | |
| Image(systemName: "chevron.down") | |
| } | |
| .foregroundStyle(condition ? Color(.label) : .white) | |
| .adaptiveButtonStyle(color: condition ? .clear : .blue) |
| .adaptiveButtonStyle() | ||
| } |
| let condition = viewModel.state.query.sortOrder == .oldest | ||
| Text("정렬: \(viewModel.state.query.sortOrder.title)") | ||
| .foregroundStyle(condition ? .white : Color(.label)) | ||
| .adaptiveButtonStyle(color: condition ? .blue : .clear) |
There was a problem hiding this comment.
조건 변수를 추출하고, .foregroundStyle modifier를 추가하여 UI를 개선합니다.
| let condition = viewModel.state.query.sortOrder == .oldest | |
| Text("정렬: \(viewModel.state.query.sortOrder.title)") | |
| .foregroundStyle(condition ? .white : Color(.label)) | |
| .adaptiveButtonStyle(color: condition ? .blue : .clear) | |
| let condition = viewModel.state.query.sortOrder == .oldest | |
| Text("정렬: \(viewModel.state.query.sortOrder.title))") | |
| .foregroundStyle(condition ? .white : Color(.label)) | |
| .adaptiveButtonStyle(color: condition ? .blue : .clear) |
| let condition = viewModel.state.query.timeFilter == .none | ||
| HStack { | ||
| Text("기간") | ||
| Image(systemName: "chevron.down") | ||
| } | ||
| .foregroundStyle(condition ? Color(.label) : .white) | ||
| .adaptiveButtonStyle(color: condition ? .clear : .blue) |
There was a problem hiding this comment.
조건 변수를 추출하고, HStack을 사용하여 UI를 개선합니다.
| let condition = viewModel.state.query.timeFilter == .none | |
| HStack { | |
| Text("기간") | |
| Image(systemName: "chevron.down") | |
| } | |
| .foregroundStyle(condition ? Color(.label) : .white) | |
| .adaptiveButtonStyle(color: condition ? .clear : .blue) | |
| let condition = viewModel.state.query.timeFilter == .none | |
| HStack { | |
| Text("기간") | |
| Image(systemName: "chevron.down") | |
| } | |
| .foregroundStyle(condition ? Color(.label) : .white) | |
| .adaptiveButtonStyle(color: condition ? .clear : .blue) |