From 8d02b55e6cb890356e0d2bc74c1f2a0bdeb2ee9d Mon Sep 17 00:00:00 2001 From: Brett Kolodny Date: Thu, 31 Jul 2025 22:17:20 +0000 Subject: [PATCH 1/5] fix: use span instead of p for proper html --- src/client/editor/Editor.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/editor/Editor.tsx b/src/client/editor/Editor.tsx index ae5ef37..c69053c 100644 --- a/src/client/editor/Editor.tsx +++ b/src/client/editor/Editor.tsx @@ -98,7 +98,7 @@ export const Editor: FC = ({
-

Snippets

+ Snippets
@@ -124,7 +124,7 @@ export const Editor: FC = ({
-

Examples

+ Examples
From 616cf91ad35c76becb1a6027368d2cd045417cfa Mon Sep 17 00:00:00 2001 From: Brett Kolodny Date: Thu, 31 Jul 2025 22:19:54 +0000 Subject: [PATCH 2/5] fix: improve indexes and ensure order --- src/client/editor/Editor.tsx | 37 ++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/src/client/editor/Editor.tsx b/src/client/editor/Editor.tsx index c69053c..2b63c08 100644 --- a/src/client/editor/Editor.tsx +++ b/src/client/editor/Editor.tsx @@ -108,7 +108,7 @@ export const Editor: FC = ({ {snippets.map( ({ name, label, icon: Icon, snippet }, index) => ( onAddSnippet(name, snippet)} > @@ -131,21 +131,26 @@ export const Editor: FC = ({ - {Object.entries(examples).map(([slug, title]) => { - const href = `${window.location.origin}/parameters/example/${slug}`; - return ( - - - - {" "} - (link opens in new tab) - - - {title} - - - ); - })} + {Object.entries(examples) + .sort() + .map(([slug, title], index) => { + const href = `${window.location.origin}/parameters/example/${slug}`; + return ( + + + + {" "} + (link opens in new tab) + + + {title} + + + ); + })} From 6673829878b23bb3fed194918717dd9ef059d3d0 Mon Sep 17 00:00:00 2001 From: Brett Kolodny Date: Mon, 4 Aug 2025 16:08:17 +0000 Subject: [PATCH 3/5] chore: change div to span to fix invalid html --- src/client/editor/Editor.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/client/editor/Editor.tsx b/src/client/editor/Editor.tsx index 2b63c08..7daaf60 100644 --- a/src/client/editor/Editor.tsx +++ b/src/client/editor/Editor.tsx @@ -96,10 +96,10 @@ export const Editor: FC = ({
-
+ - Snippets -
+ Snippets +
@@ -122,10 +122,10 @@ export const Editor: FC = ({ -
+ - Examples -
+ Example +
From fa6c04bb390858ba7e422b7b13153ff0a96f98fd Mon Sep 17 00:00:00 2001 From: Brett Kolodny Date: Mon, 4 Aug 2025 16:13:25 +0000 Subject: [PATCH 4/5] chore: move screen reader text --- src/client/editor/Editor.tsx | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/client/editor/Editor.tsx b/src/client/editor/Editor.tsx index 7daaf60..de78d9e 100644 --- a/src/client/editor/Editor.tsx +++ b/src/client/editor/Editor.tsx @@ -105,17 +105,15 @@ export const Editor: FC = ({ - {snippets.map( - ({ name, label, icon: Icon, snippet }, index) => ( - onAddSnippet(name, snippet)} - > - - {label} - - ), - )} + {snippets.map(({ name, label, icon: Icon, snippet }) => ( + onAddSnippet(name, snippet)} + > + + {label} + + ))}
@@ -141,12 +139,12 @@ export const Editor: FC = ({ asChild={true} > + + {title} {" "} (link opens in new tab) - - {title} ); From e6576818eccd6593b603ee20fd0dc4f1558a0991 Mon Sep 17 00:00:00 2001 From: Brett Kolodny Date: Mon, 4 Aug 2025 16:18:17 +0000 Subject: [PATCH 5/5] chore: remove index from key --- src/client/editor/Editor.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/editor/Editor.tsx b/src/client/editor/Editor.tsx index de78d9e..7cc02f0 100644 --- a/src/client/editor/Editor.tsx +++ b/src/client/editor/Editor.tsx @@ -131,11 +131,11 @@ export const Editor: FC = ({ {Object.entries(examples) .sort() - .map(([slug, title], index) => { + .map(([slug, title]) => { const href = `${window.location.origin}/parameters/example/${slug}`; return (