Skip to content

[TSVB/SCSS] Migrate all remaining .scss styles to Emotion CSS-in-JS#221484

Merged
mariairiartef merged 16 commits intoelastic:mainfrom
mariairiartef:tsvb/scss-js/variables
May 30, 2025
Merged

[TSVB/SCSS] Migrate all remaining .scss styles to Emotion CSS-in-JS#221484
mariairiartef merged 16 commits intoelastic:mainfrom
mariairiartef:tsvb/scss-js/variables

Conversation

@mariairiartef
Copy link
Contributor

@mariairiartef mariairiartef commented May 26, 2025

Summary

Part of #220095

Migrates the following files to Emotion CSS-in-JS:

  • _gauge.scss
  • _metric.scss
  • _top_n.scss
  • _variables.scss
  • _error.scss
  • _vis_editor_visualization.scss
  • _panel_config.scss

Considerations

For details on considerations, read this.

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 May 26, 2025
@mariairiartef mariairiartef added Feature:TSVB TSVB (Time Series Visual Builder) technical debt Improvement of the software architecture and operational architecture Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels v9.1.0 v8.19.0 scss-removal labels May 26, 2025
@mariairiartef mariairiartef marked this pull request as ready for review May 27, 2025 10:50
@mariairiartef mariairiartef requested review from a team as code owners May 27, 2025 10:50
@elasticmachine
Copy link
Contributor

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

@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
visTypeTimeseries 481 467 -14

Async chunks

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

id before after diff
visTypeTimeseries 451.4KB 446.9KB -4.5KB

cc @mariairiartef

Copy link
Contributor

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

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

Perfect!

Comment on lines +121 to +123
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you doing this instead of euiTextTruncate() because of the createReversedStyles thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really. You can either add eui-textTruncate class or import { euiTextTruncate } from '@elastic/eui'; and use it as css={euiTextTruncate()}. However, in this case I directly copied the styles.

@mariairiartef mariairiartef changed the title [TSVB/SCSS] Migrate gauge, metric, top N and variables .scss files [TSVB/SCSS] Migrate all remaining .scss styles to Emotion CSS-in-JS May 30, 2025
@mariairiartef mariairiartef enabled auto-merge (squash) May 30, 2025 14:56
@mariairiartef mariairiartef merged commit 9872638 into elastic:main May 30, 2025
10 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

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

@kibanamachine
Copy link
Contributor

mariairiartef added a commit to mariairiartef/kibana that referenced this pull request Jun 3, 2025
…elastic#221484)

## Summary

Part of elastic#220095

Migrates the following files to Emotion CSS-in-JS:
- `_gauge.scss`
- `_metric.scss`
- `_top_n.scss`
- `_variables.scss`
- `_error.scss`
- `_vis_editor_visualization.scss`
- `_panel_config.scss`

### Considerations

