Skip to content
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

[EuiPageTemplate] Account for new serverless header style #7765

Open
dominiqueclarke opened this issue May 16, 2024 · 7 comments · May be fixed by #7777
Open

[EuiPageTemplate] Account for new serverless header style #7765

dominiqueclarke opened this issue May 16, 2024 · 7 comments · May be fixed by #7777
Assignees

Comments

@dominiqueclarke
Copy link

I noticed that there's an unnecessary scroll on serverless when the page content does not take up the full page height.

Screen.Recording.2024-05-16.at.10.37.35.AM.mov

Although there is no additional content, the page scrolls due to the specified min-height. I noticed this style applied to the EuiPageTemplate.

min-block-size: calc(100vh - var(--euiFixedHeadersOffset, 0));

This works well for ESS where there is only one fixed header.

image

However there are two fixed headers in serverless, requiring a different calculation.
image

@cee-chen
Copy link
Member

cee-chen commented May 16, 2024

Minor correction: there are 2 fixed headers on ESS, not 1: the black header and then the white header below that.

As far as --euiFixedHeadersOffset is concerned, Serverless only has 1 fixed header, not 2. Fixed headers are considered full width position: fixed elements that stretch across the entire page, the 2nd one is not a fixed header because it does not supercede the left collapsible nav.

If you want EuiPageTemplate to account for this new "header" type, we likely need a specific EUI component for it, likely an EuiPageTemplate.TopBar element or similar (to mirror EuiPageTemplate.BottomBar).

CC @MichaelMarcialis / @ryankeairns for design input on the above: is the second screenshot part of the official header for serverless?

@cee-chen cee-chen changed the title [EuiPageTemplate] Min-height CSS causes unnecessary scroll on serverless [EuiPageTemplate] Account for new serverless header style May 16, 2024
@paulb-elastic
Copy link

Hi EUI Team, do you have a view on when this might be looked into? We are planning where we are with the Observability solution in Kibana for serverless and this is on our radar for elastic/kibana#176177. Thanks.

@cee-chen
Copy link
Member

We can look into it now if y'all need - I know serverless work is high priority. What's your preferred timeline on this?

@MichaelMarcialis
Copy link
Contributor

Thanks for the ping, @cee-chen. When we were originally designing the serverless navigation, we consolidated Kibana's then double fixed headers (one dark, one light) down to a single fixed header. However, by reducing the number of fixed headers, we were left with no home for the conditionally appearing action buttons that are present in some Kibana applications (which would typically appear right aligned in the second fixed header). For that reason, we suggested that these action buttons should be housed in a conditionally appearing toolbar container.

This conditionally appearing toolbar was intended to be positioned at the top of the viewport, immediately below the new singular header. It shouldn't scroll with the rest of the page content, allowing it to be visible and within reach at all times (similar to the Kibana header). Unlike the Kibana header however, it would be adjacent to the navigation (rather than above it). As such, the toolbar would need to be treated as part of the flow in regard to the navigation being collapsed or expanded (making the toolbar wider or narrower respectively). Will share some older mockups below that may do a better job conveying this.

Let me know if that makes sense. CCing @ryankeairns to keep me honest.


Collapsed
Expanded
Flyout
Modal

@cee-chen
Copy link
Member

cee-chen commented May 17, 2024

This conditionally appearing toolbar was intended to be positioned at the top of the viewport, immediately below the new singular header. It shouldn't scroll with the rest of the page content, allowing it to be visible and within reach at all times (similar to the Kibana header). Unlike the Kibana header however, it would be adjacent to the navigation (rather than above it)

Should flyouts sit above it or below it? Kibana headers are above FWIW

EDIT: Whoops, I see that in the 2nd to last screenshot now - it sits below flyout overlays. Yeah, this is definitely going to need a separate component from EuiHeader.

@cee-chen
Copy link
Member

cee-chen commented Jun 4, 2024

@sebelga Pinging you about this as Tim let me know you're owning the new serverless nav development - would EUI implementing a new EuiPageTemplate.TopBar component work well with your current work? Or would you like to discuss this and #7777 further?

@sebelga
Copy link
Contributor

sebelga commented Jun 6, 2024

would EUI implementing a new EuiPageTemplate.TopBar component work well with your current work?

My current work is the stateful side nav 😊 which does not touch the page templates.

I would need to go into the code to see how those serverless actions are rendered in Kibana currently. I would have thought that this could be solved with CSS (some class added to the wrapping div) but I trust your judgment if a component is required 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants