Compact mode for new PatternFly tables

Hello all!

I have brought up this topic in in person discussions definitely a few times up to now, but never made a topic out of it.

As more and more views are getting ported/redesigned to the new PatternFly tables, I really see the need for a “Compact mode”, which reduces the padding in-between the lines.
It’s especially apparent to me comparing the old-ish / new All Hosts pages, in my eyes the usage efficiency (someone could also call it space efficiency) just goes down the river.
Yes it’s very pretty, but at what cost?
old:


new:

Most other views don’t have that many objects (normally) of course, but there are a few once which really would benefit, by decreased padding and hidden overflow (or hidden+hover) instead of word-wrap.

The tables I’m most concerned of are the once with many lines over many pages, like all hosts, repositories selection in content views, (future ->) all products, all content type pages (i.e. packages), …

All I’m asking for is a setting, to “get back” the quarter more lines in one view.

I’m very sorry if I stepped on someone’s toes with this topic, and also want to apologise for my maybe bit direct wording.

Cheers, lumarel

Feel free to enlighten me why this is not a good idea, propose other solutions, or just turn me down :slightly_smiling_face:

We are already using the compact table from PF4 (PatternFly 4 • Table)
We could go a bit against PF design guidelines and make it even with less padding with a custom class + css, example:

From a frontend engineering point of view, it shouldnt be too complicated to implement the setting (need to add in context (useForemanSettings), use context in each new table, and set the each PF4 table to be compact by that setting).

But I heard that some points against adding more user settings in the past so that might be an issue?

@MariaAga has there been any discussion on a third style, so you get normal, compact and dense as classes?

1 Like

Not that I have seen

The thing I was asking for a new setting is, because my impression was you wanted to follow the PatternFly defaults, for the default UI design of Foreman, which I totally understand, though preferably there would be another option.
It makes me think of Firefox, where at some point the default was changed to a lot of padding, but there is still the hidden, compact option :+1:

Yeah, what I meant is I personally am ok with adding a setting for that (compact/dense/spaced out), that will effect the new tables, but I remember a discussion on “having too many settings”.

1 Like

Feels more like a user preference than a setting. I also think it’s better if the preference affects all pages with the new tables rather than just the host overview, though possibly limited to just overview pages.

1 Like

That reminds me…
AWX (AAP) is just finishing up the reworked UI, which has now a Comfortable/Compact switch in the User Preferences.

Thinking of it, yes it definitely makes more sense as a User setting.