From 1e83c7e263a59b38797623cbf40a5a5ad493be62 Mon Sep 17 00:00:00 2001 From: Kevin Zheng Date: Mon, 26 Feb 2024 02:25:51 +1100 Subject: [PATCH] Fix minor usability issues --- client/src/components/app-bar/FeaturePicker.tsx | 4 +++- client/src/components/app-bar/Input.tsx | 4 ++-- client/src/components/layer-editor/LayerEditor.tsx | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/client/src/components/app-bar/FeaturePicker.tsx b/client/src/components/app-bar/FeaturePicker.tsx index 6a175fa8..8b45b255 100644 --- a/client/src/components/app-bar/FeaturePicker.tsx +++ b/client/src/components/app-bar/FeaturePicker.tsx @@ -62,7 +62,9 @@ export function FeaturePicker({ icon={selected?.icon ? getIcon(selected.icon, selected.color) : icon} arrow={arrow} > - {truncate(selected?.name ?? label, { length: ellipsis })} + {truncate(selected?.name ?? label, { + length: ellipsis, + })} )} items={map(items, ({ id, name, description, hidden, icon, color }) => ({ diff --git a/client/src/components/app-bar/Input.tsx b/client/src/components/app-bar/Input.tsx index 7dfc29a9..4accccb9 100644 --- a/client/src/components/app-bar/Input.tsx +++ b/client/src/components/app-bar/Input.tsx @@ -26,7 +26,7 @@ export function MapPicker({ onChange, value }: EditorProps) { showTooltip arrow paper - ellipsis={30} + ellipsis={25} icon={} label="Choose Map" value={value?.id} @@ -84,7 +84,7 @@ export function TracePicker({ showTooltip paper arrow - ellipsis={30} + ellipsis={25} icon={} label="Choose Trace" value={value?.id} diff --git a/client/src/components/layer-editor/LayerEditor.tsx b/client/src/components/layer-editor/LayerEditor.tsx index fa7ac0f2..852cb6e3 100644 --- a/client/src/components/layer-editor/LayerEditor.tsx +++ b/client/src/components/layer-editor/LayerEditor.tsx @@ -223,7 +223,7 @@ function Component( onChange={(_, v) => setDraft?.( produce(draft, (d) => { - set(d, "source", { type: v }); + set(d, "source.type", v); }) ) }