Fix sidebar responsivity (#453)

* navbar height fix. has to be cleaned up
* use parent height for tree
* cleanups
This commit is contained in:
ftibi93
2024-11-01 10:41:23 +01:00
committed by GitHub
parent 4f1a97ceb9
commit e064e58f79
4 changed files with 17 additions and 5 deletions

View File

@ -197,7 +197,7 @@ export default function SpaceTree({ spaceId, readOnly }: SpaceTreeProps) {
disableEdit={readOnly} disableEdit={readOnly}
{...controllers} {...controllers}
width={width} width={width}
height={height} height={rootElement.current.clientHeight}
ref={treeApiRef} ref={treeApiRef}
openByDefault={false} openByDefault={false}
disableMultiSelection={true} disableMultiSelection={true}

View File

@ -3,10 +3,12 @@
} }
.treeContainer { .treeContainer {
display: flex; height: 100%;
height: 68vh;
flex: 1;
min-width: 0; min-width: 0;
> div, > div > .tree {
height: 100% !important;
}
} }
.node { .node {

View File

@ -18,6 +18,16 @@
} }
} }
.sectionPages {
margin-bottom: 0;
overflow-y: hidden;
.pages {
height: 100%;
padding-bottom: 26px;
}
}
.menuItems { .menuItems {
padding-left: calc(var(--mantine-spacing-md) - var(--mantine-spacing-xs)); padding-left: calc(var(--mantine-spacing-md) - var(--mantine-spacing-xs));
padding-right: calc(var(--mantine-spacing-md) - var(--mantine-spacing-xs)); padding-right: calc(var(--mantine-spacing-md) - var(--mantine-spacing-xs));

View File

@ -134,7 +134,7 @@ export function SpaceSidebar() {
</div> </div>
</div> </div>
<div className={classes.section}> <div className={[classes.section, classes.sectionPages].join(' ')}>
<Group className={classes.pagesHeader} justify="space-between"> <Group className={classes.pagesHeader} justify="space-between">
<Text size="xs" fw={500} c="dimmed"> <Text size="xs" fw={500} c="dimmed">
Pages Pages