mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 11:58:32 +00:00
Suggestions view design improvements (#1955)
* snapshot tests * making the padding of the composer internal * setting the max width using the line fragment * setting the max width using the line fragment * Update ElementX/Sources/Screens/ComposerToolbar/View/CompletionSuggestionView.swift Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com> * updated tests and pr suggestions * better stencil --------- Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
This commit is contained in:
@@ -42,7 +42,6 @@ struct PillView: View {
|
||||
.padding(.trailing, 6)
|
||||
.padding(.vertical, 1)
|
||||
.background { Capsule().foregroundColor(backgroundColor) }
|
||||
.frame(maxWidth: PillConstants.maxWidth)
|
||||
.onChange(of: context.viewState.displayText) { _ in
|
||||
didChangeText()
|
||||
}
|
||||
@@ -55,18 +54,23 @@ struct PillView_Previews: PreviewProvider, TestablePreview {
|
||||
static var previews: some View {
|
||||
PillView(imageProvider: mockMediaProvider,
|
||||
context: PillContext.mock(type: .loadUser(isOwn: false))) { }
|
||||
.frame(maxWidth: PillConstants.mockMaxWidth)
|
||||
.previewDisplayName("Loading")
|
||||
PillView(imageProvider: mockMediaProvider,
|
||||
context: PillContext.mock(type: .loadUser(isOwn: true))) { }
|
||||
.frame(maxWidth: PillConstants.mockMaxWidth)
|
||||
.previewDisplayName("Loading Own")
|
||||
PillView(imageProvider: mockMediaProvider,
|
||||
context: PillContext.mock(type: .loadedUser(isOwn: false))) { }
|
||||
.frame(maxWidth: PillConstants.mockMaxWidth)
|
||||
.previewDisplayName("Loaded Long")
|
||||
PillView(imageProvider: mockMediaProvider,
|
||||
context: PillContext.mock(type: .loadedUser(isOwn: true))) { }
|
||||
.frame(maxWidth: PillConstants.mockMaxWidth)
|
||||
.previewDisplayName("Loaded Long Own")
|
||||
PillView(imageProvider: mockMediaProvider,
|
||||
context: PillContext.mock(type: .allUsers)) { }
|
||||
.frame(maxWidth: PillConstants.mockMaxWidth)
|
||||
.previewDisplayName("All Users")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user