mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.15k stars 2.91k forks source link

iPad - Missing cancel option when tapping trashcan #19856

Closed dragosb01 closed 4 months ago

dragosb01 commented 5 months ago

Steps to reproduce

Issue added to determine if the missing cancel option on iPad is intended or not. Add multiple tabs and tap the trashcan. Only Close all tabs option pops-up. On iPhone there is also a cancel option available. Attachments:

┆Issue is synchronized with this Jira Task

data-sync-user commented 5 months ago

➤ Alexandru Farcasanu commented:

Dragos Bigu

I investigated this and from the code perspective, there are no differences between the iPhones and iPads.

!Screenshot 2024-04-23 at 16.02.13.png|width=693,height=62,alt="Screenshot 2024-04-23 at 16.02.13.png"!

Because the style of the cancel button is .cancel (and not for example .default or .destructive), this behaviour is as expected for the iPads because users can tap outside the popup and easily close it.

cc: Norberto Andres Furlan but also I think we need here the UX team confirmation…

data-sync-user commented 5 months ago

➤ Norberto Andres Furlan commented:

Apple recommends no to include this button in iPad. Please see link ( https://developer.apple.com/documentation/uikit/uiactionsheet ). “When presenting an action sheet on an iPad, there are times when you shouldn't include a cancel button. If you're presenting just the action sheet, the system displays the action sheet inside a popover without using an animation. Because taps outside the popover dismiss the action sheet without selecting an item, this results in a default way to cancel the sheet. Including a cancel button would therefore only cause confusion. However, if you have an existing popover and are displaying an action sheet on top of other content using an animation, a cancel button is still appropriate. For more information, see iOS Human Interface Guidelines."

[+Popovers | Apple Developer Documentation+|https://developer.apple.com/design/human-interface-guidelines/popovers]

”Use a Close button for confirmation and guidance only. A Close button, including Cancel or Done, is worth including if it provides clarity, like exiting with or without saving changes. Otherwise, a popover generally closes when people click or tap outside its bounds or select an item in the popover. If multiple selections are possible, make sure the popover remains open until people explicitly dismiss it or they click or tap outside its bounds”

I would follow this guidelines. I don’t think it is necessary.

Michael Verdi what do you think?

Verdi commented 5 months ago

@afurlan-firefox Agreed, nothing to change here. We can leave it as is.

dragosb01 commented 4 months ago

Closing ticket based on the comments above.