Collapse and expand questions when editing questionnaire#5933
Closed
verarojman wants to merge 16 commits intodecidim:developfrom
Closed
Collapse and expand questions when editing questionnaire#5933verarojman wants to merge 16 commits intodecidim:developfrom
verarojman wants to merge 16 commits intodecidim:developfrom
Conversation
Contributor
Author
|
Tests are failing at "Install Ruby deps" 😢 |
Member
It seems that at least one of the failures is solved with #5910 |
Contributor
|
@verarojman I've rerunned the jobs, sometimes fixes the |
* Link to results from questionnaire edit view * Define results_url in surveys controller * Create and link questonnaire results view * Remove answer-related statements from HasQuestionnaire concern * Remove answer-related methods from general forms helper * Create QuestionnaireAnswersHelper * Redefine query method to be more general * Add answers permissions to surveys module * Enforce permission to view responses in questionnaire form * Create HasQuestionnaireAnswers concern * Add HasQuestionnaireAnswers to surveys controller * Add questionnaire answers routes to surveys routes * Create questionnaire answers index and show views * Fix participant_fields method name * Remove unnecessary 'participant_fields' method * Fix empty line rubocop offense * Add WickedPdf dependency to decidim-forms module * Setup routes and permissions for questionnaire answers export * Create queries to manage questionnaire participants * Create presenter for questionnaire participant * Refactor HasQuestionnaireAnswers to use new queries and presenters * Refactor index and show views to use presenters * Create views for questionnaire pdf export * Return QuestionnaireUserAnswers to its previous state * Create spec for QuestionnaireParticipants query * Create spec for QuestionnaireParticipant query * Create spec for QuestionnaireParticipantPresenter * Add questionnaire_answers permissions specs * Create spec for QuestionnaireAnswersHelper * Create surveys controller spec * Refactor pdf render in HasQuestionnaireAnswers * Revert QuestionnaireUserAnswers to original state * Remove trailing format from urls and set pdf title * Display disabled button when no answers for questionnaire * Display questionnaire completion percentage for participants * Spec example for display_percentage * Spec example for participant completion * Style questionnaire answers pdf * Update HasQuestionnaireAnswers usage explanation * Move HasQuestionnaireAnswers helper methods to separate class * Add #i18n-tasks-use comment in controller * Fix usage of # i18n-tasks-use comment * Normalize locales * Update spec for helper ip_hash * Refactor HasQuestionnaireAnswers helpers * Normalize locales * Create QuestionnaireAnswerPresenter * Use answer presenter for participant answers * Create spec for QuestionnaireAnswerPresenter * Fix erblint errors * Allow defining custom exporters derived from base PDF exporter * Allow customizing controller for PDF exporters * Modify exporters to take in any options * Write spec for export manifest #options and #formats * Remove options for exporters and set in child class instead * Survey PDF spec * Add doc comment to load_exporters in export_manifest * Fix label in exports dropdown * Add export label to locales * Add doc comments * update gemfile.lock * Add CHANGELOG entry * Normalize locales * Simplify export locales * Add i18n-use comments in exporters * Update Gemfile.lock in decidim-generators and decidim_app-design * Remove non-background answer exports * Remove unused translations * Remove unused translation * Fix translations * Normalize locales * Fix answer presenter specs * Add wicked_pdf gem to decidim-generators Gemfile * Update decidim-generators Gemfile.lock * requiire wickedpdf in initalizer file * code optimizations * refactor answer grouping query. Fix completion percentage * refactor pdf exporter. bring back individual response export * present first user answer to navigate * fix tests * changelog * add alternate first td view if no short answers available * add examples for admin answers pages * Introduce i18n tasks use comments with another comment * Export single answers as a background job * Override questionnaire_participant_answers_url specifying engine in surveys controller * Update changelog Co-authored-by: Vera Rojman <vrojman@protonmail.com> Co-authored-by: Vera Rojman <8806781+verarojman@users.noreply.github.com>
* Update move up and down buttons after dragging questions when managing a questionnaire in admin * Update changelog Co-authored-by: Vera Rojman <vrojman@protonmail.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎩 What? Why?
This PR allows for questions to be collapsed into their statement in order for the experience of editing a questionnaire to be more comfortable when there is a considerable number of questions being edited. They can later be expanded, and collapsed/expanded all at once with two buttons at the beginning of the questions list.
As part of this feature, the question title in the collapsed version is updated with the question statement input (instead of e.g. "Question 3") to have a better visual reference of the questions when they are all collapsed.
📌 Related Issues
Related to: Ability to hide and show questions when editing questionnaire
There's a bug already reported in Github about "Move up" and "Move down" buttons not being updated after dragging questions to reorder them: Update move up and down buttons after dragging questions when managing questionnaire
📋 Subtasks
CHANGELOGentry📷 Screenshots