-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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][Explore] Migrate from styled-components in shared #210311
[Security Solution][Explore] Migrate from styled-components in shared #210311
Conversation
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
Pinging @elastic/security-threat-hunting-explore (Team:Threat Hunting:Explore) |
d8bdf28
to
c8176da
Compare
.../solutions/security/plugins/security_solution/public/common/components/header_page/index.tsx
Show resolved
Hide resolved
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.
LGTM for the Threat Hunting Investigations team
c8176da
to
e1f6adf
Compare
Addresses elastic#206436 - Replace styled-components with @emotion/react and @emotion/styled across multiple components - Remove `@kbn/ui-theme` instances - Update test cases to use @emotion/jest matchers for toHaveStyleRule to work properly - Adjust styles to use `css` from `@emotion/react` - Remove unused imports and updated snapshots
e1f6adf
to
435427b
Compare
💛 Build succeeded, but was flaky
Failed CI Steps
Test FailuresMetrics [docs]Async chunks
Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
cc @kapral18 |
Starting backport for target branches: 8.18, 8.x, 9.0 |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
…elastic#210311) Addresses elastic#206436 - Replace styled-components with @emotion/react and @emotion/styled across multiple components - Remove `@kbn/ui-theme` instances - Update test cases to use @emotion/jest matchers for toHaveStyleRule to work properly - Adjust styles to use `css` from `@emotion/react` - Remove unused imports and updated snapshots https://github.com/user-attachments/assets/48b9ab41-23fd-4c00-ace9-c0cbe58c91f7 (cherry picked from commit 4b4c5ce) # Conflicts: # packages/kbn-babel-preset/styled_components_files.js # x-pack/solutions/security/plugins/security_solution/public/common/components/charts/draggable_legend.tsx # x-pack/solutions/security/plugins/security_solution/public/common/components/charts/draggable_legend_item.tsx # x-pack/solutions/security/plugins/security_solution/public/timelines/components/netflow/__snapshots__/index.test.tsx.snap # x-pack/solutions/security/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap
…elastic#210311) Addresses elastic#206436 - Replace styled-components with @emotion/react and @emotion/styled across multiple components - Remove `@kbn/ui-theme` instances - Update test cases to use @emotion/jest matchers for toHaveStyleRule to work properly - Adjust styles to use `css` from `@emotion/react` - Remove unused imports and updated snapshots https://github.com/user-attachments/assets/48b9ab41-23fd-4c00-ace9-c0cbe58c91f7 (cherry picked from commit 4b4c5ce) # Conflicts: # packages/kbn-babel-preset/styled_components_files.js
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…elastic#210311) Addresses elastic#206436 - Replace styled-components with @emotion/react and @emotion/styled across multiple components - Remove `@kbn/ui-theme` instances - Update test cases to use @emotion/jest matchers for toHaveStyleRule to work properly - Adjust styles to use `css` from `@emotion/react` - Remove unused imports and updated snapshots https://github.com/user-attachments/assets/48b9ab41-23fd-4c00-ace9-c0cbe58c91f7 (cherry picked from commit 4b4c5ce) # Conflicts: # packages/kbn-babel-preset/styled_components_files.js # x-pack/solutions/security/plugins/security_solution/public/common/components/charts/draggable_legend.tsx # x-pack/solutions/security/plugins/security_solution/public/common/components/charts/draggable_legend_item.tsx # x-pack/solutions/security/plugins/security_solution/public/timelines/components/netflow/__snapshots__/index.test.tsx.snap # x-pack/solutions/security/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap
…shared (#210311) (#211224) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution][Explore] Migrate from styled-components in shared (#210311)](#210311) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Karen Grigoryan","email":"karen.grigoryan@elastic.co"},"sourceCommit":{"committedDate":"2025-02-13T16:14:34Z","message":"[Security Solution][Explore] Migrate from styled-components in shared (#210311)\n\nAddresses #206436\r\n\r\n- Replace styled-components with @emotion/react and @emotion/styled\r\nacross multiple components\r\n- Remove `@kbn/ui-theme` instances\r\n- Update test cases to use @emotion/jest matchers for toHaveStyleRule to\r\nwork properly\r\n- Adjust styles to use `css` from `@emotion/react`\r\n- Remove unused imports and updated snapshots\r\n\r\n\r\nhttps://github.com/user-attachments/assets/48b9ab41-23fd-4c00-ace9-c0cbe58c91f7","sha":"4b4c5ce491aa6539867c3de789ff604880a7fc2e","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat Hunting","Team:Threat Hunting:Explore","backport:version","v8.18.0","EUI Visual Refresh","v9.1.0","v8.19.0"],"title":"[Security Solution][Explore] Migrate from styled-components in shared","number":210311,"url":"https://github.com/elastic/kibana/pull/210311","mergeCommit":{"message":"[Security Solution][Explore] Migrate from styled-components in shared (#210311)\n\nAddresses #206436\r\n\r\n- Replace styled-components with @emotion/react and @emotion/styled\r\nacross multiple components\r\n- Remove `@kbn/ui-theme` instances\r\n- Update test cases to use @emotion/jest matchers for toHaveStyleRule to\r\nwork properly\r\n- Adjust styles to use `css` from `@emotion/react`\r\n- Remove unused imports and updated snapshots\r\n\r\n\r\nhttps://github.com/user-attachments/assets/48b9ab41-23fd-4c00-ace9-c0cbe58c91f7","sha":"4b4c5ce491aa6539867c3de789ff604880a7fc2e"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210311","number":210311,"mergeCommit":{"message":"[Security Solution][Explore] Migrate from styled-components in shared (#210311)\n\nAddresses #206436\r\n\r\n- Replace styled-components with @emotion/react and @emotion/styled\r\nacross multiple components\r\n- Remove `@kbn/ui-theme` instances\r\n- Update test cases to use @emotion/jest matchers for toHaveStyleRule to\r\nwork properly\r\n- Adjust styles to use `css` from `@emotion/react`\r\n- Remove unused imports and updated snapshots\r\n\r\n\r\nhttps://github.com/user-attachments/assets/48b9ab41-23fd-4c00-ace9-c0cbe58c91f7","sha":"4b4c5ce491aa6539867c3de789ff604880a7fc2e"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
… shared (#210311) (#211226) # Backport This will backport the following commits from `main` to `8.18`: - [[Security Solution][Explore] Migrate from styled-components in shared (#210311)](#210311) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Karen Grigoryan","email":"karen.grigoryan@elastic.co"},"sourceCommit":{"committedDate":"2025-02-13T16:14:34Z","message":"[Security Solution][Explore] Migrate from styled-components in shared (#210311)\n\nAddresses #206436\r\n\r\n- Replace styled-components with @emotion/react and @emotion/styled\r\nacross multiple components\r\n- Remove `@kbn/ui-theme` instances\r\n- Update test cases to use @emotion/jest matchers for toHaveStyleRule to\r\nwork properly\r\n- Adjust styles to use `css` from `@emotion/react`\r\n- Remove unused imports and updated snapshots\r\n\r\n\r\nhttps://github.com/user-attachments/assets/48b9ab41-23fd-4c00-ace9-c0cbe58c91f7","sha":"4b4c5ce491aa6539867c3de789ff604880a7fc2e","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat Hunting","Team:Threat Hunting:Explore","backport:version","v8.18.0","EUI Visual Refresh","v9.1.0","v8.19.0"],"title":"[Security Solution][Explore] Migrate from styled-components in shared","number":210311,"url":"https://github.com/elastic/kibana/pull/210311","mergeCommit":{"message":"[Security Solution][Explore] Migrate from styled-components in shared (#210311)\n\nAddresses #206436\r\n\r\n- Replace styled-components with @emotion/react and @emotion/styled\r\nacross multiple components\r\n- Remove `@kbn/ui-theme` instances\r\n- Update test cases to use @emotion/jest matchers for toHaveStyleRule to\r\nwork properly\r\n- Adjust styles to use `css` from `@emotion/react`\r\n- Remove unused imports and updated snapshots\r\n\r\n\r\nhttps://github.com/user-attachments/assets/48b9ab41-23fd-4c00-ace9-c0cbe58c91f7","sha":"4b4c5ce491aa6539867c3de789ff604880a7fc2e"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210311","number":210311,"mergeCommit":{"message":"[Security Solution][Explore] Migrate from styled-components in shared (#210311)\n\nAddresses #206436\r\n\r\n- Replace styled-components with @emotion/react and @emotion/styled\r\nacross multiple components\r\n- Remove `@kbn/ui-theme` instances\r\n- Update test cases to use @emotion/jest matchers for toHaveStyleRule to\r\nwork properly\r\n- Adjust styles to use `css` from `@emotion/react`\r\n- Remove unused imports and updated snapshots\r\n\r\n\r\nhttps://github.com/user-attachments/assets/48b9ab41-23fd-4c00-ace9-c0cbe58c91f7","sha":"4b4c5ce491aa6539867c3de789ff604880a7fc2e"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…shared (#210311) (#211221) # Backport This will backport the following commits from `main` to `9.0`: - [[Security Solution][Explore] Migrate from styled-components in shared (#210311)](#210311) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Karen Grigoryan","email":"karen.grigoryan@elastic.co"},"sourceCommit":{"committedDate":"2025-02-13T16:14:34Z","message":"[Security Solution][Explore] Migrate from styled-components in shared (#210311)\n\nAddresses #206436\r\n\r\n- Replace styled-components with @emotion/react and @emotion/styled\r\nacross multiple components\r\n- Remove `@kbn/ui-theme` instances\r\n- Update test cases to use @emotion/jest matchers for toHaveStyleRule to\r\nwork properly\r\n- Adjust styles to use `css` from `@emotion/react`\r\n- Remove unused imports and updated snapshots\r\n\r\n\r\nhttps://github.com/user-attachments/assets/48b9ab41-23fd-4c00-ace9-c0cbe58c91f7","sha":"4b4c5ce491aa6539867c3de789ff604880a7fc2e","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat Hunting","Team:Threat Hunting:Explore","backport:version","v8.18.0","EUI Visual Refresh","v9.1.0","v8.19.0"],"title":"[Security Solution][Explore] Migrate from styled-components in shared","number":210311,"url":"https://github.com/elastic/kibana/pull/210311","mergeCommit":{"message":"[Security Solution][Explore] Migrate from styled-components in shared (#210311)\n\nAddresses #206436\r\n\r\n- Replace styled-components with @emotion/react and @emotion/styled\r\nacross multiple components\r\n- Remove `@kbn/ui-theme` instances\r\n- Update test cases to use @emotion/jest matchers for toHaveStyleRule to\r\nwork properly\r\n- Adjust styles to use `css` from `@emotion/react`\r\n- Remove unused imports and updated snapshots\r\n\r\n\r\nhttps://github.com/user-attachments/assets/48b9ab41-23fd-4c00-ace9-c0cbe58c91f7","sha":"4b4c5ce491aa6539867c3de789ff604880a7fc2e"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210311","number":210311,"mergeCommit":{"message":"[Security Solution][Explore] Migrate from styled-components in shared (#210311)\n\nAddresses #206436\r\n\r\n- Replace styled-components with @emotion/react and @emotion/styled\r\nacross multiple components\r\n- Remove `@kbn/ui-theme` instances\r\n- Update test cases to use @emotion/jest matchers for toHaveStyleRule to\r\nwork properly\r\n- Adjust styles to use `css` from `@emotion/react`\r\n- Remove unused imports and updated snapshots\r\n\r\n\r\nhttps://github.com/user-attachments/assets/48b9ab41-23fd-4c00-ace9-c0cbe58c91f7","sha":"4b4c5ce491aa6539867c3de789ff604880a7fc2e"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
Addresses #206436
@kbn/ui-theme
instancescss
from@emotion/react
Screen.Recording.Feb.10.2025.mp4