Introducing the Web Share API | Web | Google Developers

We can try switching the topic share icon action to the web share intent on supported platforms ( Chrome android for now)

19 Mi Piace

Ok, did a quick try at this while I was in the plane and after some cleaning up sent a pull request.

Here is it in action:

16 Mi Piace

This only happens on Android yes? Seems fairly safe to me then. @gerhard can you review?

1 Mi Piace

It’s merged and it works great on Chrome 61. :+1:

8 Mi Piace

I don’t have an android device to test, but I’m assuming this means users no longer have access to the “reply as linked topic” button that is normally next to the share buttons?

Can this functionality be put elsewhere? Or is there any way to add a custom button to the native share sheet?

11 Mi Piace

It’s still there when you tap on the post’s time.

Only the share button uses the new functionality.

13 Mi Piace

It works on iOS 12.2 :tada:

11 Mi Piace

Mi piacerebbe vederlo funzionare su Chrome OS. Discourse è già una PWA, quindi le stelle si stanno allineando.

Mi piacerebbe anche poter condividere contenuti SU Discourse. Ad esempio, se selezionassi un’immagine da condividere su Discourse, verrebbe creato un nuovo argomento con l’immagine inserita in cima. Il titolo dell’immagine verrebbe poi utilizzato come titolo dell’argomento.

So anche che molte persone usano Windows, quindi il supporto per quella piattaforma sarebbe ottimo. Vogliono utilizzare il menu nativo. Sembra molto pulito.

Lo stesso vale per macOS, anche se non sono sicuro di come funzionerebbe l’implementazione.

TL;DR: Voglio poter condividere file SU Discourse su tutti i principali sistemi operativi (sia mobili che desktop). Inoltre, vorrei poter condividere link DA Discourse su tutti i principali sistemi operativi desktop. :slight_smile:

Inoltre, Firefox e Safari supportano la Web Share API? Inizialmente pensavo che fosse supportata solo nei browser Chromium.

Questo funziona già da Condividi su Discourse (tramite Android).

Al momento implementiamo solo la versione V1 dell’API, quindi solo testo. L’API di destinazione per la condivisione V2 consente il caricamento di file, ma è un po’ più complessa da implementare. pr-welcome.

3 Mi Piace

È ancora troppo presto per abilitare questa funzionalità su dispositivi non mobili. Ecco alcuni esempi:

  • Non funzionerà su Chrome se non stai utilizzando Windows o Chrome OS.
  • Non funzionerà su Edge a meno che tu non stia utilizzando Windows.
  • Non funzionerà su Firefox, indipendentemente dal sistema operativo che usi.

"web share" | Can I use... Support tables for HTML5, CSS3, etc

Non vedo queste problematiche risolversi a breve.

6 Mi Piace

Perché non usare la scheda di condivisione nativa di Discourse come fallback se un browser non supporta la Web Share API?

Ah, e la Web Share API è ancora rotta su iOS 14. :slightly_frowning_face: