UICollectionView swipe actions in sidebar style are buggy

Originator:kylebshr
Number:rdar://FB12044256 Date Originated:03/08/2023
Status:Open Resolved:
Product:UIKit Product Version:16.2
Classification:Incorrect/Unexpected Behavior Reproducible:Yes
 
UICollectionView now supports swipe actions when using UICollectionLayoutListConfiguration. With the sidebar or sidebarPlain appearance, these actions take on rounded corners and have some spacing between the actions and the cell content. This is a nice touch, however, with this appearance there are some visual glitches that lead to a less than ideal user experience:

- When performing a full-width swipe to perform an action, the action collapses and disappears during the animation. This does not occur for the full-bleed layout, which nicely preserves the positioning of the action and simple collapses it (similar to UITableView). I’ve attached two videos illustrating this behavior: one where the full-width swipe performs the favorite action, and one where the delete action is cancelled.

- When destructive actions expand to full-width prior to calling the completion handler (which, I will add, is not a behavior in UITableView), the actions have an inset on the leading edge, seemingly due to the spacing between in the cell content and the actions. This is incorrect; when expanded, the actions should fill the width of the cell. See the attached image. 

There are other small differences between collection views and table views that are harder to quantify or capture on video, but feel buggier, such as the icon jumping around, and the full-width swipe confirmation behavior differences (collection views feels less snappy and sure of itself).

These may seem insignificant, but seriously affect the polish and quality of an app. We have decided not to use the sidebar style in our app due to these issues.

Sample project: https://github.com/kylebshr/UICollectionViewSwipeActions

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!