From 4fbdd78e781414a5196868a7c5ddc6b98f773ca6 Mon Sep 17 00:00:00 2001 From: Brett Kolodny Date: Thu, 31 Jul 2025 20:31:18 +0000 Subject: [PATCH 1/2] fix: apply biome to src files --- biome.jsonc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biome.jsonc b/biome.jsonc index 85d0c2e..e7e28a6 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -5,7 +5,7 @@ "clientKind": "git" }, "files": { - "includes": ["!src/client/gen/types.ts","!pnpm-lock.yaml"], + "includes": ["src/**/*", "!src/client/gen/types.ts","!pnpm-lock.yaml"], "ignoreUnknown": true }, "linter": { From 1d2cb87aa80ee7ee9fe9db80d38cd9268f4c59e5 Mon Sep 17 00:00:00 2001 From: Brett Kolodny Date: Thu, 31 Jul 2025 20:31:45 +0000 Subject: [PATCH 2/2] src/client/editor/Editor.tsx --- src/client/editor/Editor.tsx | 86 +++++++++++++++++++++++++----------- 1 file changed, 61 insertions(+), 25 deletions(-) diff --git a/src/client/editor/Editor.tsx b/src/client/editor/Editor.tsx index e9f3ec0..ae5ef37 100644 --- a/src/client/editor/Editor.tsx +++ b/src/client/editor/Editor.tsx @@ -3,7 +3,10 @@ import { CheckIcon, ChevronDownIcon, CopyIcon, + ExternalLinkIcon, FileJsonIcon, + NotebookPenIcon, + PlusIcon, UsersIcon, ZapIcon, } from "lucide-react"; @@ -22,6 +25,7 @@ import { useEditor } from "@/client/contexts/editor"; import { useTheme } from "@/client/contexts/theme"; import { Users } from "@/client/editor/Users"; import { type SnippetFunc, snippets } from "@/client/snippets"; +import { examples } from "@/examples"; import type { ParameterWithSource } from "@/gen/types"; import type { User } from "@/user"; import { cn } from "@/utils/cn"; @@ -89,31 +93,63 @@ export const Editor: FC = ({ - - -
- -

Snippets

-
- -
- - - - {snippets.map( - ({ name, label, icon: Icon, snippet }, index) => ( - onAddSnippet(name, snippet)} - > - - {label} - - ), - )} - - -
+
+ + +
+ +

Snippets

+
+ +
+ + + + {snippets.map( + ({ name, label, icon: Icon, snippet }, index) => ( + onAddSnippet(name, snippet)} + > + + {label} + + ), + )} + + +
+ + + +
+ +

Examples

+
+ +
+ + + + {Object.entries(examples).map(([slug, title]) => { + const href = `${window.location.origin}/parameters/example/${slug}`; + return ( + + + + {" "} + (link opens in new tab) + + + {title} + + + ); + })} + + +
+