For details on considerations, read
[this](elastic#220095 (comment)).

### 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)

(cherry picked from commit 9872638)

# Conflicts:
#	src/platform/plugins/private/vis_types/timeseries/public/application/components/_error.scss
#	src/platform/plugins/private/vis_types/timeseries/public/application/components/_vis_editor_visualization.scss
#	src/platform/plugins/private/vis_types/timeseries/public/application/components/panel_config/_panel_config.scss
#	src/platform/plugins/private/vis_types/timeseries/public/application/components/panel_config/_panel_config.ts
#	src/platform/plugins/private/vis_types/timeseries/public/application/visualizations/views/_gauge.scss
#	src/platform/plugins/private/vis_types/timeseries/public/application/visualizations/views/_metric.scss
#	src/platform/plugins/private/vis_types/timeseries/public/application/visualizations/views/_top_n.scss
#	src/platform/plugins/private/vis_types/timeseries/public/application/visualizations/views/_variables.scss
#	src/platform/plugins/private/vis_types/timeseries/public/application/visualizations/views/_variables.ts
@mariairiartef
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.19

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

Questions ?

Please refer to the Backport tool documentation

mariairiartef added a commit that referenced this pull request Jun 3, 2025
…S-in-JS (#221484) (#222362)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[TSVB/SCSS] Migrate all remaining `.scss` styles to Emotion CSS-in-JS
(#221484)](#221484)

<!--- Backport version: 10.0.0 -->

### 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-05-30T16:02:03Z","message":"[TSVB/SCSS]
Migrate all remaining `.scss` styles to Emotion CSS-in-JS
(#221484)\n\n## Summary\n\nPart of
https://github.com/elastic/kibana/issues/220095\n\nMigrates the
following files to Emotion CSS-in-JS:\n- `_gauge.scss`\n-
`_metric.scss`\n- `_top_n.scss` \n- `_variables.scss`\n-
`_error.scss`\n- `_vis_editor_visualization.scss`\n-
`_panel_config.scss`\n\n### Considerations\n\nFor details on
considerations,
read\n[this](https://github.com/elastic/kibana/issues/220095#issuecomment-2911737679).\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)","sha":"98726383a4b1359a85480846585ac24b0c60d995","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:TSVB","technical
debt","Team:Visualizations","release_note:skip","backport:version","v9.1.0","v8.19.0","scss-removal"],"title":"[TSVB/SCSS]
Migrate all remaining `.scss` styles to Emotion
CSS-in-JS","number":221484,"url":"https://github.com/elastic/kibana/pull/221484","mergeCommit":{"message":"[TSVB/SCSS]
Migrate all remaining `.scss` styles to Emotion CSS-in-JS
(#221484)\n\n## Summary\n\nPart of
https://github.com/elastic/kibana/issues/220095\n\nMigrates the
following files to Emotion CSS-in-JS:\n- `_gauge.scss`\n-
`_metric.scss`\n- `_top_n.scss` \n- `_variables.scss`\n-
`_error.scss`\n- `_vis_editor_visualization.scss`\n-
`_panel_config.scss`\n\n### Considerations\n\nFor details on
considerations,
read\n[this](https://github.com/elastic/kibana/issues/220095#issuecomment-2911737679).\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)","sha":"98726383a4b1359a85480846585ac24b0c60d995"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/221484","number":221484,"mergeCommit":{"message":"[TSVB/SCSS]
Migrate all remaining `.scss` styles to Emotion CSS-in-JS
(#221484)\n\n## Summary\n\nPart of
https://github.com/elastic/kibana/issues/220095\n\nMigrates the
following files to Emotion CSS-in-JS:\n- `_gauge.scss`\n-
`_metric.scss`\n- `_top_n.scss` \n- `_variables.scss`\n-
`_error.scss`\n- `_vis_editor_visualization.scss`\n-
`_panel_config.scss`\n\n### Considerations\n\nFor details on
considerations,
read\n[this](https://github.com/elastic/kibana/issues/220095#issuecomment-2911737679).\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)","sha":"98726383a4b1359a85480846585ac24b0c60d995"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
zacharyparikh pushed a commit to zacharyparikh/kibana that referenced this pull request Jun 4, 2025
…elastic#221484)

## Summary

Part of elastic#220095

Migrates the following files to Emotion CSS-in-JS:
- `_gauge.scss`
- `_metric.scss`
- `_top_n.scss` 
- `_variables.scss`
- `_error.scss`
- `_vis_editor_visualization.scss`
- `_panel_config.scss`

### Considerations

For details on considerations, read
[this](elastic#220095 (comment)).

### 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)
nickpeihl pushed a commit to nickpeihl/kibana that referenced this pull request Jun 12, 2025
…elastic#221484)

## Summary

Part of elastic#220095

Migrates the following files to Emotion CSS-in-JS:
- `_gauge.scss`
- `_metric.scss`
- `_top_n.scss` 
- `_variables.scss`
- `_error.scss`
- `_vis_editor_visualization.scss`
- `_panel_config.scss`

### Considerations

For details on considerations, read
[this](elastic#220095 (comment)).

### 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)
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:TSVB TSVB (Time Series Visual Builder) release_note:skip Skip the PR/issue when compiling release notes scss-removal Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// technical debt Improvement of the software architecture and operational architecture v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants