canonical / vanilla-framework

From community websites to web applications, this CSS framework will help you achieve a consistent look and feel.
https://vanillaframework.io
GNU Lesser General Public License v3.0
825 stars 166 forks source link

Table expanded panel limited to one expansion per row #2958

Closed lyubomir-popov closed 3 years ago

lyubomir-popov commented 4 years ago

Pattern to amend

The current expanding table pattern assumes a table row can have only one cell that expands into a panel. We have cases where we need:

1) Multiple cells expanding into panels 2) Indication which cell the current panel belongs to 3) Resolution to what happens when the expanded panel repeats part of the information visible in the cell or row before it was expanded, as in the maas example below:

Add pattern name(s) here image image image

For consistency, the expand "trigger" should probably match the accordion expand icon, and we have separate conversations about making that a chevron instead of the current + - icons.

Visual

TBD

Context

See above

lyubomir-popov commented 4 years ago

Related proposal for the UA renewals page:

image

lyubomir-popov commented 4 years ago

Additional existing implementation to consider:

image

matthewpaulthomas commented 4 years ago

Resolution to what happens when the expanded panel repeats part of the information visible in the cell or row before it was expanded, as in the maas example below

I see two approaches. One is, as I suggested for UA, to move the info from its position in the collapsed view to its position in the expanded view:

imminent-0 imminent-1

The other is to lay out the other info, in the expanded view, in such a way that it doesn’t need to repeat the info in the collapsed view. I’d suggest that for MAAS — make expansion actually enlarge the row to reveal only other stuff, rather than opening a differently-coloured panel that shows the same info mixed in with other stuff.

bartaz commented 3 years ago

Work is continued in canonical-web-and-design/vanilla-framework#3563