-
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
[Serverless] Changes to TopNavMenu placement for serverless projects. #158053
[Serverless] Changes to TopNavMenu placement for serverless projects. #158053
Conversation
6fa3f85
to
e3578ce
Compare
e3578ce
to
8be4dab
Compare
|
||
act(() => { | ||
menuMount$.next(createMountPoint('FOO')); | ||
}); | ||
await refresh(); |
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.
Minor cleanup: I've removed the unnecessary await
statements, as they create warnings in my editor.
8d08509
to
c674d5e
Compare
c674d5e
to
c75427b
Compare
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.
Code review only. Approving now, as I know future changes to match designs are coming.
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 - tested locally
thanks for the test addition with mounter undefined 👍🏻
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 - tested locally
thanks for the test addition with mounter undefined 👍🏻
💚 Build Succeeded
Metrics [docs]Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @tsullivan |
…elastic#158053) ## Summary Part of elastic#158034 This PR moves the TopNavMenu placement to below the breadcrumbs bar for the serverless project chrome layout. The app toolbar must appear below the breadcrumbs bar in the layout, when the app has TopNavMenu items registered with the navigation service. To prevent the layout from rendering an empty container, I had to create a new hook, `useHeaderActionMenuMounter`, that extracts the state from HeaderActionMenu. The state (`mounter: MountPoint | undefined`) is hoisted above so that the header can check if it is empty before rendering the container. _Future work is still needed to achieve the end goal of the design._ Apps must be able to define custom layouts, which commonly require grid and spacer components. The TopNavMenu needs augmentation to support the new API. See the project document from the issue. ## Screenshots **App showing the toolbar, with the container shown below breadcrumbs**  **App without the toolbar and no empty container** 
Summary
Part of #158034
This PR moves the TopNavMenu placement to below the breadcrumbs bar for the serverless project chrome layout.
The app toolbar must appear below the breadcrumbs bar in the layout, when the app has TopNavMenu items registered with the navigation service.
To prevent the layout from rendering an empty container, I had to create a new hook,
useHeaderActionMenuMounter
, that extracts the state from HeaderActionMenu. The state (mounter: MountPoint | undefined
) is hoisted above so that the header can check if it is empty before rendering the container.Future work is still needed to achieve the end goal of the design. Apps must be able to define custom layouts, which commonly require grid and spacer components. The TopNavMenu needs augmentation to support the new API. See the project document from the issue.
Screenshots
App showing the toolbar, with the container shown below breadcrumbs

App without the toolbar and no empty container
