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.
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
[Observability] fix slo observability compressed styles to be not compressed #193081
Changes from 5 commits
2fb8a5a
67ea6a2
cf01d44
c9d3ffe
0b6fbc0
8c45a2a
5354eb0
e590230
caa0bf2
7f0d2f3
2831847
a722e87
913f0ff
bb6a928
451d33c
c9a2d59
4cf021a
cf410d8
9c60c87
83da3f5
02f6a67
9e32829
c986f23
ad6ee2c
899b248
adc1846
bb77b0d
b21f593
00c0670
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.