elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.71k stars 8.13k forks source link

[Discover] Use Emotion to highlight a row in Document explorer #126883

Closed kertal closed 6 days ago

kertal commented 2 years ago

The current way highlighting a row when expanded is complex, per cell, and leads to re-rendering of the table:

image

This should be improved by using Emotion, since rows can be targeted by adding CSS like this:

image

This approach should lead to no more re-rendering. So it's a performance win.

Follow up of https://github.com/elastic/eui/issues/4401#issuecomment-1058912638

elasticmachine commented 2 years ago

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

jughosta commented 2 years ago

EUI now supports adding custom classes to rows https://elastic.github.io/eui/#/tabular-content/data-grid-style-display#grid-row-classes

kertal commented 2 years ago

EUI now supports adding custom classes to rows https://elastic.github.io/eui/#/tabular-content/data-grid-style-display#grid-row-classes

@jughosta yes, would be a nice opportunity to clean up the code in this area :)

kertal commented 6 days ago

Closing after syncing @jughosta, who pointed out, the highlight row feature has been migrated to

https://github.com/elastic/kibana/blob/1c4b5c748977463b70b8fe7716498e99ab6863dc/packages/kbn-unified-data-table/src/hooks/use_control_column.ts#L24-L36

so this issue is redundant 👍