Skip to content

[#188] Menu 내 Picker로 컴포넌트를 통일한다#194

Merged
opficdev merged 2 commits intodevelopfrom
fix/#188-checkmark
Mar 5, 2026
Merged

[#188] Menu 내 Picker로 컴포넌트를 통일한다#194
opficdev merged 2 commits intodevelopfrom
fix/#188-checkmark

Conversation

@opficdev
Copy link
Copy Markdown
Owner

@opficdev opficdev commented Mar 5, 2026

@opficdev opficdev self-assigned this Mar 5, 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!

이 풀 리퀘스트는 앱 내 메뉴 컴포넌트의 일관성을 확보하기 위해 UI 요소를 통일하는 데 중점을 둡니다. 기존에 사용자 정의 버튼과 로직으로 구현되었던 정렬, 필터, 시간 선택 메뉴를 SwiftUI의 표준 PickerToggle 컴포넌트로 대체하여 코드의 가독성과 유지보수성을 향상시키고 사용자 경험을 표준화했습니다.

Highlights

  • Hashable 프로토콜 채택: PushNotificationQuery.TimeFilter 열거형에 Hashable 프로토콜 채택을 추가했습니다.
  • UI 컴포넌트 통일: TodoListView의 정렬 및 필터 메뉴에서 사용자 정의 버튼 로직을 SwiftUI의 PickerToggle 컴포넌트로 대체하여 UI 일관성을 높였습니다.
  • 불필요한 코드 제거: TodoListView에서 더 이상 사용되지 않는 selectionLabel 헬퍼 함수를 제거했습니다.
  • 푸시 알림 목록 UI 개선: PushNotificationListView의 시간 필터 메뉴를 Picker 컴포넌트를 사용하도록 리팩토링했습니다.
Changelog
  • DevLog/Domain/Entity/PushNotificationQuery.swift
    • TimeFilter 열거형에 Hashable 프로토콜을 추가했습니다.
  • DevLog/UI/Home/TodoListView.swift
    • 정렬 및 필터 메뉴의 사용자 정의 선택 로직을 PickerToggle 컴포넌트로 변경했습니다.
    • selectionLabel 함수를 제거했습니다.
  • DevLog/UI/PushNotification/PushNotificationListView.swift
    • 푸시 알림 목록의 시간 필터 메뉴를 Picker 컴포넌트로 변경했습니다.
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은 Menu 내에서 Button과 커스텀 selectionLabel을 사용하던 부분을 SwiftUI의 표준 PickerToggle 컴포넌트로 리팩터링하여 코드를 간소화하고 일관성을 높였습니다. 전반적으로 좋은 개선이지만, 일부 Picker에서 tint 색상이 누락되어 일관성이 부족한 부분이 있어 리뷰 코멘트를 남겼습니다.

Comment on lines +357 to 366
Picker(selection: Binding(
get: { viewModel.state.query.completionFilter },
set: { viewModel.send(.setCompletionFilter($0)) }
)) {
ForEach([TodoQuery.CompletionFilter.all, .incomplete, .completed], id: \.self) { option in
Button {
viewModel.send(.setCompletionFilter(option))
} label: {
selectionLabel(
title: option.title,
isSelected: viewModel.state.query.completionFilter == option
)
}
Text(option.title).tag(option)
}
} header: {
} label: {
Text("완료 상태")
}
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

일관성을 위해 sortMenuPicker들과 마찬가지로 이 Picker에도 .tint(.blue)를 적용하는 것이 좋겠습니다. 이전 구현에서도 선택된 항목에 파란색 체크마크가 표시되었습니다.

Suggested change
Picker(selection: Binding(
get: { viewModel.state.query.completionFilter },
set: { viewModel.send(.setCompletionFilter($0)) }
)) {
ForEach([TodoQuery.CompletionFilter.all, .incomplete, .completed], id: \.self) { option in
Button {
viewModel.send(.setCompletionFilter(option))
} label: {
selectionLabel(
title: option.title,
isSelected: viewModel.state.query.completionFilter == option
)
}
Text(option.title).tag(option)
}
} header: {
} label: {
Text("완료 상태")
}
Picker(selection: Binding(
get: { viewModel.state.query.completionFilter },
set: { viewModel.send(.setCompletionFilter($0)) }
)) {
ForEach([TodoQuery.CompletionFilter.all, .incomplete, .completed], id: \.self) { option in
Text(option.title).tag(option)
}
} label: {
Text("완료 상태")
}
.tint(.blue)

Comment on lines +171 to 180
Picker(selection: Binding(
get: { viewModel.state.query.timeFilter },
set: { viewModel.send(.setTimeFilter($0)) }
)) {
ForEach(PushNotificationQuery.TimeFilter.availableOptions, id: \.self) { option in
Text(option.title).tag(option)
}
} label: {
Text("기간")
}
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

일관성을 위해 이 Picker에도 .tint(.blue)를 적용하는 것이 좋겠습니다. 이전 구현에서도 선택된 항목에 파란색 체크마크가 표시되었고, TodoListView의 다른 Picker들에도 적용되어 있습니다.

Suggested change
Picker(selection: Binding(
get: { viewModel.state.query.timeFilter },
set: { viewModel.send(.setTimeFilter($0)) }
)) {
ForEach(PushNotificationQuery.TimeFilter.availableOptions, id: \.self) { option in
Text(option.title).tag(option)
}
} label: {
Text("기간")
}
Picker(selection: Binding(
get: { viewModel.state.query.timeFilter },
set: { viewModel.send(.setTimeFilter($0)) }
)) {
ForEach(PushNotificationQuery.TimeFilter.availableOptions, id: \.self) { option in
Text(option.title).tag(option)
}
} label: {
Text("기간")
}
.tint(.blue)

@opficdev opficdev merged commit 07083e0 into develop Mar 5, 2026
1 check passed
@opficdev opficdev deleted the fix/#188-checkmark branch March 5, 2026 12:22
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 18이하에서 Menu의 체크마크 색을 파란색으로 수정한다

1 participant