From 5dd607a1c365fedc6870da0184cef9a3d6a44a41 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 13 Jun 2025 01:23:16 +0200 Subject: [PATCH] Feature: add debug info block in Questionbox.svelte --- src/UI/Popup/TagRendering/Questionbox.svelte | 25 ++++++++++++++++++- .../TagRendering/SpecialTranslation.svelte | 2 ++ .../UISpecialVisualisations.ts | 1 - 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/UI/Popup/TagRendering/Questionbox.svelte b/src/UI/Popup/TagRendering/Questionbox.svelte index 4c9ed9ffef..234ef93ed0 100644 --- a/src/UI/Popup/TagRendering/Questionbox.svelte +++ b/src/UI/Popup/TagRendering/Questionbox.svelte @@ -14,6 +14,7 @@ import { onDestroy } from "svelte" import TagRenderingQuestionDynamic from "./TagRenderingQuestionDynamic.svelte" import LoginToggle from "../../Base/LoginToggle.svelte" + import AccordionSingle from "../../Flowbite/AccordionSingle.svelte" export let layer: LayerConfig export let tags: UIEventSource> @@ -45,7 +46,7 @@ } let baseQuestions = (layer?.tagRenderings ?? [])?.filter( - (tr) => allowed(tr.labels) && tr.question !== undefined + (tr) => tr.question !== undefined && allowed(tr.labels), ) /** @@ -121,6 +122,28 @@ {#if $loginEnabled} + {#if $debug} +
+ +
+ Questionbox debug info: labels (whitelist) : {onlyForLabels?.join(",")} +
+
+ +
+ notForLabes (blacklist): {notForLabels?.join(",")} ; +
+
+ baseQuestions: {baseQuestions.length === 0 ? "NONE" : baseQuestions.map(q => q.id)?.join(",")} ; +
+
+ questionsMeetingConditions: {$questionsToAsk.length === 0 ? "NONE" : baseQuestions.map(q => q.id)?.join(",")} + ; +
+
+
+
+ {/if}