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

[Security Solution][Bug] fix popover in t-grid #145025

Merged
merged 14 commits into from
Nov 16, 2022

Conversation

christineweng
Copy link
Contributor

@christineweng christineweng commented Nov 10, 2022

This PR contains fixes for the following issues:

# 1 Popover overlaps flyout

# 2 Popover persists after clicking filter out

# 3 Popover persists after clicking a button outside of popover

Background

Previously, a cell's popover remains open after clicking an action. In many cases we want the popover to close upon clicking on a cell action. EUI team addressed this by adding a closeCellPopover to a ref API.

In T-grid, there are 2 types of cell actions:

  • Default cell actions such as filter in, filter out, add to timeline and copy. closeCellPopover is not used.
  • Formatted fields that have more information in the form of flyouts (host name, user name, ip, etc.)
    closeCellPopover prop is passed but currently not working as expected.

This PR contains fixes for:

  • Fixing closeCellPopover in T-grid body for formatted fields - fixes # 1
  • Adding closeCellPopover props in default cell actions - fixes # 2 and # 3

# 1 - closeCellPopover in T-grid

dataGridRef.current?.closeCellPopover was added and intended to close any open popovers when a cell action is clicked. However, because it is a mutable object, it is not being monitored in columnsWithCellActions. When the page is initially loaded, dataGridRef.current remain as null and it does not update until the page re-renders and dataGridRef becomes non-null.

  • After: popover closes properly
Screen.Recording.2022-11-10.at.2.44.53.PM.mov

# 2 & # 3 Add closeCellPopover to default cell actions

  • After: upon opening the expansion popover, clicking any options and the popover will disappear
Screen.Recording.2022-11-11.at.1.31.01.PM.mov
  • After: upon opening the expansion popover, clicking any options outside and the popover will disappear
Screen.Recording.2022-11-11.at.1.41.25.PM.mov

Note for UX: although QA only flagged filter out and add to timeline, for consistency's sake, the expansion popover will disappear after clicking any of the cell actions, which includes filter in and copy.

@christineweng christineweng added bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting Security Solution Threat Hunting Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Investigations Security Solution Investigations Team v8.6.0 labels Nov 10, 2022
@christineweng christineweng self-assigned this Nov 10, 2022
@christineweng christineweng changed the title [Security Solution] fix popover overlap in t-grid [Security Solution][Bug] fix popover overlap in t-grid Nov 11, 2022
@christineweng christineweng changed the title [Security Solution][Bug] fix popover overlap in t-grid [Security Solution][Bug] fix popover in t-grid Nov 11, 2022
@christineweng christineweng marked this pull request as ready for review November 14, 2022 15:24
@christineweng christineweng requested review from a team as code owners November 14, 2022 15:24
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@christineweng christineweng enabled auto-merge (squash) November 14, 2022 15:31
@michaelolo24 michaelolo24 added release_note:fix and removed release_note:skip Skip the PR/issue when compiling release notes labels Nov 15, 2022
Copy link
Contributor

@jamster10 jamster10 left a comment

Choose a reason for hiding this comment

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

Review for Explore team. LGTM 🔥

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 9.6MB 9.6MB +570.0B
timelines 74.7KB 74.7KB +27.0B
total +597.0B
Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 59 65 +6
osquery 108 113 +5
securitySolution 441 447 +6
total +19

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 67 73 +6
osquery 109 115 +6
securitySolution 518 524 +6
total +20

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @christineweng

Copy link
Contributor

@andrew-goldstein andrew-goldstein left a comment

Choose a reason for hiding this comment

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

Thanks for these fixes @christineweng! 🙏
✅ desk tested locally
LGTM 🚀

@christineweng christineweng merged commit 05d1ff8 into elastic:main Nov 16, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting bug Fixes for quality problems that affect the customer experience release_note:fix Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Investigations Security Solution Investigations Team Team:Threat Hunting Security Solution Threat Hunting Team v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants