[8.x] [Lens/SCSS] Migrate tooltip.scss file (#215702)#216862
Merged
kibanamachine merged 1 commit intoelastic:8.xfrom Apr 2, 2025
Merged
[8.x] [Lens/SCSS] Migrate tooltip.scss file (#215702)#216862kibanamachine merged 1 commit intoelastic:8.xfrom
tooltip.scss file (#215702)#216862kibanamachine merged 1 commit intoelastic:8.xfrom
Conversation
## Summary Part of elastic#208908 Replaces `tooltip.scss` file to css-in-js . ## Considerations We copied the styles found in the [euiToolTipStyle](https://github.com/elastic/eui/blob/80dacb3dcc21120e28efdfcf267e5fdfee84b692/packages/eui/src/global_styling/mixins/_tool_tip.scss#L1) mixing that the .scss file is using the right background and color tokens . <!-- We want to replace `euiToolTipStyle` mixin that we can find in the file that we want to migrate: https://github.com/elastic/kibana/blob/8d81ed4a5b6f540ce9847bdd0477f52d514031b3/src/platform/plugins/shared/chart_expressions/expression_xy/public/components/tooltip/tooltip.scss#L3 We decided to follow a similar approach to the one used here: https://github.com/elastic/kibana/blob/12aa3fc6ca8124db8cf5e940baec121482fd1a4b/x-pack/platform/plugins/shared/ml/public/application/components/chart_tooltip/chart_tooltip_styles.ts#L12 That imports from: https://github.com/elastic/eui/blob/f615b48410ce199e2069b11a84131423d52e7b0f/packages/eui/src/components/tool_tip/tool_tip.styles.ts#L47 However, the styles are not exactly the same as the ones found in the mixing: https://github.com/elastic/eui/blob/80dacb3dcc21120e28efdfcf267e5fdfee84b692/packages/eui/src/global_styling/mixins/_tool_tip.scss#L1 For this reason, we need to override some of the fields e.g. `position: absolute` ➡️ `position: relative`. As we can see in the comparison, the color looks different: --> ### before <img width="304" alt="Screenshot 2025-03-25 at 13 36 01" src="https://github.com/user-attachments/assets/434ae0eb-0895-47a8-b959-624760f14492" /> ### after <!-- <img width="326" alt="Screenshot 2025-03-25 at 13 33 20" src="https://github.com/user-attachments/assets/a172bd05-489d-4396-830a-72e4296328ab" /> --> <img width="297" alt="Screenshot 2025-03-26 at 11 31 22" src="https://github.com/user-attachments/assets/cd7727ff-764c-4bbe-b863-aa1ee01639bd" /> ## 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: Marco Vettorello <marco.vettorello@elastic.co> Co-authored-by: Marco Liberati <dej611@users.noreply.github.com> (cherry picked from commit 972da88)
1 task
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
Page load bundle
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto8.x:tooltip.scssfile (#215702)Questions ?
Please refer to the Backport tool documentation