Skip to content
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

Feature/follow up questions #202

Merged
merged 32 commits into from
Nov 20, 2023
Merged

Feature/follow up questions #202

merged 32 commits into from
Nov 20, 2023

Conversation

mmoila
Copy link
Collaborator

@mmoila mmoila commented Oct 31, 2023

  • New feature follow-up sections
    • Can be added after numeric, slider, radio and checkbox questions
    • Follow-up sections for a question can be reordered
  • New feature conditional pages
    • Any page except the first one in the survey can be a conditional page
    • Conditions are based on previous pages question answers
    • Pages can be reordered, but reordering will clear conditions that don't fit the new page order

Closes #102

@mmoila mmoila requested review from jpeltzi and ossitammi October 31, 2023 08:32
Copy link
Contributor

@jpeltzi jpeltzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Submitting the survey doesn't seem to work when the last page is conditional and the condition is not met.
kuva
The "Cancel" button might not be visible when changing the type of a follow-up question.

client/src/stores/fi.json Outdated Show resolved Hide resolved
client/src/stores/fi.json Outdated Show resolved Hide resolved
client/src/stores/fi.json Outdated Show resolved Hide resolved
client/src/components/admin/ConditionRow.tsx Outdated Show resolved Hide resolved
client/src/components/SurveyStepper.tsx Outdated Show resolved Hide resolved
client/src/stores/fi.json Outdated Show resolved Hide resolved
@mmoila mmoila requested a review from jpeltzi November 7, 2023 07:46
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the survey is initially loaded, this file throws an error:

Screenshot 2023-11-13 at 11 13 11

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was caused by saved follow-up section without defined section type. Fixed by setting radio question as default type for follow-up sections.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, if the user focuses on the answer field of the question and then clicks somewhere else without answering, an exception is thrown. At least this happened when the leading question was numeric.

Error:
Screenshot 2023-11-13 at 11 14 12

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correction: The error is thrown and the page crashes even if you try to insert some value on the answer field

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't really reproduce but added a fix to prevent these in the future.

Copy link
Contributor

@ossitammi ossitammi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes needed to finish code review.

  • The SurveyAnswerContext causes errors that crashes the page.
  • The follow up questions are missing from the translations

@mmoila mmoila requested a review from ossitammi November 13, 2023 15:28
@ossitammi ossitammi merged commit f17f9e4 into develop Nov 20, 2023
@ossitammi ossitammi deleted the feature/follow-up-questions branch January 26, 2024 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2.4: Ehdolliset kysymykset (ja sivut)
3 participants