Skip to content

Commit

Permalink
fix: 🐛 [IOSSDKBUG-454]FilterFeedbackBar dark mode design (#891)
Browse files Browse the repository at this point in the history
  • Loading branch information
restaurantt authored Nov 19, 2024
1 parent 23484cb commit 4d21c78
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
31 changes: 15 additions & 16 deletions Sources/FioriSwiftUICore/Components/CancellableResettableForm.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,20 @@ struct CancellableResettableDialogNavigationForm<Title: View, CancelAction: View
}

var body: some View {
let isNotIphone = UIDevice.current.userInterfaceIdiom != .phone
NavigationStack {
VStack(spacing: UIDevice.current.userInterfaceIdiom != .phone ? 8 : 16) {
#if !os(visionOS)
self.components.background(Color.preferredColor(.secondaryGroupedBackground))
#else
self.components.background(Color.clear)
#endif
self.applyAction
.accessibilityIdentifier("Apply")
ZStack {
Color.preferredColor(.chromeSecondary)
.ignoresSafeArea()
VStack(spacing: isNotIphone ? 8 : 16) {
self.components

VStack(spacing: 0) {
self.applyAction
.accessibilityIdentifier("Apply")
Spacer().frame(height: isNotIphone ? 13 : 16)
}
}
}
.navigationBarTitleDisplayMode(.inline)
.toolbar {
Expand All @@ -100,12 +105,6 @@ struct CancellableResettableDialogNavigationForm<Title: View, CancelAction: View
}
}
}
.padding([.bottom], UIDevice.current.userInterfaceIdiom != .phone ? 13 : 16)
#if !os(visionOS)
.background(Color.preferredColor(.chromeSecondary))
#else
.background(Color.clear)
#endif
}
}

Expand All @@ -120,7 +119,7 @@ struct ApplyButtonStyle: PrimitiveButtonStyle {
Screen.bounds.size.width - 16 * 2)
.padding([.top, .bottom], 8)
.font(.body)
.fontWeight(.bold)
.fontWeight(.semibold)
#if !os(visionOS)
.foregroundStyle(Color.preferredColor(.base2))
.background(RoundedRectangle(cornerRadius: 8).fill(Color.preferredColor(.tintColor)))
Expand All @@ -139,7 +138,7 @@ struct ApplyButtonStyle: PrimitiveButtonStyle {
Screen.bounds.size.width - 16 * 2)
.padding([.top, .bottom], 8)
.font(.body)
.fontWeight(.bold)
.fontWeight(.semibold)
#if !os(visionOS)
.foregroundStyle(Color.preferredColor(.grey1))
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ extension SearchListPickerItem: View {
_onTap?(index)
}
}

.listRowBackground(Color.preferredColor(.chromeSecondary))

Rectangle().fill(Color.preferredColor(.primaryGroupedBackground))
.frame(height: 30)
.listRowInsets(EdgeInsets())
Expand Down Expand Up @@ -72,6 +73,7 @@ extension SearchListPickerItem: View {
_onTap?(index)
}
}
.listRowBackground(Color.preferredColor(.chromeSecondary))
}
}
.modifier(FioriIntrospectModifier<UIScrollView> { scrollView in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ extension SortFilterView: View {
}
#if !os(visionOS)
.frame(minWidth: UIDevice.current.userInterfaceIdiom != .phone ? 393.0 : nil)
.background(Color.preferredColor(.chromeSecondary))
#else
.frame(minWidth: 480.0)
.background(Color.clear)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ extension _SortFilterCFGItemContainer: View {
.padding([.leading, .trailing], UIDevice.current.userInterfaceIdiom != .phone ? 13 : 16)
.frame(width: UIDevice.current.userInterfaceIdiom != .phone ? self.popoverWidth : nil)
}
} footer: {
Rectangle().fill(Color.preferredColor(.primaryGroupedBackground))
.frame(height: 30)
.listRowInsets(EdgeInsets())
}
.listSectionSeparator(.hidden, edges: .all)
.listRowInsets(EdgeInsets())
Expand All @@ -53,6 +54,8 @@ extension _SortFilterCFGItemContainer: View {
.frame(width: UIDevice.current.userInterfaceIdiom != .phone ? self.popoverWidth : nil)
.frame(height: self.height)
.background(Color.preferredColor(.secondaryGroupedBackground))
.environment(\.defaultMinListRowHeight, 0)
.environment(\.defaultMinListHeaderHeight, 0)
.modifier(FioriIntrospectModifier<UIScrollView> { scrollView in
DispatchQueue.main.async {
let popverHeight = Screen.bounds.size.height
Expand Down

0 comments on commit 4d21c78

Please sign in to comment.