Skip to content

PageLayout doesn't extend the sidebar divider when extending the height. #4351

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

Open
maximedegreve opened this issue Mar 4, 2024 · 5 comments · May be fixed by #5967
Open

PageLayout doesn't extend the sidebar divider when extending the height. #4351

maximedegreve opened this issue Mar 4, 2024 · 5 comments · May be fixed by #5967

Comments

@maximedegreve
Copy link
Contributor

maximedegreve commented Mar 4, 2024

Description

On GitHub, I've seen some pages using the PageLayout component, but there's a problem: when you can't scroll, the PageLayout doesn't stretch to fill the whole page, which means the divider ends up getting cut off halfway down the page. To fix this, I tried making the PageLayout fill up all the available space from its parent in a few instances, but this didn't solve the issue – the divider still gets cut off.

Code snippet showing the divider line not expanding

💬 Related internal conversation

Steps to reproduce

Check my CodeSandbox

Version

Latest

Browser

Safari

Copy link
Contributor

Hi! This issue has been marked as stale because it has been open with no activity for 180 days. You can comment on the issue or remove the stale label to keep it open. If you do nothing, this issue will be closed in 7 days.

@CleverLemming1337
Copy link

I could fix your issue by adding height: '100vh' in line 46 of your code.

@dwsosa
Copy link
Contributor

dwsosa commented Apr 23, 2025

The PageLayout component is not opinionated about layout and was underspecified in the CodePen. By adjusting the following props, it will fill its parent, and the divider will extend as expected:

image showing UI fix when props specified

<PageLayout
  sx={{
    bg: 'green',
    flex: 1, // Fills available space in the parent
    display: 'flex', // Makes PageLayout a flex container
    flexDirection: 'row', // Aligns children horizontally
  }}
/>

Looks like this was a layout misunderstanding rather than a bug. I’d suggest closing the issue.

@dwsosa
Copy link
Contributor

dwsosa commented Apr 24, 2025

I have a PR with this as the default behavior if that approach is preferred.

@hectahertz
Copy link
Contributor

@maximedegreve Would you be ok if we just updated the documentation of the component? I believe this would be the best approach here

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