Pogues
Pogues copied to clipboard
Questionnaire composition - UI concept
Here is a first and very simple concept of the UI part of questionnaires composition:
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.
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
Adding a element - button placement
Adding an element - choice
ℹ️ 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
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
Colore ref is #e7a10b
Progress have been made; currently a difficult part, handling the drag and drop algorithm for a reference object
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).
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 👍
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 TODO Provide a cost estimation of implementing sequence integration (from a catalog questionnaire)
@romaintailhurat What is the behaviour wanted if a questionnaire contains a reference that does not exist anymore?
@romaintailhurat What is the behaviour wanted if a questionnaire contains a reference that does not exist anymore?
Spec updated 😄
UI for a non-existing ref:
Color is #dadadb
EDIT: ref in #626
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
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!
Done