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

[Lens/SCSS] Replace expression legacy metric scss #209546

Merged

Conversation

mariairiartef
Copy link
Contributor

@mariairiartef mariairiartef commented Feb 4, 2025

Summary

Part of #208908

Replaces scss to css-in-js.

Checklist

  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

@mariairiartef mariairiartef self-assigned this Feb 4, 2025
@mariairiartef mariairiartef added Team:Visualizations Visualization editors, elastic-charts and infrastructure release_note:skip Skip the PR/issue when compiling release notes Feature:Lens backport:version Backport to applied version labels labels Feb 4, 2025
@mariairiartef mariairiartef marked this pull request as ready for review February 4, 2025 15:03
@mariairiartef mariairiartef requested review from a team as code owners February 4, 2025 15:03
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

@mbondyra mbondyra self-requested a review February 5, 2025 14:06
@mariairiartef mariairiartef force-pushed the lens/scss-js/expression-legacy-metric branch from fc2239b to a4b3b7c Compare February 7, 2025 10:38
@mariairiartef mariairiartef added the technical debt Improvement of the software architecture and operational architecture label Feb 10, 2025
@mariairiartef mariairiartef changed the title [Lens] Replace expression legacy metric scss [Lens/SCSS] Replace expression legacy metric scss Feb 10, 2025
import { i18n } from '@kbn/i18n';
import { UseEuiTheme } from '@elastic/eui';
import { css } from '@emotion/react';
import { euiTextTruncate } from '@elastic/eui';
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can you move it together with the import above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mariairiartef mariairiartef force-pushed the lens/scss-js/expression-legacy-metric branch from d78d804 to 9415dd5 Compare February 13, 2025 14:59
the legacyMtrVis class is used for styling in observability app
do not use a class in the tests
Copy link
Contributor

@mbondyra mbondyra left a comment

Choose a reason for hiding this comment

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

By removing the legacyMtrVis class we introduced some regression - observability app is targetting this class to give their styling. Plus the class was used in the functional tests. I pushed a small update to this PR and I think we're good to go :)

@mariairiartef mariairiartef enabled auto-merge (squash) March 3, 2025 10:13
@mariairiartef mariairiartef merged commit 8cb484c into elastic:main Mar 3, 2025
9 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.18, 8.x, 9.0

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

@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
expressionLegacyMetricVis 44 27 -17

Async chunks

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

id before after diff
expressionLegacyMetricVis 15.6KB 6.3KB -9.3KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
expressionLegacyMetricVis 10.4KB 10.5KB +157.0B

History

cc @mariairiartef

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 3, 2025
## Summary

Part of elastic#208908

Replaces scss to css-in-js.

### Checklist

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
(cherry picked from commit 8cb484c)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 3, 2025
## Summary

Part of elastic#208908

Replaces scss to css-in-js.

### Checklist

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
(cherry picked from commit 8cb484c)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 3, 2025
## Summary

Part of elastic#208908

Replaces scss to css-in-js.

