Skip to content

Commit

Permalink
part of #2 (Questionnaire fully dynamic and configurable)
Browse files Browse the repository at this point in the history
Added possibility to have steps with just text paragraphs e.g. for introduction or longer explanations
  • Loading branch information
patrick-koenig committed Feb 22, 2024
1 parent 9bd9e83 commit 17772d5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/miappe/wizard.steps.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
window.steps = [
{
title: 'Welcome to the MIAPPE Wizard.',
text: [
'With this Wizard it is super easy to annotate measurements of your phenotyping experiment with MIAPPE-compliant metadata according to FAIR principles.',
'Click on the Next button to start the metadata annotation of the results data of your experiments.'
]
},
{
title: 'Please provide the Title and Description of your Plant Phenotyping Project and when you submitted and published the Dataset.',
fields: [
Expand Down
2 changes: 2 additions & 0 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ main {
white-space: pre;
border: 1px solid rgb(180,180,180);
margin-top: 3px;
font-size: 0.9em;
font-family: monospace;
}
textarea:focus-visible {
outline: none;
Expand Down
7 changes: 7 additions & 0 deletions src/components/questionnaire/GenericQuestionnaire.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,13 @@ onMount(() => {
<div on:keypress={handleKeypress} role="button" tabindex="0" aria-pressed="false">
{#key currentStep}
{#if steps[currentStep].text}
{#each steps[currentStep].text as paragraph}
<p>{paragraph}</p>
{/each}
{/if}
{#if steps[currentStep].fields}
{#each steps[currentStep].fields as field, i}
Expand Down

0 comments on commit 17772d5

Please sign in to comment.