PageLayout doesn't extend the sidebar divider when extending the height.
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.
š¬ Related internal conversation
Steps to reproduce
Check my CodeSandbox
Version
Latest
Browser
Safari
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.
I could fix your issue by adding height: '100vh' in line 46 of your code.
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:
<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.
I have a PR with this as the default behavior if that approach is preferred.
@maximedegreve Would you be ok if we just updated the documentation of the component? I believe this would be the best approach here
Hey @maximedegreve šš» Any opinion here? We are proposing to update the component documentation to help explain this.
Yes. Sounds good to me.
Sorry that this issue is bouncing around. But we should triage this as an size small issue and update the documentation as suggested.