elementary / portals

Home Page:https://elementary.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Granite.ActionSheet

danirabbit opened this issue · comments

with app sandboxing, we have a couple of problems to keep in mind for the near future:

  • Apps will lose access to seeing which other apps are installed. This means "Open in" submenus will no longer be possible.
  • Apps will lose access to contractor. This means no "Other Actions" sub menu either.

I'd like to propose that in preparation for this, we create a Granite.ActionSheet as a protoype for an eventual portal implementation.

This should be a kind of universal dialog that gives the user options for opening a file in another application or taking action upon it via contractor actions.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Prior art in iPadOS 13:

iOS-13-Photos-share-items-003

Android 10:

android-10-sharesheet

I think this could be a useful pattern for a more "sharing" UI, but it feels extremely heavy-weight UI-wise to replace an open-in context menu. So I'm not sure how I feel about it there, i.e. in a context menu in Code or Files to quickly pop a file open in another app.

Wouldn't it still be possible to provide this data over DBus or something to a menu so the app could display it how it wants?

@cassidyjames not really in a way that couldn't be abused. You could as an app developer just throw text/plain at the API and get a list of installed apps and send it over the network and never do anything with it in the UI

@danrabbit lol apparently within the past two years I came around to this idea. 😅 Yeah this makes sense, especially thinking about how we have the AppChooser portal but could use something more specifically for a “sharing” sort of context.

Transferring to Portals since we're already in the flatpak sandbox future

Would be nice to have a contractor-like system cross-desktop btw :)

For Reference: There is #49 which is related to this.

Yeah sorry, this should be closed as a duplicate of #49

@Exalm yeah, I started a conversation at LAS a couple years ago about extending the .desktop spec to include actions which take a file as an argument and it seemed like nobody was opposed. It just needs someone to sit down and work on it. But I think that would probably be the smoothest replacement