Skip to content

[EuiDataGrid] Expansion popover needs more customization #5310

Closed

Description

@cchaos

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:

Activity

  1. cee-chen commented on Dec 9, 2021

    @cee-chen
    Contributor

    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.

    1. 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?

    1. Allow consumers to completely control the popover contents including the custom controls

    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 popoverContents API (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:

    Fix the hard-coded high z-index

    Edit: Went ahead and opened a PR for this: #5461

  2. thompsongl commented on Dec 9, 2021

    @thompsongl
    Contributor

    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.

  3. cee-chen commented on Dec 9, 2021

    @cee-chen
    Contributor

    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 :trollface:

  4. michaelolo24 commented on Feb 1, 2022

    @michaelolo24

    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!

  5. cee-chen commented on Feb 1, 2022

    @cee-chen
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions