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

[EuiDataGrid] Fix cell popovers not closing on outside grid click #7387

Merged
merged 4 commits into from
Nov 29, 2023

Conversation

cee-chen
Copy link
Member

@cee-chen cee-chen commented Nov 23, 2023

Summary

I noticed this bug while working on another (already in production) datagrid focus bug. Clicking anywhere outside the cell popover should auto close the popover; but right now in latest main it does not. This bug was introduced by #7343, so I want to get the fix in before the next release. I've added several E2E tests for it as well so it doesn't regress again.

Before After
before after

QA

General checklist

  • Browser QA
    - [ ] Checked in both light and dark modes
    - [ ] Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
    • Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA - N/A, bugfix
  • Code quality checklist
  • Release checklist
    - [ ] A changelog entry exists and is marked appropriately. - I'm skipping the changelog on this since it's a bugfix for something that's still in main / hasn't yet been released
    - [ ] If applicable, added the breaking change issue label (and filled out the breaking change checklist)
  • Designer checklist - N/A

- thanks to the moved anchor behavior, we no longer need this, and it's actually messing up other UX
- I had the DOM markup/hierarchy wrong, so the cell popover was never closing

+ add bonus regresison test for ensuring that clicking other cell actions does not close the popover
- Escape key was causing a flash of animation if the mouse was not already hovered over the cell - this prevents it

- DOM traversal is starting to feel pretty shaky, but not totally sure what to do about that
@cee-chen cee-chen force-pushed the datagrid/cell-popover-close-fix branch from c00f6e0 to 49a1d12 Compare November 23, 2023 21:11
@cee-chen cee-chen marked this pull request as ready for review November 23, 2023 21:13
@cee-chen cee-chen requested a review from a team as a code owner November 23, 2023 21:13
@cee-chen
Copy link
Member Author

@tkajtoch do you mind giving this a quick QA/review sometime before EOW? 🙏 Just needed to knock this out, then I'm planning on taking a look at Kibana shenanigans later today!

@cee-chen
Copy link
Member Author

buildkite test this

@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

@ryankeairns
Copy link
Contributor

Non-code review; completed both QA steps successfully.

Copy link
Member

@tkajtoch tkajtoch left a comment

Choose a reason for hiding this comment

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

The changes look and work great! 🚢

@cee-chen cee-chen merged commit 5ab8005 into elastic:main Nov 29, 2023
8 checks passed
@cee-chen cee-chen deleted the datagrid/cell-popover-close-fix branch November 29, 2023 16:18
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