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

EuiNavDrawer isLocked prop does not shift main content to the right #5

Closed
nandorojo opened this issue May 15, 2020 · 5 comments
Closed

Comments

@nandorojo
Copy link

nandorojo commented May 15, 2020

What

When you pass isLocked to the EuiNavDrawer, you expect the drawer to be stuck and expanded, as explained by this PR and on this forum post.

When expanded, the nav drawer should shift the main page content to the right, rather than having the nav drawer overlay the page content.

However, the content does not shift over. Instead, the nav drawer is fixed on top of the page.

Expected Behavior

It should look like this:

bdb783a8310fd42436d99148302a60d953c74505_2_480x1000

Actual Behavior

It actually looks this:

Screen Shot 2020-05-15 at 11 44 26 AM

Reproducible Example

  • Open this repository's example on Code Sandbox
  • Open src/components/chrome/index.tsx and pass isLocked prop to the EuiNavDrawer

Thanks for the great work on this. Looking forward to hearing back from you!

@cchaos
Copy link
Contributor

cchaos commented May 21, 2020

Hi @nandorojo!

The EuiNavDrawer by design does not automatically shift content based on the isLocked status. This must be handled by the consuming application, you can see how this is handled in the docs example by looking at the .euiNavDrawerPage__pageBody selector.

However, we will soon be deprecating EuiNavDrawer for EuiCollapsibleNav which will help with automatically shifting body content based on locked state.


Note: This repo is specifically for the Next-JS starter and not where we actually develop EUI. If you need to submit more component-specific issues, I'd recommend doing so in https://github.com/elastic/eui

@pugnascotia
Copy link
Collaborator

Thanks @cchaos. So technically there's nothing to fix for this issue, however I'll leave it open until I've updated the starter to use EuiCollapsibleNav.

@nandorojo
Copy link
Author

Got it, thank you both for the help! I’ll try out EuiCollapsibleNav instead.

Big fan of your work, thanks for an awesome library.

@pugnascotia
Copy link
Collaborator

So it turns out EuiCollapsibleNav needs updating to work with SSR first. Hey ho.

@nandorojo
Copy link
Author

I can close this for now and just lazy-load in EuiCollapsibleNav. Thanks again.

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

No branches or pull requests

3 participants