Skip to content

[Visualizations] Migrate vislib scss files to Emotion#228979

Merged
andrimal merged 11 commits intoelastic:mainfrom
andrimal:vis/vislib/scss-js/221885
Aug 1, 2025
Merged

[Visualizations] Migrate vislib scss files to Emotion#228979
andrimal merged 11 commits intoelastic:mainfrom
andrimal:vis/vislib/scss-js/221885

Conversation

@andrimal
Copy link
Contributor

@andrimal andrimal commented Jul 22, 2025

Summary

Fix #221885

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

Old vislib chart

  • src/platform/plugins/private/vis_types/vislib/public/index.scss
  • src/platform/plugins/private/vis_types/vislib/public/vislib/_index.scss
  • src/platform/plugins/private/vis_types/vislib/public/vislib/_variables.scss
  • src/platform/plugins/private/vis_types/vislib/public/vislib/_vislib_vis_type.scss
  • src/platform/plugins/private/vis_types/vislib/public/vislib/components/legend/_index.scss
  • src/platform/plugins/private/vis_types/vislib/public/vislib/components/legend/_legend.scss
  • src/platform/plugins/private/vis_types/vislib/public/vislib/components/tooltip/_index.scss
  • src/platform/plugins/private/vis_types/vislib/public/vislib/components/tooltip/_tooltip.scss
  • src/platform/plugins/private/vis_types/vislib/public/vislib/lib/_index.scss
  • src/platform/plugins/private/vis_types/vislib/public/vislib/lib/layout/_index.scss
  • src/platform/plugins/private/vis_types/vislib/public/vislib/lib/layout/_layout.scss
  • src/platform/plugins/private/vis_types/vislib/public/vislib/visualizations/gauges/_index.scss
  • src/platform/plugins/private/vis_types/vislib/public/vislib/visualizations/gauges/_meter.scss

Tooltip changes

The tooltip styles in the _tooltip.scss file apply to the legacy heatmap chart. Here the euiToolTipStyle mixin was used.
For this migration:

  • The colors were changed and a border was added on purpose to match the xy tooltip style introduced during this migration: [Lens/SCSS] Migrate tooltip.scss file #215702
  • The rest of the necessary styles were copied from the euiTooltipStyle

Before

  • light:
Screenshot 2025-07-29 at 4 12 45 PM Screenshot 2025-07-29 at 3 44 50 PM
  • dark:
Screenshot 2025-07-29 at 4 13 32 PM Screenshot 2025-07-29 at 5 17 53 PM

After

  • light:
Screenshot 2025-07-29 at 4 12 50 PM Screenshot 2025-07-29 at 3 44 57 PM
  • dark:
Screenshot 2025-07-29 at 4 13 20 PM Screenshot 2025-07-29 at 3 51 01 PM

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Unit or functional tests were updated or added to match the most common scenarios
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

@andrimal andrimal added Feature:Vislib Vislib chart implementation 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:skip This PR does not require backporting scss-removal labels Jul 22, 2025

