Closed tkgka closed 2 months ago
Same problem as one of the other PR for me, really too bad the content is cut when the row is not swipped
Same problem as one of the other PR for me, really too bad the content is cut when the row is not swipped
what if remove padding from the content or add cornerRadius for the section?
Same problem as one of the other PR for me, really too bad the content is cut when the row is not swipped
what if remove padding from the content or add cornerRadius for the section?
Worth to try
@Dimillian which one do you prefer
https://github.com/Dimillian/IceCubesApp/assets/52348220/90148aa4-541c-44a8-b90f-1c6ac99a897b
Group {
if attachments.count == 1 {
FeaturedImagePreView(
attachment: attachments[0],
maxSize: imageMaxHeight == 300
? nil
: CGSize(width: imageMaxHeight, height: imageMaxHeight),
sensitive: sensitive
)
.accessibilityElement(children: .ignore)
.accessibilityLabel(Self.accessibilityLabel(for: attachments[0]))
.accessibilityAddTraits([.isButton, .isImage])
.onTapGesture { tabAction(for: 0) }
} else {
ScrollView(.horizontal, showsIndicators: showsScrollIndicators) {
HStack {
ForEach(attachments) { attachment in
makeAttachmentView(attachment)
}
}
.padding(.bottom, scrollBottomPadding)
}
}
}
.cornerRadius(8.0) // added
}
https://github.com/Dimillian/IceCubesApp/assets/52348220/7a0accd9-f472-4afd-ac12-45a9255898f5
Group {
if attachments.count == 1 {
FeaturedImagePreView(
attachment: attachments[0],
maxSize: imageMaxHeight == 300
? nil
: CGSize(width: imageMaxHeight, height: imageMaxHeight),
sensitive: sensitive
)
.accessibilityElement(children: .ignore)
.accessibilityLabel(Self.accessibilityLabel(for: attachments[0]))
.accessibilityAddTraits([.isButton, .isImage])
.onTapGesture { tabAction(for: 0) }
} else {
ScrollView(.horizontal, showsIndicators: showsScrollIndicators) {
HStack {
ForEach(attachments) { attachment in
makeAttachmentView(attachment)
}
}
.padding(.bottom, scrollBottomPadding)
}
}
}
.padding(.horizontal, -1 * .layoutPadding) // added
}
Unfortunately, both of them have an issue: the one without the padding is too close to the edge. Not sure we can properly fix it without altering the visual too much...
I mean I prefer the bug on swipe to the visual downgrade on every carrousel.
it can simply fix by add padding on the HStack
Group {
if attachments.count == 1 {
FeaturedImagePreView(
attachment: attachments[0],
maxSize: imageMaxHeight == 300
? nil
: CGSize(width: imageMaxHeight, height: imageMaxHeight),
sensitive: sensitive
)
.padding(.horizontal, .layoutPadding) // added
.accessibilityElement(children: .ignore)
.accessibilityLabel(Self.accessibilityLabel(for: attachments[0]))
.accessibilityAddTraits([.isButton, .isImage])
.onTapGesture { tabAction(for: 0) }
} else {
ScrollView(.horizontal, showsIndicators: showsScrollIndicators) {
HStack {
ForEach(attachments) { attachment in
makeAttachmentView(attachment)
}
}
.padding(.bottom, scrollBottomPadding)
.padding(.horizontal, .layoutPadding) // added
}
}
}
.padding(.horizontal, -1 * .layoutPadding) // added
https://github.com/Dimillian/IceCubesApp/assets/52348220/d9f7d41d-8a5b-4f90-97a6-e71dbc2d0263
🚀 let's go with this!
@Dimillian made a commit for that :)
Fix issue that StatusRowContentView invade SwipeActions area Issue Bug: Swipe actions are overlapped with images #1845
before:
https://github.com/Dimillian/IceCubesApp/assets/52348220/45702f05-b831-4274-a181-fa9ad178376c
after:
https://github.com/Dimillian/IceCubesApp/assets/52348220/38eb9ac3-eaf3-409c-9b44-968163daf28a