-
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
[Serverless Nav] Fix issues with sticky app menu subheader #168372
Conversation
packages/core/chrome/core-chrome-browser-internal/src/ui/project/app_menu.tsx
Outdated
Show resolved
Hide resolved
packages/core/chrome/core-chrome-browser-internal/src/ui/project/app_menu.tsx
Outdated
Show resolved
Hide resolved
…bana into d/2023-10-09-fix-sticky-header
@@ -28,7 +29,7 @@ export const AppMenuBar = ({ headerActionMenuMounter }: AppMenuBarProps) => { | |||
display: flex; | |||
justify-content: end; | |||
align-items: center; | |||
padding: ${euiTheme.size.s}; | |||
height: var(--kbnProjectHeaderAppActionMenuHeight, ${euiTheme.size.xxxl}); |
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.
Making the app menu height fixed.
It is also important to not render the menu if there are no actions. There is no good way for app menu component to know if there is content inside. We'd try to improve places where apps set the menu mount point, so that apps stopped setting the mount point if there is no actions
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 feels super elegant - it's also great that a plugin could theoretically update the --kbnProjectHeaderAppActionMenuHeight
CSS variable and have everything update automatically, if they don't want to use the default xxxl
height. Feels really flexible / future-proof!
src/core/public/_mixins.scss
Outdated
// header banner, and is visible or hidden | ||
height: calc(100vh - var(--euiFixedHeadersOffset, 0) - #{$additionalOffset}); | ||
// header banner, app menu, and is visible or hidden | ||
height: calc(100vh - var(--kbnAppHeadersOffset, 0) - #{$additionalOffset}); |
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.
Fixes double scroll in serverless discover caused by incorrect app container height
{renderMenu(menuClassName)} | ||
</span> | ||
</MountPointPortal> | ||
{(badgesEl || menuEl) && ( |
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.
Fixes empty app header for top_nav component, for example, discover doc page:
target="_blank" | ||
color="warning" | ||
iconType="editorComment" | ||
<HeaderMenuPortal |
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.
Fixes empty app header for oblt onboarding page #163326
x-pack/plugins/security_solution/public/app/home/template_wrapper/global_kql_header/index.tsx
Outdated
Show resolved
Hide resolved
…instead + separate `kbnBody--projectActionMenuVisible` into its own selector, to improve readability and reduce CSS specificity
…iFixedHeadersOffset` if not set
packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx
Outdated
Show resolved
Hide resolved
Proposed minor CSS variable cleanup
…bana into d/2023-10-09-fix-sticky-header
Pinging @elastic/appex-sharedux (Team:SharedUX) |
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
Reviewed the code changes
Tested the Security Alerts page issue locally
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.
🎉 🎉 Thanks for this amazingly clean fix Anton!!! I love 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.
Thanks! I took a closer look. Seems like this is not a regression from this pr 😮💨, so should be good to continue with merging this |
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.
Love it! thanks @Dosant
LGTM
…x-sticky-header # Conflicts: # x-pack/plugins/observability_onboarding/public/application/app.tsx
@ryankeairns Would have to double check but I think I fixed it in my work for the panel. Had to have it on top of anything else. So the global header (where the side nav + panel lives) is on top of everything... But not merged in Can you cross link my PR (#167774) in your issue and make sure my PR closes it? Cheers! |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
References to deprecated APIs
History
To update your PR or re-run it, just comment with: cc @Dosant |
…68372) ## Summary - Fixes sticky kql bar in serverless security project elastic#167908 - Fixes double scroll in serverless discover caused by incorrect app container height cc @elastic/kibana-data-discovery ![Screenshot 2023-10-10 at 17 23 58](https://github.com/elastic/kibana/assets/7784120/3bf50299-7d9f-4c38-953a-33a6a75815c6) - Fixes empty app header for top_nav component, for example, discover doc page: ![Screenshot 2023-10-10 at 17 24 45](https://github.com/elastic/kibana/assets/7784120/4965deac-9472-402f-8e8e-66ede83ce1bb) --------- Co-authored-by: Cee Chen <constance.chen@elastic.co>
Summary
Fixes empty app header for oblt onboarding pageObservability app is mounting an empty div into the app menu bar. #163326 Reverted because it is fixed by [Logs onboarding] Add a button 'give feedback' in the top right step by step flow #168016