### Checklist

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
(cherry picked from commit 8cb484c)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.18
8.x
9.0

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Mar 3, 2025
…12885)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Lens/SCSS] Replace expression legacy metric scss
(#209546)](#209546)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Maria
Iriarte","email":"106958839+mariairiartef@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-03-03T11:34:35Z","message":"[Lens/SCSS]
Replace expression legacy metric scss (#209546)\n\n## Summary\n\nPart of
https://github.com/elastic/kibana/issues/208908\n\nReplaces scss to
css-in-js.\n\n### Checklist\n\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Marta Bondyra
<4283304+mbondyra@users.noreply.github.com>","sha":"8cb484cb8da605a3fbd3b11a7e89a2a921091c9d","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["technical
debt","Team:Visualizations","release_note:skip","Feature:Lens","v9.0.0","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Lens/SCSS]
Replace expression legacy metric
scss","number":209546,"url":"https://github.com/elastic/kibana/pull/209546","mergeCommit":{"message":"[Lens/SCSS]
Replace expression legacy metric scss (#209546)\n\n## Summary\n\nPart of
https://github.com/elastic/kibana/issues/208908\n\nReplaces scss to
css-in-js.\n\n### Checklist\n\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Marta Bondyra
<4283304+mbondyra@users.noreply.github.com>","sha":"8cb484cb8da605a3fbd3b11a7e89a2a921091c9d"}},"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/209546","number":209546,"mergeCommit":{"message":"[Lens/SCSS]
Replace expression legacy metric scss (#209546)\n\n## Summary\n\nPart of
https://github.com/elastic/kibana/issues/208908\n\nReplaces scss to
css-in-js.\n\n### Checklist\n\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Marta Bondyra
<4283304+mbondyra@users.noreply.github.com>","sha":"8cb484cb8da605a3fbd3b11a7e89a2a921091c9d"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Maria Iriarte <106958839+mariairiartef@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Mar 3, 2025
…212883)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[Lens/SCSS] Replace expression legacy metric scss
(#209546)](#209546)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Maria
Iriarte","email":"106958839+mariairiartef@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-03-03T11:34:35Z","message":"[Lens/SCSS]
Replace expression legacy metric scss (#209546)\n\n## Summary\n\nPart of
https://github.com/elastic/kibana/issues/208908\n\nReplaces scss to
css-in-js.\n\n### Checklist\n\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Marta Bondyra
<4283304+mbondyra@users.noreply.github.com>","sha":"8cb484cb8da605a3fbd3b11a7e89a2a921091c9d","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["technical
debt","Team:Visualizations","release_note:skip","Feature:Lens","v9.0.0","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Lens/SCSS]
Replace expression legacy metric
scss","number":209546,"url":"https://github.com/elastic/kibana/pull/209546","mergeCommit":{"message":"[Lens/SCSS]
Replace expression legacy metric scss (#209546)\n\n## Summary\n\nPart of
https://github.com/elastic/kibana/issues/208908\n\nReplaces scss to
css-in-js.\n\n### Checklist\n\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Marta Bondyra
<4283304+mbondyra@users.noreply.github.com>","sha":"8cb484cb8da605a3fbd3b11a7e89a2a921091c9d"}},"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/209546","number":209546,"mergeCommit":{"message":"[Lens/SCSS]
Replace expression legacy metric scss (#209546)\n\n## Summary\n\nPart of
https://github.com/elastic/kibana/issues/208908\n\nReplaces scss to
css-in-js.\n\n### Checklist\n\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Marta Bondyra
<4283304+mbondyra@users.noreply.github.com>","sha":"8cb484cb8da605a3fbd3b11a7e89a2a921091c9d"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Maria Iriarte <106958839+mariairiartef@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Mar 3, 2025
…12884)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Lens/SCSS] Replace expression legacy metric scss
(#209546)](#209546)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Maria
Iriarte","email":"106958839+mariairiartef@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-03-03T11:34:35Z","message":"[Lens/SCSS]
Replace expression legacy metric scss (#209546)\n\n## Summary\n\nPart of
https://github.com/elastic/kibana/issues/208908\n\nReplaces scss to
css-in-js.\n\n### Checklist\n\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Marta Bondyra
<4283304+mbondyra@users.noreply.github.com>","sha":"8cb484cb8da605a3fbd3b11a7e89a2a921091c9d","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["technical
debt","Team:Visualizations","release_note:skip","Feature:Lens","v9.0.0","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Lens/SCSS]
Replace expression legacy metric
scss","number":209546,"url":"https://github.com/elastic/kibana/pull/209546","mergeCommit":{"message":"[Lens/SCSS]
Replace expression legacy metric scss (#209546)\n\n## Summary\n\nPart of
https://github.com/elastic/kibana/issues/208908\n\nReplaces scss to
css-in-js.\n\n### Checklist\n\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Marta Bondyra
<4283304+mbondyra@users.noreply.github.com>","sha":"8cb484cb8da605a3fbd3b11a7e89a2a921091c9d"}},"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/209546","number":209546,"mergeCommit":{"message":"[Lens/SCSS]
Replace expression legacy metric scss (#209546)\n\n## Summary\n\nPart of
https://github.com/elastic/kibana/issues/208908\n\nReplaces scss to
css-in-js.\n\n### Checklist\n\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Marta Bondyra
<4283304+mbondyra@users.noreply.github.com>","sha":"8cb484cb8da605a3fbd3b11a7e89a2a921091c9d"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Maria Iriarte <106958839+mariairiartef@users.noreply.github.com>
SoniaSanzV pushed a commit to SoniaSanzV/kibana that referenced this pull request Mar 4, 2025
…) (elastic#212884)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Lens/SCSS] Replace expression legacy metric scss
(elastic#209546)](elastic#209546)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Maria
Iriarte","email":"106958839+mariairiartef@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-03-03T11:34:35Z","message":"[Lens/SCSS]
Replace expression legacy metric scss (elastic#209546)\n\n## Summary\n\nPart of
https://github.com/elastic/kibana/issues/208908\n\nReplaces scss to
css-in-js.\n\n### Checklist\n\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Marta Bondyra
<4283304+mbondyra@users.noreply.github.com>","sha":"8cb484cb8da605a3fbd3b11a7e89a2a921091c9d","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["technical
debt","Team:Visualizations","release_note:skip","Feature:Lens","v9.0.0","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Lens/SCSS]
Replace expression legacy metric
scss","number":209546,"url":"https://github.com/elastic/kibana/pull/209546","mergeCommit":{"message":"[Lens/SCSS]
Replace expression legacy metric scss (elastic#209546)\n\n## Summary\n\nPart of
https://github.com/elastic/kibana/issues/208908\n\nReplaces scss to
css-in-js.\n\n### Checklist\n\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Marta Bondyra
<4283304+mbondyra@users.noreply.github.com>","sha":"8cb484cb8da605a3fbd3b11a7e89a2a921091c9d"}},"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/209546","number":209546,"mergeCommit":{"message":"[Lens/SCSS]
Replace expression legacy metric scss (elastic#209546)\n\n## Summary\n\nPart of
https://github.com/elastic/kibana/issues/208908\n\nReplaces scss to
css-in-js.\n\n### Checklist\n\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Marta Bondyra
<4283304+mbondyra@users.noreply.github.com>","sha":"8cb484cb8da605a3fbd3b11a7e89a2a921091c9d"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Maria Iriarte <106958839+mariairiartef@users.noreply.github.com>
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 Feature:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure technical debt Improvement of the software architecture and operational architecture v8.18.0 v8.19.0 v9.0.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants