Make left panel height flexible to avoid overflow (#1169)
* Make overall left menu scrollable * Make only mid-left panel scrollable * Update src/styles.scss * Update src/styles.scss * Update src/components/LayerUI.tsx * Remove unused class * Move the scrolling role to Island Co-authored-by: Lipis <lipiridis@gmail.com>
This commit is contained in:
parent
8dccc793ee
commit
96cea9b84b
@ -2,12 +2,16 @@ import "./Island.css";
|
|||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
type IslandProps = { children: React.ReactNode; padding?: number };
|
type IslandProps = {
|
||||||
|
children: React.ReactNode;
|
||||||
|
padding?: number;
|
||||||
|
className?: string;
|
||||||
|
};
|
||||||
|
|
||||||
export const Island = React.forwardRef<HTMLDivElement, IslandProps>(
|
export const Island = React.forwardRef<HTMLDivElement, IslandProps>(
|
||||||
({ children, padding }, ref) => (
|
({ children, padding, className }, ref) => (
|
||||||
<div
|
<div
|
||||||
className="Island"
|
className={`${className ?? ""} Island`}
|
||||||
style={{ "--padding": padding } as React.CSSProperties}
|
style={{ "--padding": padding } as React.CSSProperties}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
>
|
>
|
||||||
|
@ -116,7 +116,7 @@ export const LayerUI = React.memo(
|
|||||||
<HintViewer appState={appState} elements={elements} />
|
<HintViewer appState={appState} elements={elements} />
|
||||||
<div className="App-menu App-menu_top">
|
<div className="App-menu App-menu_top">
|
||||||
<Stack.Col gap={4}>
|
<Stack.Col gap={4}>
|
||||||
<Section className="App-right-menu" heading="canvasActions">
|
<Section heading="canvasActions">
|
||||||
<Island padding={4}>
|
<Island padding={4}>
|
||||||
<Stack.Col gap={4}>
|
<Stack.Col gap={4}>
|
||||||
<Stack.Row gap={1} justifyContent={"space-between"}>
|
<Stack.Row gap={1} justifyContent={"space-between"}>
|
||||||
@ -136,11 +136,8 @@ export const LayerUI = React.memo(
|
|||||||
</Island>
|
</Island>
|
||||||
</Section>
|
</Section>
|
||||||
{showSelectedShapeActions(appState, elements) && (
|
{showSelectedShapeActions(appState, elements) && (
|
||||||
<Section
|
<Section heading="selectedShapeActions">
|
||||||
className="App-right-menu"
|
<Island className="App-menu__left" padding={4}>
|
||||||
heading="selectedShapeActions"
|
|
||||||
>
|
|
||||||
<Island padding={4}>
|
|
||||||
<SelectedShapeActions
|
<SelectedShapeActions
|
||||||
appState={appState}
|
appState={appState}
|
||||||
elements={elements}
|
elements={elements}
|
||||||
|
@ -266,6 +266,11 @@ button,
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.App-menu__left {
|
||||||
|
overflow-y: auto;
|
||||||
|
max-height: calc(100vh - 236px);
|
||||||
|
}
|
||||||
|
|
||||||
.ErrorSplash {
|
.ErrorSplash {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
padding: 20px 0;
|
padding: 20px 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user