-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JN-1551] checkboxes with multiple 'other' questions #1366
Conversation
demoResponse=$(curl -s 'https://admin-d2p.ddp-dev.envs.broadinstitute.org/version') | ||
demoResponse=$(curl -s 'https://juniper-cmi.dev/version') | ||
demoGitTag=$(echo $demoResponse | jq -r '.gitTag') | ||
|
||
prodResponse=$(curl -s 'https://juniper.terra.bio/version') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drive by fix
private static String nodeToString(JsonNode node) { | ||
if (node.getNodeType().equals(JsonNodeType.STRING)) { | ||
return node.asText(); | ||
} else { | ||
return node.toString(); | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another drive by fix - most of our survey question definitions were actually blank because if you pass a json object through the normal asText
it will just be "" since it isn't 'text'. This was affecting all questions that were translated - now, the name will be, e.g. { "en": "Title", "es": ...
"name": "schools", | ||
"type": "checkbox", | ||
"title": "What schools did you attend?", | ||
"renderAs": "checkbox-multiple-other", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: checkboxes are unchanged unless you include this
…lti-detail-question
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks about as clean as it could be -- especially on the javascript side
DESCRIPTION (include screenshots, and mobile screenshots for participant UX)
By default, surveyjs only allows 1 other question per checkbox group. This PR adds the ability to make checkboxes that have multiple other questions attached, with different titles for each.
I'm not in love with this approach - it adds a new "magic" way to add questions to surveys that aren't really fully surveyjs questions but have their own stable id. But aside from some hacky things like creating separate questions elsewhere and somehow rendering them inside of another question's checkboxes, I felt like this was the most elegant solution with the caveat of some weirdness if you rely on surveyjs's question list.
TO TEST: (simple manual steps for confirming core behavior -- used for pre-release checks)