You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[EuiInMemoryTable] Use the .euiTableRow-isSelectable className to indicate state #7515
Describe the bug
The EuiInMemoryTable assigns the euiTableRow-isSelectable class to non-selectable rows.
Impact and severity
The impact is largely felt when writing automated tests. For example, this routine in Kibana's functional test code is no longer accurate since isSelectable is being applied to all rows. I don't think this is high impact since the test can always examine the checkboxes themselves.
I definitely see what you're seeing, but just to clarify, are you saying this was the case and broke at some point in EUI history? From what I'm seeing in the source code, it looks like this always the way EuiInMemoryTable and EuiBasicTable has behaved.
* Indicates if the table has a single column of checkboxes for selecting
* rows (affects mobile only)
*/
isSelectable?: boolean;
helps shed some light on this - it looks like the .euiTableRow-isSelectable class is really mostly there for mobile styling and isn't intended to indicate state. So it's just named somewhat poorly 🥲
We can definitely consider revisiting this during EuiTable's Emotion conversion - we won't need the className for CSS at that point and can re-appropriate it as a state indicator.
@cee-chen interesting. I had assumed that the class was once applied only to selectable rows because of that code I saw in our FTs. But, it may well be that the author of that code made an incorrect assumption.
We can definitely consider revisiting this during EuiTable's Emotion conversion - we won't need the className for CSS at that point and can re-appropriate it as a state indicator.
This could be nice! But, as I've thought about it more, you could also argue that internal EUI classes aren't really part of your supported contract. I'll leave it up to you
I'm definitely open to doing it during the Emotion conversion! We use other -isX modifiers/CSS classes in EUI across the codebase and while it's not a guaranteed contract, it's definitely very nice to have!
changed the title [-]`EuiInMemoryTable` assigns the `euiTableRow-isSelectable` class to non-selectable rows[/-][+][EuiInMemoryTable] Use the `.euiTableRow-isSelectable` className to indicate state[/+]on Feb 7, 2024
Addressed by #7632. Will be merged into main once the feature branch with all EuiTable Emotion conversions is opened, so should reach Kibana main in another 2-3 weeks.
Activity
cee-chen commentedon Feb 6, 2024
I definitely see what you're seeing, but just to clarify, are you saying this was the case and broke at some point in EUI history? From what I'm seeing in the source code, it looks like this always the way
EuiInMemoryTableandEuiBasicTablehas behaved.eui/src/components/table/table_row.tsx
Lines 21 to 25 in e8407ff
helps shed some light on this - it looks like the
.euiTableRow-isSelectableclass is really mostly there for mobile styling and isn't intended to indicate state. So it's just named somewhat poorly 🥲We can definitely consider revisiting this during EuiTable's Emotion conversion - we won't need the className for CSS at that point and can re-appropriate it as a state indicator.
drewdaemon commentedon Feb 7, 2024
@cee-chen interesting. I had assumed that the class was once applied only to selectable rows because of that code I saw in our FTs. But, it may well be that the author of that code made an incorrect assumption.
This could be nice! But, as I've thought about it more, you could also argue that internal EUI classes aren't really part of your supported contract. I'll leave it up to you
cee-chen commentedon Feb 7, 2024
I'm definitely open to doing it during the Emotion conversion! We use other
-isXmodifiers/CSS classes in EUI across the codebase and while it's not a guaranteed contract, it's definitely very nice to have![-]`EuiInMemoryTable` assigns the `euiTableRow-isSelectable` class to non-selectable rows[/-][+][EuiInMemoryTable] Use the `.euiTableRow-isSelectable` className to indicate state[/+]cee-chen commentedon Apr 1, 2024
Addressed by #7632. Will be merged into main once the feature branch with all EuiTable Emotion conversions is opened, so should reach Kibana main in another 2-3 weeks.