On Mon, 2019-02-25 at 21:50 +0100, Marcus Lundblad wrote:
> Hi all!
> 
> I wanted to discuss some things around sharing. Currently in Maps we
> have a dialog to share locations with a fixed set of apps, Weather,
> Clocks, and the default browser. There are a couple of problems with
> this. First, detecting if Weather and Clocks are available currently
> not possible in Flatpaks (maybe there is a "portal" to detect such
> things, and also launch apps). Secondly these interact kinda poorly.
> For example sharing a location with Clocks will permanently add that
> location in Clocks with the name of the place (such as the name of a
> shop). The option for the browser (which opens the location on the
> openstreetmap.org site is somewhat more useful.
> 
> I recall there being some discussions before about a "sharing portal"
> (sharing a location might then share that as the object's URL on
> OSM).
> Is something like this already in place? (allowing sharing links with
> i.e. e-mail clients).
> 
> A sorta "stop-gap" solution I was thinking about might be to have a
> dialog with read-only text entry filled with the URL allowing to
> copy-
> paste this (I think Google Maps have something similar, using a
> shortened URL).
> 
> A companion feature for this could be to allow opening such URLs (and
> add Maps as a handler for HTTP(S) URIs). But maybe that would be
> considered bad praxis (not sure if it's possible to ensure that it
> would always have lower priority that any proper browsers). Ideally
> it
> would have cool to be able to add URI handlers for certain URL
> patterns. I brought up this at some point on IRC. But this would
> probably need quite some changes in how mime-handling is done.
> 
> For the Clocks and Weather sharing, one option might be to show local
> time, or time difference and local weather (this would probably need
> an
> on/off switch for privacy reasons) directly in the "place bubbles".
> Or
> maybe skip this, assuming the user could just look up these things
> manually in the respective apps if wanted.

Maps is probably a good application to start implementing "Sharing"
from, as it only really needs to be able to pass URLs, not actual data.

I would start with implementing separate "Sharing" buttons/menu items
for sending:
- a http(s) URL, for example, one labelled "Browser", using the
g_app_info_launch_default_for_uri()[1]
- a mail, with the name of the place in the subject line, URL in the
body, using xdg-email[2], labelled "Mail"
- a geo URI, which Clocks and Weather would be modified to handle

In the future, we would want to implement this better in the portal API
where the application developer would pass all three of the data above:
"This is for x-scheme-handler/https applications, this for x-scheme-
handle/mailto applications, this is for x-scheme-handler/geo
applications" and the portal would show an interface with all the items
in one dialogue.

And then it could be extended again to allow passing more than simply
URLs, with the data passed to other application being created on
demand.

HTH

[1]: See http://docs.flatpak.org/en/latest/portals-gtk.html
[2]: xdg-email outside the sandbox is dreadful, hopefully we can
replace that somehow

_______________________________________________
desktop-devel-list mailing list
desktop-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/desktop-devel-list

Reply via email to