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][Timeline] fix timeline favorite working for draft timeline #175161

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

PhilippeOberti
Copy link
Contributor

@PhilippeOberti PhilippeOberti commented Jan 18, 2024

Summary

I discovered a bug today where users can click on the favorite button both in the bottom bar and in the timeline modal header even if the timeline hasn't been saved.
This PR fixes that while also doing small amount of refactor:

  • extract the AddToFavoriteButton component out of the helpers.tsx file and move the AddToFavoriteButton component to its own folder at the root of the components folder as it's used in the bottom bar and the modal header
  • clean the AddToFavoriteButton component by removing the compact mode which isn't used, using a proper selector to retrieve data from the redux store
  • refactor and improve the unit test to use React testing-library instead of enzyme
Screen.Recording.2024-01-18.at.4.43.32.PM.mov

Checklist

@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@janmonschke janmonschke left a comment

Choose a reason for hiding this comment

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

Great improvements!

@PhilippeOberti PhilippeOberti force-pushed the timeline-cleanup-4 branch 3 times, most recently from f2f783a to 3bfdc67 Compare January 22, 2024 16:48
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #14 / endpoint Endpoint Exceptions should NOT add event.module=endpoint to entry if there is another operator

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 4875 4876 +1

Async chunks

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

id before after diff
securitySolution 11.1MB 11.1MB -822.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 469 470 +1

Total ESLint disabled count

id before after diff
securitySolution 541 542 +1

History

  • 💔 Build #188564 failed 3bfdc678cf7b6a3733787d1185f0a802dbe3ad43
  • 💔 Build #188562 failed f2f783aec4e1a671ed147ddc5b5a30d976bb813e
  • 💔 Build #188556 failed 6045a1700b05694f5bbb0fce62ac814a2fe56187

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

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 release_note:fix Team:Threat Hunting:Investigations Security Solution Investigations Team v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants