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] Align Lens style with Borealis #204839

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

markov00
Copy link
Member

Summary

This PR updates the style of Lens to align it with the new Borealis theme.
It covers the set of tasks in #203050 within the Lens editor panels list.

Comments are applied in order as in the mentioned issue

@markov00 markov00 added Team:Visualizations Visualization editors, elastic-charts and infrastructure release_note:skip Skip the PR/issue when compiling release notes Feature:Lens backport:skip This commit does not require backporting v9.0.0 EUI Visual Refresh labels Dec 18, 2024
Copy link
Contributor

@mgadewoll mgadewoll left a comment

Choose a reason for hiding this comment

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

ℹ️ Adding an early review due to upcoming PTO.

@markov00 markov00 marked this pull request as ready for review January 8, 2025 10:42
@markov00 markov00 requested review from a team as code owners January 8, 2025 10:42
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@dej611 dej611 left a comment

Choose a reason for hiding this comment

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

Checked locally and works fine.
It matches all the requested changes.

@markov00 markov00 force-pushed the 2024_12_16-align_borealis branch from fd3ebde to 3192c14 Compare January 8, 2025 14:26
@markov00 markov00 requested a review from a team as a code owner January 8, 2025 14:26
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

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

id before after diff
discover 785.0KB 785.0KB +1.0B
eventAnnotationListing 231.0KB 231.0KB -78.0B
lens 1.5MB 1.5MB +938.0B
securitySolution 22.2MB 22.2MB +1.0B
total +862.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
@kbn/coloring 2 3 +1

Total ESLint disabled count

id before after diff
@kbn/coloring 2 3 +1

History

Copy link
Contributor

@MichaelMarcialis MichaelMarcialis left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together, @markov00. It looks great. I left a few small comments below. Once those are addressed, I think this is good to go.

@@ -47,6 +49,11 @@ export function PaletteColors({
? neutralPalette.getColor(color.colorIndex)
: palettes.get(color.paletteId).getColor(color.colorIndex)
: color.colorCode;
const selectedColorSwatchStyle = {
outline: 'currentcolor solid 2px',
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make sense to use a token for the outline thickness here? Something like euiTheme.border.width.thick?

@@ -47,6 +49,11 @@ export function PaletteColors({
? neutralPalette.getColor(color.colorIndex)
: palettes.get(color.paletteId).getColor(color.colorIndex)
: color.colorCode;
const selectedColorSwatchStyle = {
outline: 'currentcolor solid 2px',
outlineOffset: '-1px',
Copy link
Contributor

Choose a reason for hiding this comment

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

Same question here. Would applying a negative to the euiTheme.border.width.thin token make sense here?

@@ -40,17 +40,17 @@ $domDragDropZLevel3: 3;

// Style for drop area when there's an item being dragged
@mixin mixinDomDroppableActive($borderWidth: $euiBorderWidthThin) {
background-color: transparentize($euiColorVis0, .9) !important;
background-color: transparentize($euiColorSuccess, .9) !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than applying transparency to $euiColorSuccess, would it be better to use $euiColorBackgroundBaseSuccess here?

}
}

// Style for drop area while hovering with item
@mixin mixinDomDroppableHover($borderWidth: $euiBorderWidthThin) {
background-color: transparentize($euiColorVis0, .75) !important;
background-color: transparentize($euiColorSuccess, .75) !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than applying transparency to $euiColorSuccess, would it be better to use $euiColorBackgroundLightSuccess here?

@@ -51,14 +51,14 @@
}

.domDroppable--incompatible:not(.domDroppable__overlayWrapper) {
background-color: $euiColorHighlight !important;
background-color: transparentize($euiColorWarning, .9) !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than applying transparency to $euiColorWarning, would it be better to use $euiColorBackgroundBaseWarning here?

Copy link
Contributor

Choose a reason for hiding this comment

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

On line 180, we're currently using background-color: transparentize($euiColorVis0, .75); to color the reorderable drop zone for dimension items. Similar to the previous comments, can we instead use $euiColorBackgroundBaseSuccess (when not hovering with a droppable item) and $euiColorBackgroundLightSuccess (when hovering with a droppable item) with no transparency?

&:before {
border-color: $euiColorVis0 !important;
border-color: $euiColorSuccess !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this variable should be changed to $euiColorBorderBaseSuccess. Please note that this variable may be bugged/erroneous at the moment, but the EUI team is working on a PR to remedy it.

&:before {
border-color: $euiColorVis0 !important;
border-color: $euiColorSuccess !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this variable should be changed to $euiColorBorderBaseSuccess. Please note that this variable may be bugged/erroneous at the moment, but the EUI team is working on a PR to remedy it.

Copy link
Contributor

@mgadewoll mgadewoll Jan 8, 2025

Choose a reason for hiding this comment

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

ℹ️ $euiColorBorderBaseSuccess should work fine, but $euiColorBorderStrongSuccess required a fix 🐛 (that applies for all "strong" border tokens, base tokens should be ok)

&:before {
border: $euiBorderWidthThin dashed $euiColorVis5 !important;
border: $euiBorderWidthThin dashed $euiColorWarning !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this border color variable should be changed to $euiColorBorderBaseWarning. Please note that this variable may be bugged/erroneous at the moment, but the EUI team is working on a PR to remedy it.

&:before {
border-color: $euiColorVis5 !important;
border-color: $euiColorWarning !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this variable should be changed to $euiColorBorderBaseWarning. Please note that this variable may be bugged/erroneous at the moment, but the EUI team is working on a PR to remedy it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting EUI Visual Refresh Feature:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants