UI(specialVis): only 'leftover-questions' now hides tagRenderings with 'hidden'-label by default, rename variables for imageCarousel and use ';'-separated values

This commit is contained in:
Pieter Vander Vennet 2025-04-04 01:53:28 +02:00
parent e92dae92b7
commit b507f799ed
4 changed files with 12 additions and 24 deletions

View file

@ -65,7 +65,7 @@ export class ImageVisualisations {
args: [
{
name: "image_key",
defaultValue: AllImageProviders.defaultKeys.join(","),
defaultValue: AllImageProviders.defaultKeys.join(";"),
doc: "The keys given to the images, e.g. if <span class='literal-code'>image</span> is given, the first picture URL will be added as <span class='literal-code'>image</span>, the second as <span class='literal-code'>image:0</span>, the third as <span class='literal-code'>image:1</span>, etc... Multiple values are allowed if ';'-separated ",
},
],
@ -73,7 +73,7 @@ export class ImageVisualisations {
constr: (state, tags, args) => {
let imagePrefixes: string[] = undefined
if (args.length > 0) {
imagePrefixes = [].concat(...args.map((a) => a.split(",")))
imagePrefixes = [].concat(...args.map((a) => a.split(";")))
}
const images = AllImageProviders.loadImagesFor(tags, imagePrefixes)
const estimated = tags.mapD((tags) =>
@ -89,8 +89,9 @@ export class ImageVisualisations {
needsUrls: [Imgur.apiUrl, ...Imgur.supportingUrls],
args: [
{
name: "image-key",
name: "image_key",
doc: "Image tag to add the URL to (or image-tag:0, image-tag:1 when multiple images are added)",
defaultValue: "panoramax",
required: false,
},
{

View file

@ -29,7 +29,7 @@ class QuestionViz implements SpecialVisualizationSvelte {
},
{
name: "blacklisted-labels",
doc: "One or more ';'-separated labels of questions which should _not_ be included. Default: 'hidden'",
doc: "One or more ';'-separated labels of questions which should _not_ be included. Note that the questionbox which is added by default will blacklist 'hidden'"
},
]
svelteBased = true
@ -50,9 +50,6 @@ class QuestionViz implements SpecialVisualizationSvelte {
?.split(";")
?.map((s) => s.trim())
?.filter((s) => s !== "")
if (blacklist.length === 0) {
blacklist.push("hidden")
}
return new SvelteUIElement(Questionbox, {
layer,
tags,