Skip to content

Commit

Permalink
fix: 🐛 [JIRA:IOSSDKBUG-418] Fix FilterFeedbackBar layout (SAP#837)
Browse files Browse the repository at this point in the history
* fix: 🐛 [JIRA:IOSSDKBUG-418] Fix FilterFeedbackBar layout

* fix: 🐛 [JIRA:IOSSDKBUG-418] Fix FilterFeedbackBar layout

---------

Co-authored-by: dyongxu <61523257+dyongxu@users.noreply.github.com>
  • Loading branch information
hengyi-zhang and dyongxu committed Oct 28, 2024
1 parent eddec56 commit 1a845b2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct CancellableResettableDialogForm<Title: View, CancelAction: View, ResetAct
self.components.background(Color.preferredColor(.secondaryGroupedBackground))
self.applyAction
}
.frame(width: UIDevice.current.userInterfaceIdiom == .pad ? 375 : Screen.bounds.size.width)
.frame(width: UIDevice.current.userInterfaceIdiom != .phone ? 393 : nil)
.padding([.top, .bottom], UIDevice.current.userInterfaceIdiom == .pad ? 13 : 16)
.background(Color.preferredColor(.chromeSecondary))
}
Expand Down Expand Up @@ -84,7 +84,7 @@ struct CancellableResettableDialogNavigationForm<Title: View, CancelAction: View
}
}
}
.frame(width: UIDevice.current.userInterfaceIdiom == .pad ? 375 : Screen.bounds.size.width)
.frame(width: UIDevice.current.userInterfaceIdiom != .phone ? 393 : nil)
.padding([.bottom], UIDevice.current.userInterfaceIdiom == .pad ? 13 : 16)
.background(Color.preferredColor(.chromeSecondary))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ extension SearchListPickerItem: View {
.foregroundColor(.preferredColor(.tintColor))
}
}
.frame(maxWidth: .infinity)
.padding(0)
.contentShape(Rectangle())
.onTapGesture {
Expand Down Expand Up @@ -79,9 +78,7 @@ extension SearchListPickerItem: View {
}
})
.listStyle(PlainListStyle())
.frame(maxWidth: .infinity)
.frame(minWidth: UIDevice.current.userInterfaceIdiom != .phone ? 393 : nil)
.frame(height: self._height)
.scrollContentBackground(.hidden)
.padding(0)
.searchable(text: $_searchText, placement: .automatic)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ struct PickerMenuItem: View {

@State var isSheetVisible = false

@State var detentHeight: CGFloat = 0
@State var detentHeight: CGFloat = ((UIDevice.current.userInterfaceIdiom == .phone || UIDevice.current.userInterfaceIdiom == .pad) ? 88 : 0)

public init(item: Binding<SortFilterItem.PickerItem>, onUpdate: @escaping () -> Void) {
self._item = item
Expand Down Expand Up @@ -252,14 +252,14 @@ struct PickerMenuItem: View {
} selectAll: { isAll in
self.item.selectAll(isAll)
} updateSearchListPickerHeight: { height in
self.detentHeight = height + 52 + 56 + 70
self.detentHeight = height
}
.frame(maxHeight: UIDevice.current.userInterfaceIdiom != .phone ? (self.detentHeight) : nil)
.padding(0)
Spacer()
}
.frame(maxWidth: .infinity)
.frame(minWidth: UIDevice.current.userInterfaceIdiom != .phone ? 393 : nil)
.frame(height: UIDevice.current.userInterfaceIdiom != .phone ? self.detentHeight : nil)
.frame(height: UIDevice.current.userInterfaceIdiom != .phone ? self.detentHeight + 52 + 56 + 70 : nil)
.presentationDetents([.large])
}
}
Expand Down

0 comments on commit 1a845b2

Please sign in to comment.