Skip to content

[EuiDataGrid] Fix cell expansion popover not correctly closing when clicking the originating cell#5681

Merged
cee-chen merged 4 commits intoelastic:mainfrom
cee-chen:datagrid/5190
Mar 3, 2022
Merged

[EuiDataGrid] Fix cell expansion popover not correctly closing when clicking the originating cell#5681
cee-chen merged 4 commits intoelastic:mainfrom
cee-chen:datagrid/5190

Conversation

@cee-chen
Copy link
Contributor

@cee-chen cee-chen commented Mar 2, 2022

Summary

closes #5190

The main fix is the onTrapDeactivation={closeCellPopover} prop addition, the other diffs are me just reordering props

QA

screencap

Checklist

- [ ] Check against all themes for compatibility in both light and dark modes
- [ ] Checked in mobile
- [ ] Checked in Chrome, Safari, Edge, and Firefox
- [ ] Props have proper autodocs and playground toggles
- [ ] Added documentation
- [ ] Checked Code Sandbox works for any docs examples
- [ ] Added or updated jest and cypress tests
- [ ] Checked for breaking changes and labeled appropriately

  • Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

cee-chen added 2 commits March 2, 2022 13:59
(which should occur when clicking back into the originating cell)
- to associate certain props more with one another
@cee-chen cee-chen requested a review from cchaos March 2, 2022 22:21
@kibanamachine
Copy link

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

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

🙌 LGTM! Thanks for the quick fix

@cee-chen cee-chen enabled auto-merge (squash) March 3, 2022 18:04
@kibanamachine
Copy link

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

@cee-chen cee-chen merged commit a6f744a into elastic:main Mar 3, 2022
@cee-chen cee-chen deleted the datagrid/5190 branch March 3, 2022 19:03
cee-chen added a commit to thompsongl/kibana that referenced this pull request Mar 9, 2022
- This changed in 50.0.0 because of elastic/eui#5681

- `await testSubjects.click('filterForButton')` applies to both the cell action button icon and the cell popover button
- The test was trying to click the cell action button icon and not the popover button, which closed the popover and caused nothing to actually get clicked

- the solution I went with was to simply avoid opening the cell popover but instead click the cell action icon directly
spalger pushed a commit to elastic/kibana that referenced this pull request Mar 16, 2022
* eui to v50.0.0

* i18n tokens

* Deprecate EuiDataGrid's `popoverContents` prop for `renderCellPopover`

* [optional ML refactor] Use `renderCellValue.isDetails` to customize numeric popover content instead of `renderCellPopover`

 - since no especially custom popover rendering is occuring, just conditional content

* onChangeItemsPerPage update

* storyshots updates

* snapshot updates

* snapshot updates

* snapshot updates

* snapshot updates

* EuiComboBox listbox -> combobox

* remove invalid combobox aria attr

* Revert "onChangeItemsPerPage update"

This reverts commit 127c9e5.

* eui to v51.0.0

* WIP: schema

* WIP: schema

* EuiSelectable API changes

* WIP: schema

* hidePerPageOptions -> showPerpageOptions

* WIP: schema

* hidePerPageOptions -> showPerpageOptions

* WIP: schema

* breadcrumbs type

* clean up

* snapshot updates

* Fix E2E datagrid cell filter action test

- This changed in 50.0.0 because of elastic/eui#5681

- `await testSubjects.click('filterForButton')` applies to both the cell action button icon and the cell popover button
- The test was trying to click the cell action button icon and not the popover button, which closed the popover and caused nothing to actually get clicked

- the solution I went with was to simply avoid opening the cell popover but instead click the cell action icon directly

* WIP: selectable search

* clean up

* eui to v51.1.0

* i18n tokens

* resolve SharedRenderCellElementProps.schema optionality

* i18n, snapshot updates

* shapshot update

* consolidate url-parse

Co-authored-by: Constance Chen <constance.chen@elastic.co>
maksimkovalev pushed a commit to maksimkovalev/kibana that referenced this pull request Mar 18, 2022
* eui to v50.0.0

* i18n tokens

* Deprecate EuiDataGrid's `popoverContents` prop for `renderCellPopover`

* [optional ML refactor] Use `renderCellValue.isDetails` to customize numeric popover content instead of `renderCellPopover`

 - since no especially custom popover rendering is occuring, just conditional content

* onChangeItemsPerPage update

* storyshots updates

* snapshot updates

* snapshot updates

* snapshot updates

* snapshot updates

* EuiComboBox listbox -> combobox

* remove invalid combobox aria attr

* Revert "onChangeItemsPerPage update"

This reverts commit 127c9e5.

* eui to v51.0.0

* WIP: schema

* WIP: schema

* EuiSelectable API changes

* WIP: schema

* hidePerPageOptions -> showPerpageOptions

* WIP: schema

* hidePerPageOptions -> showPerpageOptions

* WIP: schema

* breadcrumbs type

* clean up

* snapshot updates

* Fix E2E datagrid cell filter action test

- This changed in 50.0.0 because of elastic/eui#5681

- `await testSubjects.click('filterForButton')` applies to both the cell action button icon and the cell popover button
- The test was trying to click the cell action button icon and not the popover button, which closed the popover and caused nothing to actually get clicked

- the solution I went with was to simply avoid opening the cell popover but instead click the cell action icon directly

* WIP: selectable search

* clean up

* eui to v51.1.0

* i18n tokens

* resolve SharedRenderCellElementProps.schema optionality

* i18n, snapshot updates

* shapshot update

* consolidate url-parse

Co-authored-by: Constance Chen <constance.chen@elastic.co>
cee-chen added a commit to cee-chen/eui that referenced this pull request Apr 14, 2022
cee-chen pushed a commit that referenced this pull request Apr 15, 2022
…fecting complex cell popovers (#5797)

* Revert #5681

* Fix closing the cell popover when the cell is clicked

- in a more targeted manner that doesn't affect popovers with complex focus children (e.g. modals, nested popovers)

* Add changelog entry

* Fix for failing Cypress test

- because I put the new logic inside the setTimeout, Cypress was opening the popover too quickly and the new logic was instantly closing it *derp*

- the new logic probably doesn't need to be in a timeout, so moving it out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EuiDataGrid] Expansion popover can't be closed when clicking cell

3 participants