Skip to content

[Security Solution] - remove styled-components and cleanup for timeline header actions#206694

Merged
PhilippeOberti merged 1 commit intoelastic:mainfrom
PhilippeOberti:styled-components-2
Jan 15, 2025
Merged

[Security Solution] - remove styled-components and cleanup for timeline header actions#206694
PhilippeOberti merged 1 commit intoelastic:mainfrom
PhilippeOberti:styled-components-2

Conversation

@PhilippeOberti
Copy link
Contributor

@PhilippeOberti PhilippeOberti commented Jan 14, 2025

Summary

Similar to this previous PR, this PR originally aimed at replacing the usages styled-components with @emotion/react in the security_solution/public/common/components/header_actions folder. I quickly realized that a lot of props and event components were actually not used at all, so a cleanup was welcome.

Absolutely no UI or behavior logic changes should be introduced by this PR.

This PR will impact the tables in timeline, and the markdown use in osquery.

The biggest code cleanup are:

  • removing a couple of components related to the header actions used in timeline
  • removing random unused translations, constants or helper functions

Timeline query, correlation and pinned tabs

Screenshot 2025-01-14 at 5 29 49 PM

Screenshot 2025-01-14 at 5 30 05 PM

Screenshot 2025-01-14 at 5 30 27 PM

Checklist

@PhilippeOberti PhilippeOberti added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team:Threat Hunting:Investigations Security Solution Threat Hunting Investigations Team backport:version Backport to applied version labels v8.18.0 labels Jan 14, 2025
@PhilippeOberti PhilippeOberti requested a review from a team as a code owner January 14, 2025 23:32
@elasticmachine
Copy link
Contributor

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

@elastic-vault-github-plugin-prod elastic-vault-github-plugin-prod bot requested a review from a team as a code owner January 14, 2025 23:42
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 6527 6522 -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 21.2MB 21.1MB -42.5KB
Unknown metric groups

ESLint disabled in files

id before after diff
securitySolution 84 83 -1

Total ESLint disabled count

id before after diff
securitySolution 656 655 -1

History

  • 💔 Build #267206 failed 534ea66395fb5c480df6bda87cb528beba61c158

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.

🎉 Thanks for cleaning this up

@PhilippeOberti PhilippeOberti merged commit d9b9425 into elastic:main Jan 15, 2025
@PhilippeOberti PhilippeOberti deleted the styled-components-2 branch January 15, 2025 15:14
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12791332443

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 206694

Questions ?

Please refer to the Backport tool documentation

@PhilippeOberti
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

