Pogues icon indicating copy to clipboard operation
Pogues copied to clipboard

Questionnaire composition - UI concept

Open romaintailhurat opened this issue 3 years ago • 11 comments

Here is a first and very simple concept of the UI part of questionnaires composition:

image

The main idea here is to provide another kind of structural element for the questionnaire : a link to another questionnaire.

The element itself could be name after the target questionnaire. Editing this element display a UI where the designer can specify if its the whole questionnaire or a part of it that is integrated.

romaintailhurat avatar Feb 14 '22 16:02 romaintailhurat

Specification

When not specified, the ref element is at the same level than a sequence element, and has the same behaviour

Add a ref

  • click the add element button
  • in the questionnaire list, choose a questionnaire,
  • then click the add button
  • a ref element is added to the questionnaire

Delete a ref

  • Focus on the ref element
  • a Delete button appears at the right end of the element
  • click on the delete button
  • the ref element is deleted

Move a ref

  • specific behavior: the ref element cannot be put under a sequence or a subsequence
  • display only legitimate position
  • :warning: currently we keep the existing display, too costly to customise
  • when dropping, the element will be move to the closest possible location (before or after the current displayed position)

Adding other elements

Once added

Ref questionnaire vars are available

  • they can be used as any other variables
  • collected variables
  • ~~ref questionnaire computed variables are added to the computed variable panel~~
  • ~~same for external variables (does it have a sense ?)~~ → it doesn't make sense in the current UI for computed and external variables, though it would in a future Pogues where there is a dedicated and global variables page where all variables are listed.

Updates

  • First implementation: refs vars are updated when loading the questionnaire
  • Second implementation: adding a update button ♻️

Checks

Regular name checks

Sequences, questions, variables, etc.

Reference checks

  • When loading the questionnaire or through the update button ♻️ , check if a reference is still valid (it exists)
    • if not anymore, mark the ref element as not existing, the user will update or change this ref manually, or delete it

romaintailhurat avatar Apr 15 '22 14:04 romaintailhurat

Adding a element - button placement

image

Adding an element - choice

image

ℹ️ Note the correct items of the choices list are (in :fr:):

  • "Référence au TCM"
  • "Référence à un questionnaire"
  • "Fusion avec un questionnaire"

TCM module choice

image

Note: here, we want a new page, not a modal window.

TCM module configuration

more discussions with TCM manager is needed here.

Module reference display

image

Colore ref is #e7a10b

romaintailhurat avatar Apr 25 '22 11:04 romaintailhurat

Progress have been made; currently a difficult part, handling the drag and drop algorithm for a reference object

romaintailhurat avatar Jun 02 '22 09:06 romaintailhurat

First experience with composition UI

Global comments

  • the external elements choice panel should be closer to the button (see what we have for the visualisation feature)

1 - Adding a ref to an empty questionnaire

It works, but we still have a warning message (see below) whereas we should not (the ref is indeed adding at least a sequence and a question).

image

2 - Moving the reference element in the questionnaire structure

Moving a reference element is nicely handle: the ref can only be placed at the sequence level, ie not inside a sequence or sub sequence.

3 - Deletion

OK 👍

romaintailhurat avatar Jun 17 '22 06:06 romaintailhurat

The warning message for a questionnaire too short does not appear anymore on the screen if the questionnaire is composed of only an external reference.

loichenninger avatar Jul 12 '22 15:07 loichenninger

@loichenninger TODO Provide a cost estimation of implementing sequence integration (from a catalog questionnaire)

romaintailhurat avatar Jul 21 '22 08:07 romaintailhurat

@romaintailhurat What is the behaviour wanted if a questionnaire contains a reference that does not exist anymore?

loichenninger avatar Jul 21 '22 08:07 loichenninger

@romaintailhurat What is the behaviour wanted if a questionnaire contains a reference that does not exist anymore?

Spec updated 😄

romaintailhurat avatar Jul 21 '22 09:07 romaintailhurat

UI for a non-existing ref:

image

Color is #dadadb

EDIT: ref in #626

romaintailhurat avatar Jul 29 '22 13:07 romaintailhurat

In order to be compliant with the spec (see above):

  • the option list for adding an external element should be at the same distance from the button than the generation target list from the "Visualize" button
  • we also need to delete the "+ Questionnaire" button in favor of a 3rd external element.

Note: here are the missing translations for the external elements ⬇️

  • TCM reference
  • Questionnaire reference
  • Questionnaire merging

romaintailhurat avatar Sep 01 '22 11:09 romaintailhurat

In order to be compliant with the spec (see above):

  • the option list for adding an external element should be at the same distance from the button than the generation target list from the "Visualize" button

  • we also need to delete the "+ Questionnaire" button in favor of a 3rd external element.

Thank you @BulotF, those two issues are fixed!

romaintailhurat avatar Oct 11 '22 14:10 romaintailhurat

Done

romaintailhurat avatar May 17 '23 08:05 romaintailhurat