Fenix: [Bug] Restore native share sheet

Created on 24 May 2019  ·  15Comments  ·  Source: mozilla-mobile/fenix

Steps to reproduce

  1. Open a webpage
  2. Attempt to share it

Expected behavior

User is presented with the contacts they're most likely to share content with.

Actual behavior

A share sheet that not only doesn't behave as the native share sheet does, it reduces features and usability in order to present two options users use a lot less than direct sharing.

Device information

  • Android device: Android 8, LG G6
  • Fenix version: 1.0.1921
Sharing feature request 🌟

Most helpful comment

A possible solution:

  1. Add an option in settings to enable the system share sheet.
  2. Enable it by default on Android Q+ devices.

All 15 comments

I'm not sure this is strictly a bug. Several apps (Google Photos) also implement a custom share sheet that doesn't get nearly as many complaints as it often ends up being quicker than the system share sheet.

The app list is alphabetical, which does not make sharing to WhatsApp enjoyable, so I agree that it needs to be changed, but is it a bug?

I understand that this has been done as the sharing sheet has been so slow on Android 9 and below, but as I am using Android 10 with the new and fast share sheet, the custom one in Fenix is just a pain.

Additionally, it seems that sharing via the menu triggers the custom share sheet, but sharing via long-press on a link brings up the system share menu.

This is working as intended but we need to re-visit the behaviour.

Can an option be added to use the system share sheet? I'd prefer that on Q.

I just stumbled across this article advocating against custom share sheets: https://www.computerworld.com/article/3282070/android-sharing.html

I feel like the article is disingenuous by stating that there's no benefit to custom share sheets. On all versions of Android before Q, custom share sheets are almost always faster. As I understand the (linked) docs, you can also add sync-ed devices (for send to firefox) to the system share sheet. Given that, I see 0 reason to prefer this custom one (at least on Q+).

A possible solution:

  1. Add an option in settings to enable the system share sheet.
  2. Enable it by default on Android Q+ devices.

CC @jonalmeida do you know if what we want to do with the share sheet with send tab etc would be possible if we used the native sheet? I wasn't sure if we had already looked into this option or if it was more about just matching mocks

I'll say I'm not an Android dev, but I think the custom share targets mentioned in the docs could be used for this?

I think it is possible to implement by using the custom chooser targets and intents as mentioned by @IndefiniteBen.

In Android Q+, Direct Share APIs have been replaced by Sharing Shortcuts API so, custom chooser targets can also act as app shortcuts and must be handled accordingly. You can read here to know more about creating and managing the dynamic app shortcuts.

Also, please check ShortcutManagerCompat in AndroidX which can handle most of the things automatically.

Hello all,

CC @jonalmeida do you know if what we want to do with the share sheet with send tab etc would be possible if we used the native sheet? I wasn't sure if we had already looked into this option or if it was more about just matching mocks

Yes, I had filed a user story/feature request for this initially to explore this option. Our current share sheet isn't complete to what we want it to be as we scoped down things for the MVP.

Regarding the custom targets and Android Q direct share, we also stepped away from that since we didn't have the control of those share targets as we wanted. e.g. for showing all our send tab devices together (not just the most shared device), showing different Sync states, etc..

We also want to show the tab/collection that is being shared on that screen which wouldn't have been able to do with the system share sheet.

The app list is alphabetical, which does not make sharing to WhatsApp enjoyable, so I agree that it needs to be changed

There is https://github.com/mozilla-mobile/fenix/issues/3726 that already tracks this behaviour and is next on my radar to fix (but patches welcome as always!).

For reference, these are the designs (UPDATED) for a visual understanding of what we're trying to accomplish, but as Vesta mentioned, we need to re-visit this behaviour so they are not final.

Thanks for the detailed info!

I agree with your decision to use the custom share sheet as we can't implement all the intended options by using the system share sheet. So, here is my updated suggestion which will cover most of the use cases:

  1. Continue developing the Mozilla custom share sheet.
  2. Add an intent (or custom intent) in system share sheet to launch Mozilla custom share sheet. It will increase it's visibility in other browsers also.
  3. Add an option in settings to enable the system share sheet.
  4. Enable it by default on Android Q+ devices (optional).

For reference, these are the designs for a visual understanding of what we're trying to accomplish, but as Vesta mentioned, we need to re-visit this behaviour so they are not final.

I can see what you're going for, but I feel this is one of those cases whereby actual use of the product and perceived idealogical use differ. As a long-term Android user, what I want is to be able to share to whatever service/contact I desire ASAP and as simply as possible. Losing direct share is a hindrance and frustrating user experience. Thus I would still implore you all to simply restore the native share sheet. It's perfectly possible to add the devices to the currently linked devices to the native share sheet and that's all that's required. Anything else is over-designing/over-engineering.

I should also add that all this talk about Android Q is for the most part meaningless to the average user. Last I checked, less than 1% of Android users are on Q. Let's not provide 99% of potential Android users are terrible user experience in the hope that we may get it right for the final 1%, of which how many are even going to install Fenix?

Here is a screenshot of the LG Gallery Share Sheet. The second row is direct shares, where you can see KDE Connect has a direct share for devices. This is what I feel Fenix should be aspiring towards.

Screenshot_2019-07-18-15-52-41

I should also add that all this talk about Android Q is for the most part meaningless to the average user. Last I checked, less than 1% of Android users are on Q. Let's not provide 99% of potential Android users are terrible user experience in the hope that we may get it right for the final 1%, of which how many are even going to install Fenix?

Whilst you have a point about the platform distribution, let's not conflate the issues; the custom share intent mentioned by me and @pranavpandey is a replacement for the direct share API and is backwards compatible, so if the Android Q sharing API is supported properly, it will also work like direct share on pre-Q devices.

Ignoring the idea of showing the tab collection when in the sharing menu (I don't want/need that) as I don't see that being possible unless sharing is changed massively again, isn't everything else possible? This blog? post reinforces my idea that custom share intents from an app are grouped together in the direct share section and the generic "Send to device" option can bring up a list of devices. Isn't this all possible? though I don't know what is meant by the sync status, except for showing you're not signed in, which could be handled by using a different custom intent that Fenix pushes when the user isn't signed in.

I agree with the point from @pwd-github that it's better to give the user an experience that is consistent between apps, such as removing the direct share targets one is used to in most other apps.

Also, @jonalmeida, your link to the design concepts doesn't show the share sheet concepts anymore.

4275 will track this instead.

Was this page helpful?
0 / 5 - 0 ratings