.vislib--legend-bottom & {
margin-left: ${euiThemeContext.euiTheme.size.l};
margin-left: ${euiThemeContext.euiTheme.size.xl};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was increased on purpose.

  • Before:
Screenshot 2025-07-24 at 5 18 00 PM
  • After:
Screenshot 2025-07-24 at 5 25 39 PM

@andrimal andrimal marked this pull request as ready for review July 30, 2025 14:08
@andrimal andrimal requested review from a team as code owners July 30, 2025 14:08
@elasticmachine
Copy link
Contributor

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

@mariairiartef mariairiartef self-requested a review July 31, 2025 08:40
Copy link
Contributor

@ryankeairns ryankeairns left a comment

Choose a reason for hiding this comment

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

SCSS files deleted; styles migrated

Copy link
Contributor

@mariairiartef mariairiartef left a comment

Choose a reason for hiding this comment

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

I tested locally I didn't find issues, thanks for taking care of this 🙌🏻

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
visTypeVislib 178 170 -8

Async chunks

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

id before after diff
visTypeVislib 365.9KB 354.4KB -11.5KB

Page load bundle

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

id before after diff
visTypeVislib 13.0KB 13.0KB -14.0B

History

@andrimal andrimal merged commit 7ef1fe6 into elastic:main Aug 1, 2025
12 checks passed
szaffarano pushed a commit to szaffarano/kibana that referenced this pull request Aug 5, 2025
## Summary
Fix elastic#221885 

Migrates the below files to Emotion CSS-in-JS: 
### Old vislib chart
- `src/platform/plugins/private/vis_types/vislib/public/index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/_index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/_variables.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/_vislib_vis_type.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/components/legend/_index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/components/legend/_legend.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/components/tooltip/_index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/components/tooltip/_tooltip.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/lib/_index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/lib/layout/_index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/lib/layout/_layout.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/visualizations/gauges/_index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/visualizations/gauges/_meter.scss`

## Tooltip changes
The tooltip styles in the `_tooltip.scss` file apply to the legacy
heatmap chart. Here the
[euiToolTipStyle](https://github.com/elastic/eui/blob/main/packages/eui/src/global_styling/mixins/_tool_tip.scss)
mixin was used.
For this migration: 
- The colors were changed and a border was added on purpose to match the
xy tooltip style introduced during this migration:
elastic#215702
- The rest of the necessary styles were copied from the
`euiTooltipStyle`

### Before 
- light:
<img width="373" height="171" alt="Screenshot 2025-07-29 at 4 12 45 PM"
src="https://github.com/user-attachments/assets/81080d2c-bb90-44c9-bad6-fdb3222a4548"
/>
<img width="391" height="232" alt="Screenshot 2025-07-29 at 3 44 50 PM"
src="https://github.com/user-attachments/assets/df876bd2-5bd5-4baf-8352-2efc605e023c"
/>

- dark: 
<img width="291" height="162" alt="Screenshot 2025-07-29 at 4 13 32 PM"
src="https://github.com/user-attachments/assets/1cb6b64e-a5e6-4cec-b6ea-f75c0d9cca63"
/>
<img width="348" height="198" alt="Screenshot 2025-07-29 at 5 17 53 PM"
src="https://github.com/user-attachments/assets/4569e14a-e738-40d7-a941-b23d6166b0f0"
/>

### After 
- light: 
<img width="323" height="144" alt="Screenshot 2025-07-29 at 4 12 50 PM"
src="https://github.com/user-attachments/assets/6719b7ee-810b-48e6-9cc1-06b170c48220"
/>
<img width="387" height="189" alt="Screenshot 2025-07-29 at 3 44 57 PM"
src="https://github.com/user-attachments/assets/a2f713f8-7bd0-42e1-9e39-11c7133fe74b"
/>

- dark:
<img width="256" height="127" alt="Screenshot 2025-07-29 at 4 13 20 PM"
src="https://github.com/user-attachments/assets/47534025-541e-4b2f-88d5-720b13601830"
/>
<img width="381" height="207" alt="Screenshot 2025-07-29 at 3 51 01 PM"
src="https://github.com/user-attachments/assets/9ffc6dd4-60ca-4295-a4ad-f2390b2da57f"
/>

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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
- [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)
delanni pushed a commit to delanni/kibana that referenced this pull request Aug 5, 2025
## Summary
Fix elastic#221885 

Migrates the below files to Emotion CSS-in-JS: 
### Old vislib chart
- `src/platform/plugins/private/vis_types/vislib/public/index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/_index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/_variables.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/_vislib_vis_type.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/components/legend/_index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/components/legend/_legend.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/components/tooltip/_index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/components/tooltip/_tooltip.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/lib/_index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/lib/layout/_index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/lib/layout/_layout.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/visualizations/gauges/_index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/visualizations/gauges/_meter.scss`

## Tooltip changes
The tooltip styles in the `_tooltip.scss` file apply to the legacy
heatmap chart. Here the
[euiToolTipStyle](https://github.com/elastic/eui/blob/main/packages/eui/src/global_styling/mixins/_tool_tip.scss)
mixin was used.
For this migration: 
- The colors were changed and a border was added on purpose to match the
xy tooltip style introduced during this migration:
elastic#215702
- The rest of the necessary styles were copied from the
`euiTooltipStyle`

### Before 
- light:
<img width="373" height="171" alt="Screenshot 2025-07-29 at 4 12 45 PM"
src="https://github.com/user-attachments/assets/81080d2c-bb90-44c9-bad6-fdb3222a4548"
/>
<img width="391" height="232" alt="Screenshot 2025-07-29 at 3 44 50 PM"
src="https://github.com/user-attachments/assets/df876bd2-5bd5-4baf-8352-2efc605e023c"
/>

- dark: 
<img width="291" height="162" alt="Screenshot 2025-07-29 at 4 13 32 PM"
src="https://github.com/user-attachments/assets/1cb6b64e-a5e6-4cec-b6ea-f75c0d9cca63"
/>
<img width="348" height="198" alt="Screenshot 2025-07-29 at 5 17 53 PM"
src="https://github.com/user-attachments/assets/4569e14a-e738-40d7-a941-b23d6166b0f0"
/>

### After 
- light: 
<img width="323" height="144" alt="Screenshot 2025-07-29 at 4 12 50 PM"
src="https://github.com/user-attachments/assets/6719b7ee-810b-48e6-9cc1-06b170c48220"
/>
<img width="387" height="189" alt="Screenshot 2025-07-29 at 3 44 57 PM"
src="https://github.com/user-attachments/assets/a2f713f8-7bd0-42e1-9e39-11c7133fe74b"
/>

- dark:
<img width="256" height="127" alt="Screenshot 2025-07-29 at 4 13 20 PM"
src="https://github.com/user-attachments/assets/47534025-541e-4b2f-88d5-720b13601830"
/>
<img width="381" height="207" alt="Screenshot 2025-07-29 at 3 51 01 PM"
src="https://github.com/user-attachments/assets/9ffc6dd4-60ca-4295-a4ad-f2390b2da57f"
/>

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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
- [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)
@wildemat wildemat mentioned this pull request Aug 7, 2025
10 tasks
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Aug 18, 2025
## Summary
Fix elastic#221885 

Migrates the below files to Emotion CSS-in-JS: 
### Old vislib chart
- `src/platform/plugins/private/vis_types/vislib/public/index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/_index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/_variables.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/_vislib_vis_type.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/components/legend/_index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/components/legend/_legend.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/components/tooltip/_index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/components/tooltip/_tooltip.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/lib/_index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/lib/layout/_index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/lib/layout/_layout.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/visualizations/gauges/_index.scss`
-
`src/platform/plugins/private/vis_types/vislib/public/vislib/visualizations/gauges/_meter.scss`

## Tooltip changes
The tooltip styles in the `_tooltip.scss` file apply to the legacy
heatmap chart. Here the
[euiToolTipStyle](https://github.com/elastic/eui/blob/main/packages/eui/src/global_styling/mixins/_tool_tip.scss)
mixin was used.
For this migration: 
- The colors were changed and a border was added on purpose to match the
xy tooltip style introduced during this migration:
elastic#215702
- The rest of the necessary styles were copied from the
`euiTooltipStyle`

### Before 
- light:
<img width="373" height="171" alt="Screenshot 2025-07-29 at 4 12 45 PM"
src="https://github.com/user-attachments/assets/81080d2c-bb90-44c9-bad6-fdb3222a4548"
/>
<img width="391" height="232" alt="Screenshot 2025-07-29 at 3 44 50 PM"
src="https://github.com/user-attachments/assets/df876bd2-5bd5-4baf-8352-2efc605e023c"
/>

- dark: 
<img width="291" height="162" alt="Screenshot 2025-07-29 at 4 13 32 PM"
src="https://github.com/user-attachments/assets/1cb6b64e-a5e6-4cec-b6ea-f75c0d9cca63"
/>
<img width="348" height="198" alt="Screenshot 2025-07-29 at 5 17 53 PM"
src="https://github.com/user-attachments/assets/4569e14a-e738-40d7-a941-b23d6166b0f0"
/>

### After 
- light: 
<img width="323" height="144" alt="Screenshot 2025-07-29 at 4 12 50 PM"
src="https://github.com/user-attachments/assets/6719b7ee-810b-48e6-9cc1-06b170c48220"
/>
<img width="387" height="189" alt="Screenshot 2025-07-29 at 3 44 57 PM"
src="https://github.com/user-attachments/assets/a2f713f8-7bd0-42e1-9e39-11c7133fe74b"
/>

- dark:
<img width="256" height="127" alt="Screenshot 2025-07-29 at 4 13 20 PM"
src="https://github.com/user-attachments/assets/47534025-541e-4b2f-88d5-720b13601830"
/>
<img width="381" height="207" alt="Screenshot 2025-07-29 at 3 51 01 PM"
src="https://github.com/user-attachments/assets/9ffc6dd4-60ca-4295-a4ad-f2390b2da57f"
/>

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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
- [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:skip This PR does not require backporting Feature:Vislib Vislib chart implementation 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 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Visualizations] Replace SCSS with CSS-in-JS Part 5

5 participants