-
Notifications
You must be signed in to change notification settings - Fork 8k
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] [Fix] Row Renderer + Notes in Flyout #186948
Conversation
/ci |
Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code looks good overall! I left a few minor comments.
As you know we'll have a few conflicts once this PR is merged (I'm waiting on the build to finish) then will come back test this PR again
x-pack/plugins/security_solution/public/common/components/header_actions/add_note_icon_item.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/common/components/header_actions/translations.ts
Outdated
Show resolved
Hide resolved
'xpack.securitySolution.timeline.body.notes.addNote.singleNoteAvailableTooltip', | ||
{ | ||
defaultMessage: '1 note available. Click to Add more.', | ||
} | ||
); | ||
|
||
export const NOTES_TOOLTIP_ADD_NOTE_MULTIPLE_NOTES_AVAILABLE = ({ | ||
notesCount, | ||
}: { | ||
notesCount: number; | ||
}) => | ||
i18n.translate( | ||
'xpack.securitySolution.timeline.body.notes.addNote.multipleNotesAvailableTooltip', | ||
{ | ||
values: { notesCount }, | ||
defaultMessage: '{notesCount} note available. Click to Add more.', | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like I mentioned in a previous comment, you could have a single translation done like this one?
x-pack/plugins/security_solution/public/timelines/components/row_renderer_switch/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/timelines/components/row_renderer_switch/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/timelines/components/timeline/properties/helpers.tsx
Outdated
Show resolved
Hide resolved
...k/plugins/security_solution/public/timelines/components/timeline/properties/notes_flyout.tsx
Show resolved
Hide resolved
...y_solution/public/timelines/components/timeline/tabs/shared/use_timeline_control_columns.tsx
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/timelines/components/row_renderer_switch/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/timelines/components/row_renderer_switch/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/timelines/components/row_renderer_switch/index.tsx
Outdated
Show resolved
Hide resolved
...ecurity_solution/public/timelines/components/row_renderers_browser/row_renderers_browser.tsx
Show resolved
Hide resolved
...lugins/security_solution/public/timelines/components/timeline/body/events/stateful_event.tsx
Show resolved
Hide resolved
...ins/security_solution/public/timelines/components/timeline/properties/use_notes_in_flyout.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/pinned/index.tsx
Show resolved
Hide resolved
...curity_solution/public/timelines/components/timeline/unified_components/data_table/index.tsx
Outdated
Show resolved
Hide resolved
09eeb10 : @kqualters-elastic and @PhilippeOberti . Please take a look at this commit. I have changed |
@PhilippeOberti , here is a fix for the Pin issue that you mentioned : 82531c1. One issue I still see is that the width of action bar in explore table is not adjusted based on the FYI @michaelolo24, I added a new flag for toggling pin action. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for making all the changes asked, the code LGTM now but maybe we should wait for @michaelolo24 's re-review before merging as he's been also focusing on the row renderers which I have not?
I pulled down the latest code and tested all possible combinations of the 3 feature flags (securitySolutionNotesEnabled
, expandableFlyoutDisabled
and unifiedComponentsInTimelineEnabled
) and it all looks good to me now for the alerts page, timeline, the explore pages and the alerts table in cases!
Awesome job!
/* | ||
* Above event is alert and not an event but `getEventType` in | ||
*x-pack/plugins/security_solution/public/timelines/components/timeline/body/helpers.tsx | ||
* returns it has event and not an alert even though, it has event.kind as signal. | ||
* Need to see if it is okay | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michaelolo24, need your opinion here. What do you think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, it's not ideal, but I'm not going to ask you to rebuild to update the mock to match the 8.0+ data since that might have unintended consequences elsewhere. Also, the getEventType
helper could probably also check for the signal
case, but once again...no idea what unintended consequences would happen elsewhere. Thanks for the comment though, will help if/when we get to updating all of this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not going to ask you to rebuild to update the mock to match the 8.0+ data
I thought about doing that but that does not help us much in test scenarios.
Also, the getEventType helper could probably also check for the signal case
that is the most strange thing. I think we should correct this function and then one of the test will fail. For now it is okay.
💔 Build FailedFailed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
One thing I noticed... you can open the expandable flyout and the investigation query modal for the alert from the note and this happened: @PhilippeOberti thoughts on closing the notes flyout when the alert/event is opened from the note? We will need to show the investigation query modal though as that adds to the note |
it can be a bit annoying, but I'm also worried about building some fancy logic to check if the flyout is open and close it, but some pretty unlikely scenario where users would do this... |
I agree. It might make sense for users to decide if they want to close notes flyout andgot working on a new workflow. But great catch. |
Yea, I agree, just note that for the alerts flyout that's fine, but for the investigation query, if you close the notes flyout, it also closes the investigation query modal. How many people use that workflow, I'm not sure, but it's not really usable while the notes flyout is open. |
Ohh that is a bummer...
Do you mind creating an issue where we can have more discussion on what should we do? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice work with these changes! Excited for users to get their hands on it 👍🏾
Summary
This PR introduces below mentioned 3 changes:
Row Renderer Switch
A quick switch to switch on/off all the row-renderers without going into settings.
Caution
This is only available with feature flag
unifiedComponentsInTimelineEnabled
row_renderer_switch.mp4
Notes in a separate Flyout
notes_flyout_notification_dot.mp4
Color Distinction between enabled/disabled Row Renderers.
Previously it was difficult to see what row renderers are available and what are not. This change introduces a small color distinction.
row_renderer_enable_disable_color.mp4
Desk Testing
Please desk test following functionalities with AND without below feature flag:
In all above scenarios row renders and notes should be shown as expected.