sonnyp / Junction

Application/browser chooser
https://flathub.org/apps/re.sonny.Junction
GNU General Public License v3.0
467 stars 29 forks source link

[Enhancement] Provide a more friendly UI when no apps are available #31

Closed rohmishra closed 2 years ago

rohmishra commented 2 years ago

I just got this while trying to open a flatpakref. I dont know why it didnt detect and show gnome-software but this brought up this interesting edge case where no apps are available to display/open requested file.

Ideally, we should have a better UI to handle this edge case and either:

  1. Allow you to select an app anyways from all apps list.
  2. Show more informative UI describing that no apps support handling selected file possibly with a nice image to appear more friendly and not scare/confuse users.

image

sonnyp commented 2 years ago

Relevant art from GNOME

Screenshot from 2021-11-30 22-14-42

The "Find New Applications" opens GNOME Software in search mode for the mime type.

I'm not very inspired for design/UI, I'm tempted to just use this window for now.

rohmishra commented 2 years ago

So would linking to the select app window be more preferable or just trying to open Software center/Gui app manager if nothing is found?

sonnyp commented 2 years ago

First.

It's also an option I want to offer ("View All") even if Junction finds applications.

sonnyp commented 2 years ago

https://user-images.githubusercontent.com/19673/144141373-f16e9d10-864a-4e4f-9a55-f11843ac681e.mp4

If there are no recommended applications available - I'll simply show this last option wit the tree dots.

sonnyp commented 2 years ago

I have merged the "View All" button https://github.com/sonnyp/Junction/commit/8ff39a4eee7db55f6291912ce72d040669a43d76

The reason Junction doesn't offer GNOME Software for .flatpakref files is because

/usr/share/applications/gnome-software-local-file.desktop has NoDisplay=true

Here is what the freedesktop spec has to say

NoDisplay means "this application exists, but don't display it in the menus". This can be useful to e.g. associate this application with MIME types, so that it gets launched from a file manager (or other apps), without having a menu entry for it (there are tons of good reasons for this, including e.g. the netscape -remote, or kfmclient openURL kind of stuff).

It's tricky - Junction can be considered both a menu and a resource opener. I guess it's more of the former so I will revert this behavior.

Junction will probably start offering things that make little to no sense thought - let's see.

sonnyp commented 2 years ago

Junction now offers hidden options as well https://github.com/sonnyp/Junction/commit/e1a1cc0132cdcc284a73060e8873d671d98b4491

![Uploading Screenshot from 2021-12-01 20-59-42.png…]()