-
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
Implement custom global header banner #87438
Implement custom global header banner #87438
Conversation
++ on a smaller default without any config for 7.12. @ryankeairns any thoughts / suggestions?
Woah, awesome! Thanks Pierre
++ I agree that it should probably be there, thanks for fixing the overlapping content.
Yeah, server logs feel like the only option here. I wonder if it's worth it though. Maybe we just add a recommended character limit in the docs?
Yeah, let's not worry about this now and see if folks ask for this later. |
Been slow to respond, but I'm also happier with the smaller default. I just mentioned in this comment that we've been giving people a plugin with the height set to
++ nice!
Yes, agree that it should be present when in full screen mode. If LOE is high, and implementing it risks kicking this out of the next release, I'd be ok with it being marked as a known issue.
Considering much depends on the client's screen size, a general note in the docs about the wrapping behavior and implications is probably enough. ...maybe even
++ |
Replied about the height here: #87438 (comment) |
This is great, many customers will be happy! |
Looks good to me, but I'm not renowned for my aesthetic eye |
Yeah, let's make it a bit smaller. Try |
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 ran through the apps in left nav, clicked through the header, opened any flyouts I could find, etc. Everything work as expected although I don't have 100% everything enabled and am using only sample data. I feel comfortable with where things stand and only left a couple of comments.
Great work @pgayvallet !
/* stylelint-disable-next-line length-zero-no-unit -- need consistent unit to sum them */ | ||
@mixin kibanaFullBodyHeight($additionalOffset: 0px) { |
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.
We could probably maneuver around this to avoid the need for the disable line, but then we end up with more 'stuff' for a very minimal gain. I prefer the clarity here of what is implied by the default value, as well.
.kbnBody--hasHeaderBanner .header__bars { | ||
.header__firstBar { | ||
top: $kbnHeaderBannerHeight; | ||
} | ||
.header__secondBar { | ||
top: $kbnHeaderBannerHeight + $euiHeaderHeightCompensation; | ||
} | ||
} |
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.
We can also revisit this once the page layout service is available.
@import '../../../../../core/public/mixins'; | ||
|
||
.homWrapper { | ||
@include kibanaFullBodyMinHeight(); | ||
background-color: $euiColorEmptyShade; | ||
display: flex; | ||
flex-direction: column; | ||
min-height: calc(100vh - #{$euiHeaderHeightCompensation}); | ||
} |
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.
Any thoughts on my prior comment? Overall, a minor item that I wouldn't block merging on.
Dropping a note here. When we merge this we'll want to open an issue in the Cloud repo to whitelist the config. |
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
* first draft * update plugin list * fix tsproject * update bundle limits file * remove unused start dep * adapt imports * POC of footer banner * update styles, mostly * plug banner to uiSettings * adding some unit tests * add tests on sort_fields * cleanup sums in sass mixins * some self review stuff * update generated doc * add tests for color field * update chrome header test snapshots * retrieve license info from the server * switch from uiSettings to plugin config * update plugin list description * update default colors * NIT * add markdown support * fix banner overlap in fullscreen mode * change banner height to 32px * change banner's font size to 14 * delete unused uiSettings
* master: (44 commits) [APM] Add experimental support for Data Streams (elastic#89650) [Search Session] Control "Kibana / Search Sessions" management section by privileges (elastic#90818) [Lens] Median as default function (elastic#90952) Implement custom global header banner (elastic#87438) [Fleet] Reduce permissions. (elastic#90302) Update dependency @elastic/charts to v24.5.1 (elastic#89822) [Create index pattern] Can't create single character index without wildcard (elastic#90919) [ts/build_ts_refs] add support for --clean flag (elastic#91060) Don't clean when running e2e tests (elastic#91057) Fixes track_total_hits in the body not having an effect when using search strategy (elastic#91068) [Security Solution][Detections] Adds list plugin Saved Objects to Security feature privilege (elastic#90895) Removing the code plugin entirely for 8.0 (elastic#77940) chore(NA): move the instruction to remove yarn global bazelisk package into the first place on install bazel tools (elastic#91026) [jest/ci] remove max-old-space-size override to use 4gb default (elastic#91020) [Fleet] Restrict integration changes for managed policies (elastic#90675) [CI] Fix auto-backport condditions so that it doesn't trigger for other labels (elastic#91042) [DOCS] Uses variable to refer to query profiler (elastic#90976) [App Search] Relevance Tuning logic listeners (elastic#89461) [Metrics UI] Fix saving/loading saved views from URL (elastic#90216) Limit cardinality of transaction.name (elastic#90955) ...
* first draft * update plugin list * fix tsproject * update bundle limits file * remove unused start dep * adapt imports * POC of footer banner * update styles, mostly * plug banner to uiSettings * adding some unit tests * add tests on sort_fields * cleanup sums in sass mixins * some self review stuff * update generated doc * add tests for color field * update chrome header test snapshots * retrieve license info from the server * switch from uiSettings to plugin config * update plugin list description * update default colors * NIT * add markdown support * fix banner overlap in fullscreen mode * change banner height to 32px * change banner's font size to 14 * delete unused uiSettings
Great to see this, looking forward to the settings being whitelisted so we can try it in staging. |
Summary
This PR Implements the phase 1 of #17298. By adding a new
banners
plugin that allows users to define a static banner appearing on all page of Kibana.Screenshots
Login
Stretch to height pages
Scrollable pages
Checklist
Technical implementation
During the discussions in #17298, we came to the agreement to use
uiSettings
as the underlying implementation of the banner's configuration.However, I missed two important facts at this time:
kibana.yml
, I thought it was only the ones done via the UI), are not exposed on unauthenticated pages.kibana.yml
, it will always be used. You can't do per-space overrides in that case. Meaning that a uiSettings-only implementation would not have been possible when we would be implementing stage 2.Given that, I decided to go with a more classic plugin-configuration-based approach for phase1, as we don't need any way to set the global banner configuration via the UI.
Phase 2 will use uiSettings for the per-space banner overrides, which will also allow, with some logic in the middle, to fallback to the global banner configuration, which was not possible with uiSettings.
Also,
xpack.banners.placement: 'header'
is just a better end user experience thanuiSettings.overrides.banner:placement: 'header'
when it comes to configuring the banner imho.Design implementation
There were 3 main tasks here:
top
offset. This is done insrc/core/public/chrome/ui/header/_banner.scss
euiHeaderAffordForFixed
to add the banner's height to the body/container offset when the banner is present. Done (mostly) insrc/core/public/rendering/_base.scss
height: calc(100vh - #{$headerHeightOffset});
in various scss files to use a new banner-aware mixin instead.Release Note
The new
banners
plugin allows to display a static banner at the top of every page of Kibana. The plugin can be configured via thekibana.yml
config fileThis is a gold+ feature, and is disabled on lower license levels.