Skip to content

Commit 34f8b16

Browse files
committed
small UI fixes
1 parent c0a1b0c commit 34f8b16

File tree

2 files changed

+12
-19
lines changed

2 files changed

+12
-19
lines changed

apps/desktop/src/components/main/body/resource-list/layout.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,9 @@ export function ResourceListLayout({
1515
}) {
1616
return (
1717
<ResizablePanelGroup direction="horizontal" className="h-full">
18-
<ResizablePanel defaultSize={30} minSize={20} maxSize={40}>
19-
{listColumn}
20-
</ResizablePanel>
18+
<ResizablePanel defaultSize={40}>{listColumn}</ResizablePanel>
2119
<ResizableHandle />
22-
<ResizablePanel defaultSize={70} minSize={50}>
23-
{detailsColumn}
24-
</ResizablePanel>
20+
<ResizablePanel defaultSize={60}>{detailsColumn}</ResizablePanel>
2521
</ResizablePanelGroup>
2622
);
2723
}

apps/desktop/src/components/main/body/templates/sections-editor.tsx

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { GripVertical as HandleIcon, Plus, X } from "lucide-react";
22
import { Reorder, useDragControls } from "motion/react";
33
import { useCallback, useEffect, useState } from "react";
44

5-
import { TemplateEditor as CodeMirrorEditor } from "@hypr/codemirror/template";
65
import type { TemplateSection } from "@hypr/store";
76
import { Button } from "@hypr/ui/components/ui/button";
87
import { Input } from "@hypr/ui/components/ui/input";
@@ -213,25 +212,23 @@ function SectionItem({
213212
className="border-0 bg-transparent p-0 font-medium shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 placeholder:text-muted-foreground/60"
214213
/>
215214

216-
<div
215+
<textarea
216+
disabled={disabled}
217+
value={item.description}
218+
onChange={(e) => onChange({ ...item, description: e.target.value })}
219+
placeholder="Template content with Jinja2: {{ variable }}, {% if condition %}"
220+
onFocus={() => setIsFocused(true)}
221+
onBlur={() => setIsFocused(false)}
217222
className={cn([
218-
"min-h-[100px] border rounded-xl overflow-clip transition-colors",
223+
"min-h-[100px] w-full border rounded-xl p-3 resize-y transition-colors font-mono text-sm",
224+
"focus-visible:outline-none",
219225
disabled
220226
? "bg-neutral-50"
221227
: isFocused
222228
? "border-blue-500 ring-2 ring-primary/20"
223229
: "border-input",
224230
])}
225-
onFocus={() => setIsFocused(true)}
226-
onBlur={() => setIsFocused(false)}
227-
>
228-
<CodeMirrorEditor
229-
value={item.description}
230-
onChange={(value) => onChange({ ...item, description: value })}
231-
placeholder="Template content with Jinja2: {{ variable }}, {% if condition %}"
232-
readOnly={disabled}
233-
/>
234-
</div>
231+
/>
235232
</div>
236233
</div>
237234
);

0 commit comments

Comments
 (0)