-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution][Data Quality Dashboard]: migrate styled-component… (
#205559) …s to Emotion Addresses #205449 This PR migrates `ecs_data_quality_dashboard` package from `styled-components` to `emotion`. In the process we also convert the `kbn/ui-theme` json tokens to `euiTheme` counterparts. Additionally we decorate root `babel-jest` [transform](https://github.com/kapral18/kibana/blob/211d4a6889f314eb11761b0bc65f7f93d3b55ffd/packages/kbn-test/src/jest/transforms/babel.js) locally in `security_solution/public/overview` and `ecs_data_quality_dashboard` package folder to include `@emotion/babel-preset-css-prop`. The reason for local `babel-jest` transforms is that root `babel-jest` transform doesn't include `@emotion/babel-preset-css-prop` which is necessary for proper compilation of emotion css prop in tests. Without it there is a warning ![image](https://github.com/user-attachments/assets/c75b9827-a731-469c-a762-ff04f86cd80e) appearing in every test that tests a component that uses css prop with theme function passed into it. Other use cases seem to be compiling fine without this babel preset. But theme callback is a valid way of using emotion so we shouldn't avoid using it just because it's not added properly to the test compilation step. Hence I am adding it locally to `ecs_data_quality_dashboard` package and `security_solution/public/overview`. --------- Co-authored-by: kibanamachine <[email protected]>
- Loading branch information
1 parent
e04b200
commit 72980e1
Showing
69 changed files
with
1,055 additions
and
702 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
const babelJest = require('babel-jest'); | ||
const transformerConfig = require('./transformer_config'); | ||
|
||
module.exports = babelJest.default.createTransformer(transformerConfig); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.