PhilippeOberti added a commit to PhilippeOberti/kibana that referenced this pull request Jan 15, 2025
…ne header actions (elastic#206694)

## Summary

Similar to [this previous
PR](elastic#206523), this PR originally
aimed at replacing the usages styled-components with @emotion/react in
the security_solution/public/common/components/header_actions folder. I
quickly realized that a lot of props and event components were actually
not used at all, so a cleanup was welcome.

Absolutely no UI or behavior logic changes should be introduced by this
PR.

This PR will impact the tables in timeline, and the markdown use in
osquery.

The biggest code cleanup are:
- removing a couple of components related to the header actions used in
timeline
- removing random unused translations, constants or helper functions

#### Timeline query, correlation and pinned tabs

![Screenshot 2025-01-14 at 5 29
49 PM](https://github.com/user-attachments/assets/8c06c0f3-c323-4dd7-96d1-14357abc551d)

![Screenshot 2025-01-14 at 5 30
05 PM](https://github.com/user-attachments/assets/7332fbe2-8744-46d5-a5e8-bd056fba0375)

![Screenshot 2025-01-14 at 5 30
27 PM](https://github.com/user-attachments/assets/86053a20-f0e4-4f0a-8bdd-0c2678194903)

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit d9b9425)

# Conflicts:
#	packages/kbn-babel-preset/styled_components_files.js
PhilippeOberti added a commit that referenced this pull request Jan 15, 2025
…timeline header actions (#206694) (#206830)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution] - remove styled-components and cleanup for
timeline header actions
(#206694)](#206694)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Philippe
Oberti","email":"philippe.oberti@elastic.co"},"sourceCommit":{"committedDate":"2025-01-15T15:14:28Z","message":"[Security
Solution] - remove styled-components and cleanup for timeline header
actions (#206694)\n\n## Summary\r\n\r\nSimilar to [this
previous\r\nPR](#206523), this PR
originally\r\naimed at replacing the usages styled-components with
@emotion/react in\r\nthe
security_solution/public/common/components/header_actions folder.
I\r\nquickly realized that a lot of props and event components were
actually\r\nnot used at all, so a cleanup was welcome.\r\n\r\nAbsolutely
no UI or behavior logic changes should be introduced by
this\r\nPR.\r\n\r\nThis PR will impact the tables in timeline, and the
markdown use in\r\nosquery.\r\n\r\nThe biggest code cleanup are:\r\n-
removing a couple of components related to the header actions used
in\r\ntimeline\r\n- removing random unused translations, constants or
helper functions\r\n\r\n#### Timeline query, correlation and pinned
tabs\r\n\r\n![Screenshot 2025-01-14 at 5
29\r\n49 PM](https://github.com/user-attachments/assets/8c06c0f3-c323-4dd7-96d1-14357abc551d)\r\n\r\n![Screenshot
2025-01-14 at 5
30\r\n05 PM](https://github.com/user-attachments/assets/7332fbe2-8744-46d5-a5e8-bd056fba0375)\r\n\r\n![Screenshot
2025-01-14 at 5
30\r\n27 PM](https://github.com/user-attachments/assets/86053a20-f0e4-4f0a-8bdd-0c2678194903)\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"d9b942537250184e3d802f96ae0a5ed221ad6e38","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat
Hunting:Investigations","backport:version","v8.18.0"],"number":206694,"url":"https://github.com/elastic/kibana/pull/206694","mergeCommit":{"message":"[Security
Solution] - remove styled-components and cleanup for timeline header
actions (#206694)\n\n## Summary\r\n\r\nSimilar to [this
previous\r\nPR](#206523), this PR
originally\r\naimed at replacing the usages styled-components with
@emotion/react in\r\nthe
security_solution/public/common/components/header_actions folder.
I\r\nquickly realized that a lot of props and event components were
actually\r\nnot used at all, so a cleanup was welcome.\r\n\r\nAbsolutely
no UI or behavior logic changes should be introduced by
this\r\nPR.\r\n\r\nThis PR will impact the tables in timeline, and the
markdown use in\r\nosquery.\r\n\r\nThe biggest code cleanup are:\r\n-
removing a couple of components related to the header actions used
in\r\ntimeline\r\n- removing random unused translations, constants or
helper functions\r\n\r\n#### Timeline query, correlation and pinned
tabs\r\n\r\n![Screenshot 2025-01-14 at 5
29\r\n49 PM](https://github.com/user-attachments/assets/8c06c0f3-c323-4dd7-96d1-14357abc551d)\r\n\r\n![Screenshot
2025-01-14 at 5
30\r\n05 PM](https://github.com/user-attachments/assets/7332fbe2-8744-46d5-a5e8-bd056fba0375)\r\n\r\n![Screenshot
2025-01-14 at 5
30\r\n27 PM](https://github.com/user-attachments/assets/86053a20-f0e4-4f0a-8bdd-0c2678194903)\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"d9b942537250184e3d802f96ae0a5ed221ad6e38"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/206694","number":206694,"mergeCommit":{"message":"[Security
Solution] - remove styled-components and cleanup for timeline header
actions (#206694)\n\n## Summary\r\n\r\nSimilar to [this
previous\r\nPR](#206523), this PR
originally\r\naimed at replacing the usages styled-components with
@emotion/react in\r\nthe
security_solution/public/common/components/header_actions folder.
I\r\nquickly realized that a lot of props and event components were
actually\r\nnot used at all, so a cleanup was welcome.\r\n\r\nAbsolutely
no UI or behavior logic changes should be introduced by
this\r\nPR.\r\n\r\nThis PR will impact the tables in timeline, and the
markdown use in\r\nosquery.\r\n\r\nThe biggest code cleanup are:\r\n-
removing a couple of components related to the header actions used
in\r\ntimeline\r\n- removing random unused translations, constants or
helper functions\r\n\r\n#### Timeline query, correlation and pinned
tabs\r\n\r\n![Screenshot 2025-01-14 at 5
29\r\n49 PM](https://github.com/user-attachments/assets/8c06c0f3-c323-4dd7-96d1-14357abc551d)\r\n\r\n![Screenshot
2025-01-14 at 5
30\r\n05 PM](https://github.com/user-attachments/assets/7332fbe2-8744-46d5-a5e8-bd056fba0375)\r\n\r\n![Screenshot
2025-01-14 at 5
30\r\n27 PM](https://github.com/user-attachments/assets/86053a20-f0e4-4f0a-8bdd-0c2678194903)\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"d9b942537250184e3d802f96ae0a5ed221ad6e38"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
viduni94 pushed a commit to viduni94/kibana that referenced this pull request Jan 23, 2025
…ne header actions (elastic#206694)

## Summary

Similar to [this previous
PR](elastic#206523), this PR originally
aimed at replacing the usages styled-components with @emotion/react in
the security_solution/public/common/components/header_actions folder. I
quickly realized that a lot of props and event components were actually
not used at all, so a cleanup was welcome.

Absolutely no UI or behavior logic changes should be introduced by this
PR.

This PR will impact the tables in timeline, and the markdown use in
osquery.

The biggest code cleanup are:
- removing a couple of components related to the header actions used in
timeline
- removing random unused translations, constants or helper functions

#### Timeline query, correlation and pinned tabs

![Screenshot 2025-01-14 at 5 29
49 PM](https://github.com/user-attachments/assets/8c06c0f3-c323-4dd7-96d1-14357abc551d)

![Screenshot 2025-01-14 at 5 30
05 PM](https://github.com/user-attachments/assets/7332fbe2-8744-46d5-a5e8-bd056fba0375)

![Screenshot 2025-01-14 at 5 30
27 PM](https://github.com/user-attachments/assets/86053a20-f0e4-4f0a-8bdd-0c2678194903)

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting:Investigations Security Solution Threat Hunting Investigations Team v8.18.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants