-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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][SecuritySolution] Fix to prevent observability style conflict in flyout across plugins #138091
Conversation
Pinging @elastic/unified-observability (Team:Observability) |
@@ -45,7 +45,12 @@ export function AlertsFlyout({ | |||
} | |||
|
|||
return ( | |||
<EuiFlyout onClose={onClose} size="s" data-test-subj="alertsFlyout"> | |||
<EuiFlyout | |||
className="oblt__alert--flyout oblt__flyout" |
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.
Is oblt__alert--flyout
used anywhere?
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.
No, I will remove it. I started with this and then added more generic oblt__flyout
, but forgot to remove this.
.euiFlyout.oblt__flyout, | ||
.euiCollapsibleNav { |
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.
It might make sense to scope euiCollapsibleNav
to oblt__flyout
as well, wdyt?
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 thought so as well but I could not find any instance of EuiCollapsibleNav being used in Observability so I left it alone.
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.
Okay I found that EuiCollapsible is the left sidebar collapsible Menu and this CSS applies to Collapsible menu only and only when Data grid is full screen. But when datagrid is full screen, there is no way to open the collapsible menu. See below screenshot.
So, I guess it will be okay, we do not touch it. because I delete .euiCollapsibleNav
from here, not sure what will break.
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.
Actionable Observability changes LGTM. Tested locally and the flyout worked as expected.
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
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.
Hmm, it seems to me that for localized styles we should be using something other than hand-rolled class names and relying on the CSS cascade. Let me check with our design team to see how we usually handle this and then get back to you ASAP.
Thanks @jasonrhodes for looking into it. |
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.
OK so I've asked around and I think we need to remove these global styles altogether and replace them with something more localized. That said, to unblock you all, I think we can merge the changes as-is and then file a follow up ticket to replace them (with emotion syntax, likely).
Since @fkanout has already approved it from the perspective of the @elastic/actionable-observability team (which owns the alerts page), I'll approve too.
Thanks for your patience!
Great. Thank you.. emotion makes sense to modularize styles. Do you know who can approve on behalf of @elastic/observability-design as it is being shown as the code owner? |
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.
LGTM
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…conflict in flyout across plugins (elastic#138091) * fix to prevent style conflict in flyouts from diff. plugins * remove unnecessary class token (cherry picked from commit 3aa0599)
…conflict in flyout across plugins (elastic#138091) (elastic#138533) * fix to prevent style conflict in flyouts from diff. plugins * remove unnecessary class token (cherry picked from commit 3aa0599) Co-authored-by: Jatin Kathuria <jtn.kathuria@gmail.com>
Fixes #137043
Problem & Fix
Hello @elastic/observability-ui & @elastic/security-threat-hunting-investigations team,
Code below was creating conflict with the styles of the
Flyout
components inSecurity Solution -> Alerts
since, it only uses EUI standard classes. I think it could easily conflict with styles of other plugins as well. For more details please check the bug mentioned above.kibana/x-pack/plugins/observability/public/pages/alerts/containers/alerts_page/styles.scss
Lines 6 to 10 in bd2361d
I could not find any
observability
specific class tokens so I have taken a liberty to add one. Please feel free to suggest to push any change that you may seem correct.Suggestion
Ideally, I think it will be better if there a common wrapper
div
section around observability pages that can have anoblt
class token and this way all the styles can be specific to observability plugin.This model can be applied to all the plugins for style segregation.
Caveats
This error only comes to light when user has visited both
observability
plugin andsecurity solution
plugin. This makes the situation difficult to identify and test. There is saperate github issue : #138102 to resolve this and you can contribute there if you have anything to add regarding how styles are loaded in kibana.