red-hat-design-system icon indicating copy to clipboard operation
red-hat-design-system copied to clipboard

[bug] `rh-table` no data-label

Open zeroedin opened this issue 1 year ago • 5 comments

<rh-table> when no [data-label]'s are present on headers and columns, the table should still present itself in a manner that is still visually logical/readable.

Also to note after a discussion with @LyndseyR data-label will not get translated via the XML for RHDC. Because we use these labels as visual output to the user, on translations they would show as english counterparts which also isn't ideal. A special translation case maybe able to be made here, but this also might be a good reason to look at alternatives.

zeroedin avatar Dec 20 '23 17:12 zeroedin

Alternatives?

  • https://codepen.io/smashingmag/pen/bGKBNNr
  • https://codepen.io/smashingmag/pen/xxzRxBB

zeroedin avatar Dec 20 '23 17:12 zeroedin

Can you provide an example of what happens with and without the data-labels being present? I am trying to see a difference in our local table files with the data-labels being removed but not noticing anything so I'm not sure what I'm missing.

brianferry avatar Jan 02 '24 14:01 brianferry

https://codepen.io/zeroedin/pen/YzgyOMr

*Edited there was a typo in the url above previously

zeroedin avatar Jan 02 '24 15:01 zeroedin

Here is a page example that does not have data labels. https://www.redhat.com/en/about/social. So when viewing on smaller viewport can see it's no longer a great visual experience as there is no table heading and the alignment is off for the table cells

LyndseyR avatar Jan 09 '24 21:01 LyndseyR

Would it be possible to have the web component automatically set the data-attribute based on values within a <th>? In that way you wouldn't have to count on a user manually setting them.

zhawkins avatar Jan 09 '24 21:01 zhawkins