-
Notifications
You must be signed in to change notification settings - Fork 0
[#164] 스티키 헤더에서 UI가 변경될 때 사각형 모양의 배경이 생기는 현상을 해결한다 #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -359,7 +359,7 @@ | |
| "완료 상태" : { | ||
|
|
||
| }, | ||
| "완료 시점" : { | ||
| "완료일" : { | ||
|
|
||
| }, | ||
| "읽지 않음" : { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -138,8 +138,8 @@ struct TodoEditorView: View { | |
| Image(systemName: "tag") | ||
| .foregroundStyle(.gray) | ||
| } | ||
| .adaptiveButtonStyle() | ||
| } | ||
| .adaptiveButtonStyle() | ||
| DueDatePicker(selection: Binding( | ||
| get: { viewModel.state.dueDate ?? Date() }, | ||
| set: { viewModel.send(.setDueDate($0)) } | ||
|
|
@@ -161,8 +161,8 @@ struct TodoEditorView: View { | |
| viewModel.send(.setDueDate(viewModel.state.hasDueDate ? nil : Date())) | ||
| } | ||
| } | ||
| .adaptiveButtonStyle() | ||
| } | ||
|
Comment on lines
+164
to
165
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| .adaptiveButtonStyle() | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -317,11 +317,11 @@ private struct TagEditor<Content: View>: View { | |
| Image(systemName: "plus") | ||
| .font(.largeTitle) | ||
| .foregroundStyle(Color.white) | ||
| .adaptiveButtonStyle( | ||
| shape: .circle, | ||
|
Comment on lines
+320
to
+321
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| color: (!tag.isEmpty && !tags.contains(tag)) ? Color.blue : .gray.opacity(0.4) | ||
| ) | ||
| } | ||
| .adaptiveButtonStyle( | ||
| shape: .circle, | ||
| color: (!tag.isEmpty && !tags.contains(tag)) ? Color.blue : .gray.opacity(0.4) | ||
| ) | ||
| .disabled(tag.isEmpty || tags.contains(tag)) | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -207,14 +207,13 @@ struct TodoListView: View { | |||||||||||||||||||||||||||||||||||||
| Text("정렬 순서") | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
| } label: { | ||||||||||||||||||||||||||||||||||||||
| 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) | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+210
to
+216
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 조건 변수를 추출하여 코드 가독성을 높이고,
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
|
|
@@ -244,14 +243,13 @@ struct TodoListView: View { | |||||||||||||||||||||||||||||||||||||
| Text("완료 상태") | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
| } label: { | ||||||||||||||||||||||||||||||||||||||
| let condition = viewModel.state.query.isPinned == true || viewModel.state.query.completionFilter != .all | ||||||||||||||||||||||||||||||||||||||
| HStack { | ||||||||||||||||||||||||||||||||||||||
| Text("필터 옵션") | ||||||||||||||||||||||||||||||||||||||
| Image(systemName: "chevron.down") | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
| .adaptiveButtonStyle( | ||||||||||||||||||||||||||||||||||||||
| color: viewModel.state.query.isPinned == true || | ||||||||||||||||||||||||||||||||||||||
| viewModel.state.query.completionFilter != .all ? .blue : .clear | ||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||
| .foregroundStyle(condition ? .white : Color(.label)) | ||||||||||||||||||||||||||||||||||||||
| .adaptiveButtonStyle(color: condition ? .blue : .clear) | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -114,16 +114,18 @@ struct PushNotificationListView: View { | |||||||||||||||||||||||||||||
| Image(systemName: "line.3.horizontal.decrease") | ||||||||||||||||||||||||||||||
| filterBadge | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| .adaptiveButtonStyle() | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
Comment on lines
+117
to
118
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||||||||||||||||||||||
| .adaptiveButtonStyle() | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| Button { | ||||||||||||||||||||||||||||||
| viewModel.send(.toggleSortOption) | ||||||||||||||||||||||||||||||
| } label: { | ||||||||||||||||||||||||||||||
| let condition = viewModel.state.query.sortOrder == .oldest | ||||||||||||||||||||||||||||||
| Text("정렬: \(viewModel.state.query.sortOrder.title)") | ||||||||||||||||||||||||||||||
| .foregroundStyle(condition ? .white : Color(.label)) | ||||||||||||||||||||||||||||||
| .adaptiveButtonStyle(color: condition ? .blue : .clear) | ||||||||||||||||||||||||||||||
|
Comment on lines
+124
to
+127
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 조건 변수를 추출하고,
Suggested change
|
||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| .adaptiveButtonStyle(color: viewModel.state.query.sortOrder == .oldest ? .blue : .clear) | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| Menu { | ||||||||||||||||||||||||||||||
| ForEach(PushNotificationQuery.TimeFilter.availableOptions, id: \.id) { option in | ||||||||||||||||||||||||||||||
|
|
@@ -142,17 +144,23 @@ struct PushNotificationListView: View { | |||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| } label: { | ||||||||||||||||||||||||||||||
| Text("기간") | ||||||||||||||||||||||||||||||
| let condition = viewModel.state.query.timeFilter == .none | ||||||||||||||||||||||||||||||
| HStack { | ||||||||||||||||||||||||||||||
| Text("기간") | ||||||||||||||||||||||||||||||
| Image(systemName: "chevron.down") | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| .foregroundStyle(condition ? Color(.label) : .white) | ||||||||||||||||||||||||||||||
| .adaptiveButtonStyle(color: condition ? .clear : .blue) | ||||||||||||||||||||||||||||||
|
Comment on lines
+147
to
+153
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 조건 변수를 추출하고,
Suggested change
|
||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| .adaptiveButtonStyle(color: viewModel.state.query.timeFilter == .none ? .clear : .blue) | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| Button { | ||||||||||||||||||||||||||||||
| viewModel.send(.toggleUnreadOnly) | ||||||||||||||||||||||||||||||
| } label: { | ||||||||||||||||||||||||||||||
| let condition = viewModel.state.query.unreadOnly | ||||||||||||||||||||||||||||||
| Text("읽지 않음") | ||||||||||||||||||||||||||||||
| .foregroundStyle(viewModel.state.query.unreadOnly ? .white : Color(.label)) | ||||||||||||||||||||||||||||||
| .foregroundStyle(condition ? .white : Color(.label)) | ||||||||||||||||||||||||||||||
| .adaptiveButtonStyle(color: condition ? .blue : .clear) | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| .adaptiveButtonStyle(color: viewModel.state.query.unreadOnly ? .blue : .clear) | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| .scrollIndicators(.never) | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.adaptiveButtonStyle()modifier 위치를 조정하여 가독성을 높입니다.