We can try switching the topic share icon action to the web share intent on supported platforms ( Chrome android for now)
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:
It’s merged and it works great on Chrome 61.
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?
It’s still there when you tap on the post’s time.
Only the share button uses the new functionality.
I would like to see this working in Chrome OS. Discourse is already a PWA, so the stars are aligning.
I would also like to be able to share things TO discourse. For example, if I were to select an image to share to Discourse, it would create a new topic with the image inserted at the top. The title of the image would then be put as the topic title.
I also know a lot of people who use Windows, so support for that platform would also be great. They want to use the native menu. It looks very clean.
The same can be said for macOS, although I’m not too sure how the implementation would work.
TL;DR: I want to be able to share files TO Discourse in all major operating systems (both mobile and desktop). Along with that, I would like to be able to share links FROM Discourse on all major desktop operating systems.
Also, does Firefox and Safari support the Web Share API? I originally thought that it was only supported in Chromium browsers.
This already works since Share to Discourse (via Android).
At the moment we implement only the V1 of the API, so only text. The V2 share target API allows uploads, but that is a bit harder to implement. #pr-welcome.
The title of that topic suggests that it only works in Android. Are there any plans to support it in other operating systems?
I don’t see that menu pop up on my device when tapping on the “share a link to this post” button.
Better ask the other operating system manufacturers.
It is only enabled on phones/tablets per
Judging by this article, it appears to be supported on both Windows and Chrome OS.
As for macOS, that appears to be supported too.
Yes, it is but we intentionally disabled it on non-mobile devices per linked commit above.
Well, may I ask why (or to be more specific, why is it “confusing” on desktop platforms)? The native share menu on all platforms seems fairly direct and understandable by the user.