eui
eui copied to clipboard
[EuiBasicTable] Add option to render metadata + bulk actions in header
As part of the work the improve UX for the <TableListView /> in Kibana (the page rendering the list of dashboards, visualisations, maps) we want to render a "selection info" bar on top of the <EuiBasicTable /> with the following functionalities
- Display how many items are being viewed (e.g. "Showing 1-10 of 45 Dashboards")
- Once one or multiple items are selected
- Render a context menu to process bulk actions on the items
- Render a button to select all the visible items in the table
- Render a button to clear the selection
Design
Bulk actions
I don't know that this provides enough value to bake into EuiBasicTable. It's additive to the table, but doesn't appear specific enough to tables to be built into the component, feels more standalone. The selection logic also looks like it disagrees with our approach where selection should only apply to the rows currently rendered.
As a concept, we agree on adding a toolbar component to EUI, captured by #3500 but we could use your use case there!
I don't know that this provides enough value to bake into EuiBasicTable.
I disagree. Every table instance could benefit from displaying (at least) the row/count totals and the added ability to quickly deselect rows (if selection is enabled).
For sure this is part of the idea behind the toolbar component, though, and it's probably best to start there as a generic and then allow the table components to have them turned on/off.
I don't mind building this feature for our need and if you see the value bring it to EUI. I wouldn't want the UX work of the table list in Kibana to be delayed until we agree on a generic toolbar for multiple purposes.
Seeing the length https://github.com/elastic/eui/issues/4010 it seems that we might be better starting in Kibana.
Closing in favour of https://github.com/elastic/kibana/issues/140185 (we'll implement it initially for the Table list view)