New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Specify display_length requires/recommends item #286
Conversation
4d6f514
to
8a6b5b1
Compare
|
One alternative way of writing this, in case we do not care about both width/height that much, would be <display_length side="shortest" unit="cm">10</display_length>to only set constraints on the shortest/longest edge of a device's screen. This may be enough for most devices (shortest side being default if |
|
My take away from the discussion so far was: logical pixel is must have. It's currently mostly interesting for small screen sizes but might also be useful for large screens to avoid lots of unused space. Physical size + viewing distance would be important for e.g projectors and TVs but it's orthogonal to logical pixels so i'd not try to lump both into one but make them clearly separate things to make sure they don't get confused, |
|
My current theory is that logical pixel size is the only thing we need/want from an app developer point of view. I think we can assume that the system HiDPI scaling factor is such that the system is UI is a legible size. Thus, the OS has to take care of both physical size and viewing distance via scale factor, and there's no reason for app developers to care about these variables directly, or do anything different from the rest of the system. As far as I can tell this holds across all device types (including outliers like TVs and watches) and I don't think any of them are special in this regard. There are of course other differentiating factors that are relevant for app developers (e.g. remote-only input for TVs, or touch-only for phones), but I don't think physical display size is among them. I'd be happy to be proven wrong if someone has a counterexample, but so far I haven't seen any. |
Display size and distance+distance can matter if you want to know if e.g. the thumb can reach the whole screen and some other caes but i'm not trying to make a case for physical size here but the contrary. |
That's a good point. I suppose it's an input rather than a display issue though, and what you're interested in isn't just the size of the display but also the size of the entire device (and perhaps even thickness)? A 5" display can be ok to use with one hand if there are no bezels, but if there's a 1cm bezel at the top and bottom it might not be anymore. Perhaps for this a slighly more subjective "single-handed usability" metric that takes various factors into account might be better? That said: If we had this, how would this information be used by app developers? |
|
I've been thinking along the same lines: reachability would be "purer" if it was its own mode of input. Two issues: would people actually bother declaring "my application is good with a thumb only" as opposed to just setting the screen size requirements? Also, it kind of forces the admission that granular choices are acceptable: "requires multitouch", "requires a scroll control", "can be used entirely with the left thumb on landscape", "can be used keyboard only", etc. |
|
An important thing to not is that this information is not for applications, nor is it for application developers. It is information for tools like KDE Discover, GNOME Software, Cockpit, Flatpak, etc. provided by applications for filtering components and informing users as well as making automated decisions. @bertob 's argument for logical pixels makes sense to me, even though this can be flipped around as well: You can expect the device to make the texts and UI elements readable for its logical pixel size, but you can also expect the same when you request a physical length in mm. I made the display's physical size the default mode, because it fits the purpose of limiting apps to formfactors better than a logical pixel size, which is configuration dependent. But I do not feel very strongly about that. By going for logical pixels, as soon as you reduce your resolution, your screen becomes "small" for the software center and it will therefore reveal apps that are only designed for smaller screens. While if you increase the resolution on a tiny screen, desktop apps will show up because the screen is now "larger" (even though all UI elements are tiny now). I think that's not a very likely scenario, in the majority of cases systems will be configured well, but the very fact that by using logical pixels you will check for a device+configuration rather than just checking for physical device limits is something I do not like that much. One important thing to remember is that @agx I wouldn't throw viewing distance into the mix unless some actual usecases come up for that. Currently I think if the screen is large enough, a larger viewing distance can be assumed and that's "good enough". This property in AppStream is not supposed to give any precise measurement like a phone shell would do, neither to provide any information relevant for drawing the app's UI. Its purpose is solely to allow filtering apps by screen sizes they are designed for, so Libre Office will require a Tablet-Laptop-sized screen, phone apps will require a small screen and adaptive apps will not use this property at all and just run on any screen size (and they will only set the |
|
@ximion i only brought up viewing distance since for e.g. projectors the physical |
The problem is that it doesn't guarantee anything concrete with regard to whether an app will actually work on your display in the current configuration, which is the entire point of filtering apps in app stores, making it kind of useless for our purposes. The exact number of logical pixels an app scales down to is easily measured, but I really don't think we want app developers physically measuring their phones and putting that in metadata... If you increase/decrease the resolution/scale factor on a device that impacts which apps fit the screen, so it makes sense that this changes what's available in Software. I get your point about device properties vs. configuration, but in practice the scale factor is basically part of device properties here, because there's generally only one good option (e.g. 2x on the Librem 5) and the device is unusable if you misconfigure it. The idea with adaptive design is precisely that it doesn't matter whether you're running an app on a phone, desktop, TV, etc. as long as it fits the screen and supports the relevant input methods. As far as I can tell bringing physical sizes into this doesn't give us anything for displays (though it might be relevant for input). |
That depends on what you actually really want to test for - the device, or the configuration.
Yes - fortunately the input part is already handled by a different property, so we don't need to worry about it :-) |
8a6b5b1
to
960e7c0
Compare
|
Here is a new revision with (most?) feedback incorporated. I originally wanted to defer adding the mm unit type, but given that both Qt and GTK+ have easy API for that and it's simple to implement and test, we can just add it now. |
docs/xml/metainfo-component.xml
Outdated
| <term><display_length/></term> | ||
| <listitem> | ||
| <para> | ||
| Set a relation to the display length defined as an integer value in either <emphasis>millimeters</emphasis> or <emphasis>logical pixels</emphasis> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not sure what the potential use cases for millimeters are, so unless there's something else I'm missing I'd stick to having logical pixels only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's mimicking the existing Qt and GTK+ APIs as well as future-proofing the design (some adaptive apps may care more about the form factor than the drawing distance).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which GTK APIs? GdkMonitor etc? Not sure what an app would use them for tbh, other than misusing them like in https://github.com/stdmedoth/simplenav/blob/dcfe229abcb1a6e31321407ae8855b8ad4c74fc7/src/init.c#L18-L20 (set_size_request() works with logical pixels)
|
If there's no further comment, I would move forward to implementing the current draft, only removing the |
960e7c0
to
7ec2df8
Compare
|
I've reduced the scope of the initial Please note that the |
This change adds specification text to allow applications to require a minimum display width and/or height in order to be installed or run with recommended settings.
This change would address #285
CC: @hughsie @Apol @hadess @Exalm