-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Enterprise Search] Fix Kibana beta notification nav CSS overrides leaking into other plugins #107973
Conversation
- Because we were previously not scoping our Kibana CSS overrides, loading the Enterprise Search plugin and then another plugin would cause that CSS to leak
justify-content: space-between; | ||
.betaSidebarNotification { | ||
.euiSideNav { | ||
display: flex; |
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.
This is the same CSS properties as before, just indented. I recommend hiding whitespace changes on the diff.
I changed this from .kbnPageTemplateSolutionNav
to .euiSideNav
for clarity, we could hook into either class but it made the most sense for me to use .euiSideNav
to match .euiSideNav__content
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.
Just FYI, it's never really a good idea to target .eui
classes, because we make changes these a bunch including the DOM structure. We don't usually consider them breaking changes since it's not a way we support custom styling.
It may be better to use absolute positioning in this case, or to request a customization option from the component itself. Even could do it in KibanaSolutionNav, where it just accepts children
placed after the EuiSideNav component.
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 used absolute positioning originally (#104763), but that broke when the PR to collapse the sidebar landed. Definitely understood that it's not ideal to target EUI classes and we normally don't, but in this case since this is a temporary notification and will be removed in 7.16, I'm honestly not super worried about it and I don't think it needs to be semantically perfect since it has a specific (and fairly short) end of life. We'll definitely keep an eye out for any layout changes or issues that come up between now and 7.16!
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.
Yeah, no problem. Mainly knowledge sharing. Also probably a good idea to put in a specific GH issue for removing it (if one doesn't exist yet) and targeting 7.16.
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.
Awesome call, thanks Caroline! I've opened up a draft PR for 7.16 (#108085) as well as creating an issue in our team repo (https://github.com/elastic/app-search-team/issues/1986).
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.
You win!
@elasticmachine run elasticsearch-ci/docs |
- Because we were previously not scoping our Kibana CSS overrides, loading the Enterprise Search plugin and then another plugin would cause that CSS to leak
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…07983) - Because we were previously not scoping our Kibana CSS overrides, loading the Enterprise Search plugin and then another plugin would cause that CSS to leak Co-authored-by: Constance <[email protected]>
- Because we were previously not scoping our Kibana CSS overrides, loading the Enterprise Search plugin and then another plugin would cause that CSS to leak
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…08233) - Because we were previously not scoping our Kibana CSS overrides, loading the Enterprise Search plugin and then another plugin would cause that CSS to leak Co-authored-by: Constance <[email protected]>
Summary
beta.scss
,beta.tsx
, and now line 82 & 66 ofshared/layout/page_template.tsx
.Before
After
Checklist