diff --git a/client/src/components/settings-editor/RendererEditor.tsx b/client/src/components/settings-editor/RendererEditor.tsx index 7c754d0..5586289 100644 --- a/client/src/components/settings-editor/RendererEditor.tsx +++ b/client/src/components/settings-editor/RendererEditor.tsx @@ -43,107 +43,109 @@ export function RendererEditor({ value, onValueChange }: RendererEditorProps) { onValueChange?.(merge(value, next)); } - const status = value?.disabled ? "disabled" : current ? "connected" : "error"; + const status = value?.disabled + ? "disabled" + : current?.renderer + ? "connected" + : "error"; return ( - <> - - ( - <> - + ( + <> + *": { overflow: "hidden", - "> *": { - overflow: "hidden", - whiteSpace: "nowrap", - textOverflow: "ellipsis", - }, - }} - > - - {current - ? `${current.renderer.meta.name} ${current.renderer.meta.version}` - : startCase(status)} - - {!!current && ( - - <> - {current.renderer.meta.description} -
- - Contributes{" "} - {join(current.renderer.meta.components, ", ")} - - -
- )} + whiteSpace: "nowrap", + textOverflow: "ellipsis", + }, + }} + > + + {current?.renderer + ? `${current?.renderer?.meta?.name} ${current.renderer?.meta?.version}` + : startCase(status)} + + {!!current?.renderer && ( - {transports[value?.transport]?.name} - {": "} - {value?.url || "No URL"} + <> + {current.renderer?.meta?.description} +
+ + Contributes{" "} + {join(current.renderer?.meta?.components, ", ")} + +
-
- - - - handleChange({ disabled: !v })} - /> - - - - )} - appBar={{ children: Edit Renderer }} - > - - handleChange({ url: e.target.value })} - fullWidth - variant="filled" - label="URL" - sx={{ mb: 2 }} + )} + + {transports[value?.transport]?.name} + {": "} + {value?.url || "No URL"} + + + - ({ + value: k, + label: name, + }))} + fullWidth + value={value.transport} + onChange={(v) => handleChange({ transport: v })} + /> +
+
+
); } diff --git a/client/src/pages/ViewportPage.tsx b/client/src/pages/ViewportPage.tsx index 19127f4..0652f58 100644 --- a/client/src/pages/ViewportPage.tsx +++ b/client/src/pages/ViewportPage.tsx @@ -167,11 +167,14 @@ export function ViewportPage({ template: Page }: PageContentProps) { id: "internal:auto", name: `Auto (${auto?.renderer?.meta?.name ?? "None"})`, }, - ...map(renderers, ({ renderer }) => ({ - id: renderer.meta.id, - name: renderer.meta.name, - description: renderer.meta.id, - })), + ...map( + filter(renderers, (r) => !!r.renderer), + ({ renderer }) => ({ + id: renderer?.meta?.id, + name: renderer?.meta?.name, + description: renderer?.meta?.id, + }) + ), ]} arrow /> @@ -183,7 +186,7 @@ export function ViewportPage({ template: Page }: PageContentProps) { value={layerSet} onChange={setLayerSet} items={map(layers, (c) => ({ - id: c.key, + id: c?.key, name: inferLayerName(c), }))} showArrow diff --git a/client/src/public/manifest.json b/client/src/public/manifest.json index 380a826..fb2ecb7 100644 --- a/client/src/public/manifest.json +++ b/client/src/public/manifest.json @@ -1,9 +1,9 @@ { "short_name": "Posthoc", "name": "Posthoc", - "version": "1.2.5-5", + "version": "1.2.5-6", "description": "Understand sequential decision-making through visualisation.", - "version_name": "1.2.5-5; mid November 2024", + "version_name": "1.2.5-6; early December 2024", "repository": "https://github.com/ShortestPathLab/posthoc-app", "changelog": "http://posthoc.pathfinding.ai/blog", "docs": "https://posthoc.pathfinding.ai/docs/overview",