Description
Is your feature request related to a problem?
Inability to create a user-friendly user experience while complying with a11y on narrow screens (320px).
We can't allow horzontal scrolling WCAG 2.2 SC 1.4.10, so we use responsivePopIn
for columns.
But it leads to some undesirable edge cases (see Additional Context with edge cases and screenshots).
- The table with a few rows. It leads to the Edge Case 1, a focused cell visible not fully.
- Using the prop.
adjustTableHeightOnPopIn
, but with many rows. It leads to the Edge Case 2, very long screens with double scrolls - poor UX. - The table with a few rows, using the prop.
visibleRowCountMode="Auto"
. and a conteiner with fixed height. It leads to the Edge Case 3:
1. The empty space appears below the table - poor UX (leaving empty rows doesn't acceptable).
2. The table overlap the following content on narrow screens.
Describe the solution you'd like
Add an optional prop: baseHeight
.
As I see it, the table's height is calculable to fit it into the container. And this total table's height can be compared with baseHeight
instead of the container.
The desired behavior with it:
IF: The total row height is less than baseHeight
THEN: Leave the table's height as it is.
IF: The total row height is more than baseHeight
THEN EITHER:
OR: Leave the maximum rows that could be fit in without exceeding the baseHeight and add scrolling.
OR: Leave one row only .
Describe alternatives you've considered
As alternative, adjust the row count on popIn. Ideally make it by dafault.
E.g.
A table doesn't have the popin effect. It has heignt regularHeight = rowCount * regularRowHeight
.
If the table has the popin effect, then row count will be popinRowCount = regularHeight / popinRowHeight
popinRowCount = Math.max( Math.floor( rowCount * regularRowHeight / popinRowHeight ), 1 )
a few data rows | many data rows |
---|---|
![]() |
![]() |
Additional Context
Edge case 1: the Tabel with few rows.
Focused area isn't visible fully. WCAG 2.2 SC 2.4.11.
Edge case 2: the Tabel with many rows.
Very long screens with double scrolls - poor UX.
Edge case 2: the Tabel with a few rows, wrapped into a container and visibleRowCountMode="Auto"
1: The empty space appears below the table - poor UX (leaving empty rows doesn't acceptable).
2: The table overlap the following content on narrow screens.
Organization
No response
Declaration
- I’m not disclosing any internal or sensitive information.
Metadata
Metadata
Assignees
Type
Projects
Status