Skip to content

Update move up and down buttons after dragging questions when managing questionnaire#5909

Closed
verarojman wants to merge 4 commits intodecidim:developfrom
verarojman:fix/move-buttons-after-dragging-questions
Closed

Update move up and down buttons after dragging questions when managing questionnaire#5909
verarojman wants to merge 4 commits intodecidim:developfrom
verarojman:fix/move-buttons-after-dragging-questions

Conversation

@verarojman
Copy link
Copy Markdown
Contributor

@verarojman verarojman commented Apr 1, 2020

🎩 What? Why?

This PR fixes "Move up" and "Move down" buttons when editing a questionnaire to make them correctly update after dragging questions to reorder them.

📋 Subtasks

  • Add CHANGELOG entry

📷 Screenshots

Before:

Before


After:

After

microstudi and others added 2 commits April 8, 2020 20:46
* 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>
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 participants