Specifying sensible device types to use an application on in the desktop file

Bastien Nocera hadess at hadess.net
Wed Oct 21 10:11:39 UTC 2020


On Sun, 2020-10-18 at 15:08 +0200, Guido Günther wrote:
> Hi Bastien,
> On Thu, Oct 15, 2020 at 02:40:50PM +0200, Bastien Nocera wrote:
> > On Fri, 2020-10-09 at 17:55 +0200, Guido Günther wrote:
> > > Hi,
> > > On Fri, Oct 09, 2020 at 05:08:10PM +0200, piegames wrote:
> > > > So the main motivation for this is to *hide elements* from the
> > > > menu? As
> > > > in, if I unplug the keyboard I cannot find some apps in the
> > > > launcher
> > > > any more? That sounds arbitrary and frustrating IMO. But I
> > > > don't
> > > > really
> > > > understand the point of this feature. What will it bring to the
> > > > users?
> > > 
> > > Not necessarily hiding permanently but rather sorting or showing
> > > with
> > > proper priority (e.g. on search).
> > > 
> > > E.g There's no point in having kicad, gimp, libreoffice,
> > > inkscape,
> > > freecad, gnumeric, ... in a prominent place on a phone when no
> > > large
> > > screen is attached. It's busywork for the user to have them sort
> > > that
> > > out
> > > by arranging apps manually when the shell can sort applications
> > > properly
> > > into a 'fits the current device mode' and 'all apps' tabs.
> > 
> > I don't see how this would be implemented. Right now, it's unclear
> > what
> > makes a phone, which peripherals need to be plugged in and enabled
> > to
> > make it not a phone anymore. Is a tablet with a keyboard a laptop?
> > Is a
> > large phone with a keyboard a laptop? Is a small tablet with a
> > mouse a
> > laptop?
> 
> If we go by device types (rather than specifying screen resolution
> and
> required/supported input hardware) we'd need clear definitions for
> all
> device types (as mentioned in
> https://lists.freedesktop.org/archives/xdg/2020-October/014404.html)
> 
> > I think that if the user installs KiCad, LibreOffice, or VSCode on
> > a
> > phone, they'll likely put it somewhere in the launchers where it
> > doesn't get in the way of their normal usage.
> 
> Given the amount of application that is not something i would like to
> do
> manually for all applications. I could imagine doing something like:
> `Adpaptive=phone;desktop;` as a *hint* to the shell/lanuncher/desktop
> environment so it can build different tabs/drawers per device type
> and
> order them accordingly based on detected hardware while what is in
> the
> appstream metadata is the detailed set of requirements.

I still think that those hints are too imprecise, which might mean that
shells can't implement it as you would expect.

Put it another way:
- KiCad, or inkscape can definitely be used on a tiny phone screen, but
require precise control. Do you expect app organisation to change based
on the availability of a mouse, pen or trackball?
- Which physical and pixel dimensions do you expect to be the boundary
between device types? How do you expect developers to be able to tell
whether their apps work on a particular type of device?

(Note that I didn't touch upon the fact that appstream and/or Flathub
have some requirements for screenshots and some other metadata that
make it unsuitable for mostly vertical phone/tablet apps)

I still think that adding specifics of hardware into the way the
applications advertise themselves is too narrow, too restrictive, and
too difficult to get wrong on the shell side of things.

I think that it might be better to augment the .desktop file with more
specific metadata, eg.
- whether an app needs precise pointer control (that would account for
touchscreen usage, as well as filtering/sorting for a11y purposes),
- whether an app is usable on a physically tiny or very large screen
and which types (from watch to ultra wide desktop monitors),
- whether an app is usable on a screen with tiny resolution (eg. usable
on a CRT, or a low-resolution phone)

I think that's more forward compatible than tagging apps today, with a
spec that refers to ever changing hardware.

Even those are complicated to pin down exactly.

I think that, to go back to the original post in the discussion, it
would be good for you to list a bunch of different apps of different
styles, and explain why you think each one would filtered, and would
appear on different devices.

Cheers



More information about the xdg mailing list