ubuntu / archive_yaru.dart

Ubuntu Yaru Flutter Theme
https://ubuntu.github.io/yaru.dart/
Mozilla Public License 2.0
335 stars 40 forks source link

Density of list tiles and tables #116

Closed Feichtmeier closed 1 year ago

Feichtmeier commented 2 years ago

https://github.com/canonical/ubuntu-desktop-installer/issues/546#issuecomment-983400339

The problem about setting it globally, even if the toolkit left a mechanism for this, is that the result might not be satisfying. First of all we could achieve the recreation of the mock-ups in the installer without it and changing it now might break widget sizes we didn't want to change. Then the buttons and all widgets really need to look everywhere the same, otherwise it is obviously totally inconsistent which would be a design nightmare.

Feichtmeier commented 2 years ago

Note: if we don't end up with different widget sizes I'm totally fine with this. We should decide on a setting that sets widget sizes one time and then is set everywhere.

Feichtmeier commented 2 years ago

@jpnurmi Checkboxes and radios will also shrink then grafik

The results might be totally random - what is the problem with setting visual densities for individual widgets? There are not so many widgets to set and I think it is manageable.

Also the current style is not so far away from mobile. Do not think about KDE or similar slim stuff when you think of the desktop, rather think GNOME or Windows11.

jpnurmi commented 2 years ago

Maybe we can make it satisfying without changing the default global visual density. There are many things to debug and research but we can take it in tiny steps. :) I have no clue how to achieve all these things or if they're even doable without sending PRs Flutter, but here's a wishlist of items that come to my mind right now:

1) buttons: use minimum size/height instead of hard-coded density 2) remove widget-specific overridden densities if there are any others - leave that API for apps 3) textfields/input decoration: reduce the default height to match buttons or make them dense? 4) data table: reduce the header and data row heights 5) list tile: the default height could be reduced here as well if possible? if not, maybe we'll just resort to dense list tiles even though it's supposed to be orthogonal to the non-dense tile's density (normal and dense list items can be mixed in the same app) 6) menu/dropdown items are also quite large - is any way to tweak that?

Feichtmeier commented 2 years ago

remove widget-specific overridden densities if there are any others - leave that API for apps

So just for my information, we can leave density untouched but then still keep the current size of buttons in all apps that use yaru.dart by changing a different property of ButtonTheme ? I am thinking of the future where maybe more ubuntu desktop apps use yaru.dart

Feichtmeier commented 2 years ago

I am also thinking that we might need a better or a second example to see every standard material widget in one place to make a proper design decision on ... let's call it "sizes" for now, because I might be confusing what properties you want to flip Ideally examples for different scenarios of apps like a wizard, master details page a gallery or some sort of software suite. There is an open PR for a better example on yaru_widgets.dart which is ofc not the same as yaru.dart in this context. Yaru.dart should stay a theme for material widgets and should work for material widgets on all devices

Feichtmeier commented 2 years ago

FIxed inputs with #131

Feichtmeier commented 1 year ago

I think this is fixed