From cee08fdb94c88e1c2a947637f3d6042c7f45f786 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Fri, 23 Sep 2022 09:59:23 +0200 Subject: [PATCH] Hide question description when correcting to gain screen space --- ui/src/components/QuestionHeader.svelte | 3 ++- ui/src/routes/surveys/[sid]/responses/[rid].svelte | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ui/src/components/QuestionHeader.svelte b/ui/src/components/QuestionHeader.svelte index a2ae116..e693e6c 100644 --- a/ui/src/components/QuestionHeader.svelte +++ b/ui/src/components/QuestionHeader.svelte @@ -10,6 +10,7 @@ export let question = null; export let qid = null; export let edit = false; + export let nodescription = false;
@@ -43,7 +44,7 @@
- {:else if question.description} + {:else if question.description && !nodescription}

{@html question.description}

{/if} diff --git a/ui/src/routes/surveys/[sid]/responses/[rid].svelte b/ui/src/routes/surveys/[sid]/responses/[rid].svelte index ce8c7f4..727ddbc 100644 --- a/ui/src/routes/surveys/[sid]/responses/[rid].svelte +++ b/ui/src/routes/surveys/[sid]/responses/[rid].svelte @@ -48,8 +48,14 @@ } cts = cts; }); + + let nodescription = false; + let y = 0; + $: nodescription = y > 10; + + {#await surveyP then survey} {#await getQuestion(rid)}
@@ -82,6 +88,7 @@