Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Data Grid] Added closePopover action to EuiDataGridColumnCellActionProps #4346

Merged

Conversation

sulemanof
Copy link
Contributor

@sulemanof sulemanof commented Dec 4, 2020

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

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
Copy link
Member

kertal commented Dec 4, 2020

jenkins test this

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4346/

@sulemanof
Copy link
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
Copy link
Member

@kertal kertal left a comment

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
Copy link
Member

kertal commented Dec 4, 2020

@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!

Copy link
Contributor

@snide snide left a comment

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
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
Copy link
Contributor

@snide snide left a comment

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.

Copy link
Contributor

@chandlerprall chandlerprall left a comment

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
Contributor

jenkins test this

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4346/

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