Skip to content

Commit

Permalink
[monaco] improve height resize, loading state (#911)
Browse files Browse the repository at this point in the history
  • Loading branch information
stopachka authored Feb 20, 2025
1 parent 713d7b7 commit daa051d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/www/components/dash/Perms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export function Perms({
}, [app]);

return (
<div className="flex flex-1 flex-col md:flex-row">
<div className="flex flex-col gap-4 border-r p-4 text-sm md:basis-96 md:text-base">
<div className="flex flex-1 flex-col md:flex-row min-h-0">
<div className="flex flex-col gap-4 border-r p-4 text-sm md:basis-96 md:text-base min-h-0">
<SectionHeading>Permissions</SectionHeading>
<Content>
<p>
Expand Down
5 changes: 3 additions & 2 deletions client/www/components/ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,7 @@ export function CodeEditor(props: {
}}
onMount={props.onMount}
beforeMount={(monaco) => {}}
loading={<FullscreenLoading />}
/>
);
}
Expand All @@ -883,12 +884,12 @@ export function JSONEditor(props: {
}, [props.value]);

return (
<div className="flex flex-col gap-2 h-full">
<div className="flex flex-col gap-2 h-full min-h-0">
<div className="flex items-center gap-4 border-b px-4 py-2">
<div className="font-mono">{props.label}</div>
<Button onClick={() => props.onSave(draft)}>Save</Button>
</div>
<div className="flex-grow">
<div className="flex-grow min-h-0">
<CodeEditor
language="json"
value={props.value}
Expand Down

0 comments on commit daa051d

Please sign in to comment.