Skip to content

[Data Grid] Added closePopover action to EuiDataGridColumnCellActionProps - #4346

Merged
chandlerprall merged 6 commits into
elastic:masterfrom
sulemanof:data_grid/add_close_popover_action
Dec 8, 2020
Merged

chandlerprall merged 6 commits into
elastic:masterfrom
sulemanof:data_grid/add_close_popover_action

Conversation

@sulemanof

@sulemanof sulemanof commented Dec 4, 2020 •

Copy link
Copy Markdown
Contributor

Summary

Allow a custom cell action to close the popover manually.
The original request in Data table vis replacement -> elastic/kibana#70801 (comment)

The desired result:

cell_action

Checklist

@kibanamachine

Copy link
Copy Markdown
Contributor

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@sulemanof
sulemanof marked this pull request as ready for review December 4, 2020 10:36
@kertal

kertal commented Dec 4, 2020

Copy link
Copy Markdown
Member

jenkins test this

@kibanamachine

Copy link
Copy Markdown
Contributor

@sulemanof

Copy link
Copy Markdown
Contributor Author

jenkins test this

@sulemanof sulemanof changed the title [Data Grid] Enhance cell actions with close popover action [Data Grid] Added closePopover action to EuiDataGridColumnCellActionProps Dec 4, 2020

@kertal kertal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM! Yes, this would fix the problem you've describing, I've encountered the same issue in the Discover PR:

Bildschirmfoto 2020-12-04 um 15 29 12

Which makes me wonder if it's intended, that popover cells are still displayed while the parent cell was already removed?

@kertal

kertal commented Dec 4, 2020

Copy link
Copy Markdown
Member

@sulemanof one thing, could you make use of this function in one of the examples of our documentation ? think it's always good to show such things in action, many thx!

@snide snide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Echo @kertal. A simple example (probably on the popover's doc page) for the docs would be nice. Although this is a simple prop, a jest test would also be nice. Otherwise feature looks good.

The next release for EUI will be tuesday. That will likely be the last release to get into Kibana.

@sulemanof

Copy link
Copy Markdown
Contributor Author

Echo @kertal. A simple example (probably on the popover's doc page) for the docs would be nice. Although this is a simple prop, a jest test would also be nice. Otherwise feature looks good.

The next release for EUI will be tuesday. That will likely be the last release to get into Kibana.

Hey @snide !
I've updated docs for the feature.
Sorry, I wasn't able to add tests here since the component lacks any tests and it requires quite more time to create it therefore.
If we want to get this feature until the FF in kibana, would be great if we could merge it as it is.

@sulemanof
sulemanof requested a review from snide December 8, 2020 15:22

@snide snide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talked with @chandlerprall yesterday. He was OK with this one going without tests. Thanks for the docs.

@chandlerprall chandlerprall left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted the cell action example's email column to still alert so it doesn't feel broken and touched up the description. I also changed it to always pass the closePopover method so 1) the consuming app doesn't need to test for it and 2) it is possible to click the non-popover action button when the popover is open

Will merge on passing CI

@chandlerprall

Copy link
Copy Markdown
Contributor

jenkins test this

@kibanamachine

Copy link
Copy Markdown
Contributor

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants