From 204027b4e946712bd729f93ccecc002c080c5d5b Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Sun, 28 Apr 2024 00:00:28 +0200 Subject: [PATCH] Studio: show correct question if available, see #1929 --- src/UI/Studio/SchemaBasedArray.svelte | 3 +-- src/UI/Studio/SchemaBasedMultiType.svelte | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/UI/Studio/SchemaBasedArray.svelte b/src/UI/Studio/SchemaBasedArray.svelte index 488c0a2c3f..abb823d96f 100644 --- a/src/UI/Studio/SchemaBasedArray.svelte +++ b/src/UI/Studio/SchemaBasedArray.svelte @@ -31,10 +31,9 @@ schema.description = undefined } - const subparts: ConfigMeta = state + const subparts: ConfigMeta[] = state .getSchemaStartingWith(schema.path) .filter((part) => part.path.length - 1 === schema.path.length) - let messages = state.messagesFor(path) const currentValue: UIEventSource = state.getStoreFor(path) diff --git a/src/UI/Studio/SchemaBasedMultiType.svelte b/src/UI/Studio/SchemaBasedMultiType.svelte index d23f936f78..6abbc8e707 100644 --- a/src/UI/Studio/SchemaBasedMultiType.svelte +++ b/src/UI/Studio/SchemaBasedMultiType.svelte @@ -9,6 +9,7 @@ import SchemaBasedInput from "./SchemaBasedInput.svelte" import type { JsonSchemaType } from "./jsonSchema" import ShowConversionMessage from "./ShowConversionMessage.svelte" + import type { Translatable } from "../../Models/ThemeConfig/Json/Translatable" /** * If 'types' is defined: allow the user to pick one of the types to input. @@ -41,7 +42,7 @@ } const configJson: QuestionableTagRenderingConfigJson & {questionHintIsMd: boolean}= { id: "TYPE_OF:" + path.join("_"), - question: "Which subcategory is needed for " + schema.path.at(-1) + "?", + question: schema.hints.question ?? "Which subcategory is needed for " + schema.path.at(-1) + "?", questionHint: schema.description, questionHintIsMd: true, mappings: types