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
[EuiDataGrid] Expansion popover needs more customization #5310
While the expansion popover was originally built purely to be a full view of the cell contents, there is a growing need to make it more complex/custom. Several things that are needed:
Just wanted to get more convo going on this as I think there's some higher level decisions to make here before just yoloing into the code.
Allow consumers to control the open/closed state
Do we intend to completely hand over the cell popover state to the consumer (i.e., they're now required to be fully in charge of setting their own isOpen state a la EuiPopover), or do we want to only optionally give them the ability to pass in a true/false but fall back to our own internal state management if the consumer does not opt in?
Allow consumers to completely control the popover contents including the custom controls
Just to make sure we're thinking ahead, will completely custom cell actions (e.g. an arbitrary ReactNode) potentially conflict at all with the feature request in EuiDataGrid cellAction and expand popover #5132 (or is that fine/mostly separate)?
Thanks, Constance! I also have some thoughts to get down and discuss, but my other in-progress work has consumed my attention this week. I'll make this a priority next week.
No worries at all! The last item (z-index) looks pretty straightforward at second glance so I might go ahead and tackle it and leave all the hard questions to you
Was going through some of the items in our backlog and also noticed this: elastic/kibana#115341@constancecchen , should the open and close popovers help us handle this as well? Thanks!
Activity
cee-chen commentedon Dec 9, 2021
cc @chandlerprall and @thompsongl
Just wanted to get more convo going on this as I think there's some higher level decisions to make here before just yoloing into the code.
Do we intend to completely hand over the cell popover state to the consumer (i.e., they're now required to be fully in charge of setting their own
isOpenstate a la EuiPopover), or do we want to only optionally give them the ability to pass in a true/false but fall back to our own internal state management if the consumer does not opt in?Just to make sure I'm on the same page - it appears to me that consumers already have complete control over popover contents via the
popoverContentsAPI (https://elastic.github.io/eui/#/tabular-content/data-grid-schemas-and-popovers). Is the feature request here then just to allow users to customize the actual popover toggles (aka cell actions)?Other random thoughts:
Edit: Went ahead and opened a PR for this: #5461
thompsongl commentedon Dec 9, 2021
Thanks, Constance! I also have some thoughts to get down and discuss, but my other in-progress work has consumed my attention this week. I'll make this a priority next week.
cee-chen commentedon Dec 9, 2021
No worries at all! The last item (z-index) looks pretty straightforward at second glance so I might go ahead and tackle it and leave all the hard questions to you
michaelolo24 commentedon Feb 1, 2022
Was going through some of the items in our backlog and also noticed this: elastic/kibana#115341 @constancecchen , should the
openandclosepopovers help us handle this as well? Thanks!cee-chen commentedon Feb 1, 2022
Yes, it will! You will be able to grab
closeCellPopover()from the data grid's ref and manually call it in the same action you use to open your modal or perform a navigation action, etc. You can see https://eui.elastic.co/pr_5550/#/tabular-content/data-grid-ref-methods for an example + demo JS.