android-fhir
android-fhir copied to clipboard
SDC catalog app: Show enable when (skip logic) behavior
Is your feature request related to a problem? Please describe. Demonstrate to developers how the SDC skip logic behavior works.
Describe the solution you'd like Add skip logic as a widget in the behavior tab. Skip logic should show a realistic example of how skip logic works. Example: By selecting yes on the first question, the second question appears. If no is selected, the question does not appear.
Additional context
Open to feedback on what we should show. Designs are WIP.
@shelaghm Informative UI for skip logic behavior at the bottom of screen, It will be the part of app or need to add as a component in SDC and refer it in app?
@PallaviGanorkar the informative UI was intended to show up in the SDC Catalog app, but not in deployment apps. The idea behind the grey box is to help visualize the skip behavior that's "invisible" on screen, but can be found in the code. In the library itself the skip logic informative UI would not be displayed.
@jingtang10 Curious to hear your thoughts?
The fact that the text in grey box changes means that it'll need to be part of the sdc widget using enable when (different text gets enabled when answer changes). Solution:
- we use the same text for yes/no answers. and that can be just a additional box in the catalog app.
- if we can align the look and feel of the grey box to a certain widget in sdc lib (instruction? help text?) then we can just change the questionnaire to use enable when to enable different text. (EDIT: probably harder to use icon or header
skip logic
in the grey box)
Additional comment: @shelaghm should we use the term enable when
which is more FHIR, instead of skip logic, which is more ODK.
for 2. releated ticket: https://github.com/google/android-fhir/issues/1528 but i don't think they're the same now...
@jingtang10
Yes, this is the same grey box as the help text box
. We don't need to use the icon for this box, so can remove that if it adds a lot of complexity
Yes, I suggest we use terminology that aligns with FHIR, so lets update this component to enable when
as you suggested
@PallaviGanorkar will look into if we can use dynamic text to replace the Help
header text. If that's not possible, then we use a simpler text box such as option 1 described by Jing above.
Skip logic text in box same for both states (Y and N selected): "If Yes is selected, a follow-up question is displayed. If No is selected, no follow-up questions are displayed."
@shelaghm I have used info icon from https://fonts.google.com/icons?selected=Material%20Icons%3Ainfo%3A Please let me know if any change required in icon
@shelaghm Please find attached screenshot below, info grey box is displayed at the bottom of screen as other UI on the screen is rendered from SDC lib and i don't have reference to particular UI component from Catalog App
@PallaviGanorkar this looks good to me!
@shelaghm Setting icon on the right top of the screen, is there any functionality expected on click of this icon?
@PallaviGanorkar the settings/gear icon is used to display error states
I don't believe we want to show error states for this screen as skip logic is a behavior and there's no error state associated with it. We can remove the gear icon from this screen unless there's some other functionality we want to show under the gear icon?
@jingtang10 @santosh-pingle what do you think?
@shelaghm sgtm! thanks.
just to summarise - we are putting this in the catalog app (instead of using the help item control and rewrite the questionnaire) because of the "skip logic" title in the grey box. if we want to just reuse the help item control, the title would not be configurable to "skip logic".
pallavi has already done this in her latest udpate for the pr.
and the gear icon has been removed.
Sounds good. Thanks for the update!