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] Refactor Timeline Notes to use EuiCommentList #85256

Merged
merged 25 commits into from
Dec 13, 2020

Conversation

patrykkopycinski
Copy link
Contributor

@patrykkopycinski patrykkopycinski commented Dec 8, 2020

Summary

Event notes
image

Notes tab:
image

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@patrykkopycinski patrykkopycinski added release_note:enhancement v8.0.0 v7.11.0 Team:Threat Hunting Security Solution Threat Hunting Team Feature:Timeline Security Solution Timeline feature labels Dec 8, 2020
@patrykkopycinski patrykkopycinski self-assigned this Dec 8, 2020
@patrykkopycinski patrykkopycinski marked this pull request as ready for review December 8, 2020 15:09
@patrykkopycinski patrykkopycinski requested review from a team as code owners December 8, 2020 15:09
…-notes

# Conflicts:
#	x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/event_column_view.tsx
export const useTimelineEventsCountPortal = () => {
const [timelineEventsCountPortalNode] = useState(timelineEventsCountPortalNodeSingleton);

return { timelineEventsCountPortalNode };
Copy link
Member

Choose a reason for hiding this comment

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

Why don't you return timelineEventsCountPortalNodeSingleton ? What the advantage of using useState here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's a good question @cnasikas
I've just followed the pattern that we're using for other portals

Copy link
Member

Choose a reason for hiding this comment

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

I see. I am trying to understand it :). timelineEventsCountPortalNodeSingleton is a singleton and after the importation of the file, it will be the same instance across security solution. Theoretically, it shouldn't create rerenders. And I am wondering, is something I do not get with the useState?

Copy link
Contributor

@XavierM XavierM left a comment

Choose a reason for hiding this comment

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

Reviewed code + test locally

I saw that some translations were missing and I integrated the new details event from angela's PR #83963.

I did see some bugs with the json view and also with getting the rule id from the detail data on detections page. I also cleared the notes when creating a new timeline.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 2124 2119 -5

Async chunks

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

id before after diff
securitySolution 8.3MB 8.3MB +2.8KB

Distributable file count

id before after diff
default 47129 47889 +760

History

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

@XavierM XavierM merged commit 95beef7 into elastic:master Dec 13, 2020
XavierM added a commit to XavierM/kibana that referenced this pull request Dec 13, 2020
…astic#85256)

* [Security Solution] Refactor Timeline Notes to use EuiCommentList

* notes

* fix types

* unit tests

* selector

* uncomment Pinned tab

* note event details

* cleanup

* cleanup

* transparent background

* don't display elastic as an owner when note is created

* review + bugs fixed found

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
XavierM added a commit that referenced this pull request Dec 13, 2020
…5256) (#85716)

* [Security Solution] Refactor Timeline Notes to use EuiCommentList

* notes

* fix types

* unit tests

* selector

* uncomment Pinned tab

* note event details

* cleanup

* cleanup

* transparent background

* don't display elastic as an owner when note is created

* review + bugs fixed found

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>

Co-authored-by: Patryk Kopyciński <patryk.kopycinski@elastic.co>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Dec 14, 2020
* master: (116 commits)
  Fix UX E2E tests (elastic#85722)
  Increasing default api key removalDelay to 1h (elastic#85576)
  align cors settings names with elasticsearch (elastic#85738)
  unskip tests and make sure submit is not triggered too quickly (elastic#85567)
  Row trigger 2 (elastic#83167)
  Add session id to audit log (elastic#85451)
  [TSVB] Fields lists do not populate all the times (elastic#85530)
  [Visualize] Removes the external link icon from OSS badges (elastic#85580)
  fixes EQL tests (elastic#85712)
  [APM] enable 'log_level' for Go (elastic#85511)
  ini `1.3.5` -> `1.3.7` (elastic#85707)
  Fix fleet route protections (elastic#85626)
  [Monitoring] Some progress on making alerts better in the UI (elastic#81569)
  [Security Solution] Refactor Timeline Notes to use EuiCommentList (elastic#85256)
  [Security Solution][Detections][Threshold Rules] Threshold rule exceptions (elastic#85103)
  [Security Solution] Alerts details (elastic#83963)
  skip flaky suite (elastic#62060)
  skip flaky suite (elastic#85098)
  skip flaky suite (elastic#84020)
  skip flaky suite (elastic#85671)
  ...
@patrykkopycinski patrykkopycinski deleted the feat/timeline-notes branch June 10, 2022 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Timeline Security Solution Timeline feature release_note:enhancement Team:Threat Hunting Security Solution Threat Hunting Team v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants