-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[Observability] fix slo observability compressed styles to be not compressed #193081
Open
rshen91
wants to merge
10
commits into
elastic:main
Choose a base branch
from
rshen91:slo-non-compressed
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2fb8a5a
fix slo observability compressed styles to be not compressed
rshen91 67ea6a2
remove sass changes from controls plugin
rshen91 cf01d44
update
rshen91 c9d3ffe
fix
rshen91 0b6fbc0
Merge remote-tracking branch 'upstream/main' into slo-non-compressed
rshen91 8c45a2a
code review
rshen91 5354eb0
Merge remote-tracking branch 'upstream/main' into slo-non-compressed
rshen91 e590230
Merge remote-tracking branch 'upstream/main' into slo-non-compressed
rshen91 caa0bf2
code review sass clean up
rshen91 7f0d2f3
Merge remote-tracking branch 'origin/slo-non-compressed' into slo-non…
rshen91 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
update
- Loading branch information
commit cf01d44059d8d57ff5200381e402546c0f99c8ec
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
48 changes: 41 additions & 7 deletions
48
...plugins/observability_solution/slo/public/pages/slos/components/common/quick_filters.scss
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,60 @@ | ||
.controlsWrapper { | ||
Heenawter marked this conversation as resolved.
Show resolved
Hide resolved
|
||
min-height: $euiSize * 4; | ||
} | ||
|
||
.controlsFrame__draggable { | ||
height: $euiButtonHeight; | ||
height: $euiButtonHeight !important; | ||
} | ||
|
||
.optionsList--filterBtn { | ||
height: $euiButtonHeight; | ||
.optionsList--filterBtn, .euiFilterButton { | ||
height: $euiButtonHeight !important; | ||
} | ||
|
||
.euiFilterGroup { | ||
height: $euiButtonHeight !important; | ||
border-radius: $euiFormControlBorderRadius !important; | ||
} | ||
|
||
.controlPanel { | ||
height: $euiButtonHeight; | ||
height: $euiButtonHeight !important; | ||
|
||
.euiDualRange, .euiRange { | ||
height: $euiButtonHeight !important; | ||
} | ||
|
||
&--labelWrapper { | ||
height: 100%; | ||
height: 100% !important; | ||
} | ||
|
||
.controlPanel--label { | ||
height: 100%; | ||
height: 100% !important; | ||
} | ||
} | ||
|
||
.dshDashboardViewport-controls { | ||
Heenawter marked this conversation as resolved.
Show resolved
Hide resolved
|
||
padding-bottom: $euiSizeXS; | ||
} | ||
} | ||
|
||
.euiFlexGroup { | ||
height: $euiButtonHeight; | ||
} | ||
|
||
.euiFormControlLayout, .euiFormControlLayout--group, .controlFrame__formControlLayout, .optionsListControl { | ||
height: $euiButtonHeight !important; | ||
} | ||
|
||
.optionsListControl { | ||
height: $euiButtonHeight !important; | ||
} | ||
|
||
.--group { | ||
height: $euiButtonHeight !important; | ||
} | ||
|
||
.controlFrame__formControlLayout { | ||
height: $euiButtonHeight !important; | ||
} | ||
|
||
&.-compresed { | ||
height: $euiButtonHeight !important; | ||
} |
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shahzad31 Can you confirm that it is just the SLO page that should have non-compressed styling?
From my understanding, only the SLO page's controls should be impacted - but right now, the
Alerts
page also uses thisQuickFilters
component, so the styles have been expanded here, too (and I believe they explicitly prefer the compact styling).@rshen If possible, I think it would be better to only target the SLO page and not the whole
QuickFilters
component since this is used a lot more places than just SLO.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry - I think this is the SLO page, totally can be misunderstanding though 😶🌫️ ?
x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/quick_filters.scss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i still honestly don't understand why these custom styles are kept in SLO plugin, they should be moved where the control components are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rshen91 One solution to remove custom styles from SLO would be to add a
compressed
prop toControlGroupRenderer
. Then,ControlGroupRenderer
could passcompressed
to control group embeddable by adding acompressed
boolean in the parent returned fromReactEmbeddableRenderer.getParentApi
. Finally, the control group embeddable could use compressed styles if the parentApi containscompressed
key wheretypeof parentApi.compressed === boolean && parentApi.compressed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rshen91 @shahzad31 fyi What @nreese is describing is a potential solution for #189939 that he came up with and we discussed offline :) I think it could work really well for a case like this - we can add a
compressed
prop toControlGroupRenderer
without having to add "serializable state" to the control group, which is what we were originally trying to avoid with these custom styles.I think this is the best plan moving forward - sorry for the back and forth 🙇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is an example for MapRenderer that migrates props from serialized state to parent Api.