Skip to content

Commit

Permalink
Class feedback form (#153)
Browse files Browse the repository at this point in the history
* Add class feedback form initial view

* Add emoji radio bar for answering questions

* Insert questions into a card widget

* Fix formatting

* Initial version of feedback form.

* Use AnimatedContainer for emoji form field

* Clean unused code

* Replace class icon

* Extract questions from Firestore

* Remove context from provider

* Add question type

* Begin saving questions' answers

* Improve answers' saving process

* Save all questions' answers

* Minor code improvements

* Better generalize questions/answers

* Rename variables

* Show feedback button only in debug mode

* Create custom AutocompletePerson widget

* Initiate creation of separate widgets

* Improve questions instantiation logic

* Remove S.of(context)

* Add input questions' validator

* Add input questions' validator

* Create multiple question types

* Create separate question display widget

* Refactor emojis animation

* Realign message at the beginning

* Center anonymous form notice.

* Improve emoji animation and remove Selectable.

* Modify feedback policy message

* Allow users to submit one time only feedback for a class

* Add tests for feedback page

* Align questions to the left

* Remove unused onChanged methods

* Remove unused code

* Remove rating questions validator

* Remove card widget from free text answers

* Replace text form field with slider

* Modify feedback page tests

* Improve slider responses range

* Make teacher field editable

* Fix failing tests

* Implement remote config functionality

* Fix failing tests

* Fix formatting

* Change question type from input to slider

* Make dropdown answers localizable

* Modify SizedBox height

* Add feedback icon tooltip

* Rename feedback answer class

* Rename feedback provider method

* Make remote config option accessible globally

* Move remote config calls to setUpAndChooseStartScreen method

* Make separate methods for each question type

* Change the order of parameters

* Remove business logic from UI component

* Revert selectable changes

* Replace dynamic type with Map<String, String>

* Fix linter errors

* Fix failing tests

* Check if question index exists in database

* Revise fetchCategories() method comment

* Make provider methods private

* Move remote_config.dart to resources/

* Disable feedback form button if data is still fetching

* Remove getRemoteConfig() method from utils.dart

* Redesign RemoteConfigService class

* Remove RemoteConfig constructor and instance variable.

* Allow slider fields with no answer.

* Remove validation from dropdown.

* Fix failing tests

* Remove possibility to add empty answers in database

* Sort feedback categories alphabetically

* Bump version

* Fix exception when slider's TextFormField value is incorrect

Co-authored-by: Ioana Alexandru <[email protected]>
  • Loading branch information
andreicmirciu and IoanaAlexandru authored Jun 17, 2021
1 parent 4ca1301 commit a07eedd
Show file tree
Hide file tree
Showing 25 changed files with 1,523 additions and 83 deletions.
14 changes: 13 additions & 1 deletion lib/generated/intl/messages_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ class MessageLookup extends MessageLookupByLibrary {
"buttonSend" : MessageLookupByLibrary.simpleMessage("Send"),
"buttonSet" : MessageLookupByLibrary.simpleMessage("Set"),
"errorAccountDisabled" : MessageLookupByLibrary.simpleMessage("The account has been disabled."),
"errorAnswerCannotBeEmpty" : MessageLookupByLibrary.simpleMessage("Answer cannot be empty."),
"errorAnswerIncorrect" : MessageLookupByLibrary.simpleMessage("The answer you entered is incorrect."),
"errorClassCannotBeEmpty" : MessageLookupByLibrary.simpleMessage("Class cannot be empty."),
"errorCouldNotLaunchURL" : m1,
"errorEmailInUse" : MessageLookupByLibrary.simpleMessage("There is already an account associated with this e-mail address"),
Expand Down Expand Up @@ -121,6 +123,7 @@ class MessageLookup extends MessageLookupByLibrary {
"infoClasses" : MessageLookupByLibrary.simpleMessage("classes you are interested in"),
"infoEmail" : m3,
"infoExportToGoogleCalendar" : MessageLookupByLibrary.simpleMessage("Export filtered events from Timetable"),
"infoFormAnonymous" : MessageLookupByLibrary.simpleMessage("This form is anonymous."),
"infoLoading" : MessageLookupByLibrary.simpleMessage("Loading..."),
"infoMakeSureGroupIsSelected" : MessageLookupByLibrary.simpleMessage("Make sure your group/subgroup is selected in the"),
"infoPassword" : MessageLookupByLibrary.simpleMessage("It must contain lower and uppercase letters, one number and one special character, and have a minimum length of 8."),
Expand All @@ -131,7 +134,9 @@ class MessageLookup extends MessageLookupByLibrary {
"infoRelevanceNothingSelected" : MessageLookupByLibrary.simpleMessage("If this is relevant for everyone, don\'t select anything ."),
"infoSelect" : MessageLookupByLibrary.simpleMessage("Select the"),
"infoYouNeedToSelect" : MessageLookupByLibrary.simpleMessage("You first need to select the"),
"labelAnswer" : MessageLookupByLibrary.simpleMessage("Answer"),
"labelAskPermissions" : MessageLookupByLibrary.simpleMessage("Request editing permissions"),
"labelAssistant" : MessageLookupByLibrary.simpleMessage("Assistant"),
"labelCategory" : MessageLookupByLibrary.simpleMessage("Category"),
"labelClass" : MessageLookupByLibrary.simpleMessage("Class"),
"labelColor" : MessageLookupByLibrary.simpleMessage("Color"),
Expand All @@ -144,7 +149,9 @@ class MessageLookup extends MessageLookupByLibrary {
"labelEnd" : MessageLookupByLibrary.simpleMessage("End"),
"labelEvaluation" : MessageLookupByLibrary.simpleMessage("Evaluation"),
"labelEven" : MessageLookupByLibrary.simpleMessage("Even"),
"labelFeedbackPolicy" : MessageLookupByLibrary.simpleMessage("feedback policy"),
"labelFirstName" : MessageLookupByLibrary.simpleMessage("First name"),
"labelGrade" : MessageLookupByLibrary.simpleMessage("Grade"),
"labelLastName" : MessageLookupByLibrary.simpleMessage("Last name"),
"labelLastUpdated" : MessageLookupByLibrary.simpleMessage("Last updated"),
"labelLecturer" : MessageLookupByLibrary.simpleMessage("Lecturer"),
Expand Down Expand Up @@ -176,6 +183,7 @@ class MessageLookup extends MessageLookupByLibrary {
"messageAccountCreated" : MessageLookupByLibrary.simpleMessage("Account created successfully."),
"messageAccountDeleted" : MessageLookupByLibrary.simpleMessage("Account deleted successfully."),
"messageAddCustomWebsite" : MessageLookupByLibrary.simpleMessage("Try adding a custom website."),
"messageAgreeFeedbackPolicy" : MessageLookupByLibrary.simpleMessage("I understand this survey is extremely important for the continuous development of the educational process and I will only provide valuable and constructive feedback for this class."),
"messageAgreePermissions" : MessageLookupByLibrary.simpleMessage("I will only upload information that is correct and accurate, to the best of my knowledge. I understand that submitting erroneous or offensive information on purpose will lead to my editing permissions being permanently revoked."),
"messageAnnouncedOnMail" : MessageLookupByLibrary.simpleMessage("You will receive a mail confirmation if your request is approved."),
"messageAskPermissionToEdit" : m6,
Expand All @@ -195,14 +203,15 @@ class MessageLookup extends MessageLookupByLibrary {
"messageEventAdded" : MessageLookupByLibrary.simpleMessage("Event added successfully."),
"messageEventDeleted" : MessageLookupByLibrary.simpleMessage("Event deleted successfully."),
"messageEventEdited" : MessageLookupByLibrary.simpleMessage("Event modified successfully."),
"messageFeedbackHasBeenSent" : MessageLookupByLibrary.simpleMessage("The review has been sent successfully."),
"messageGetStartedByPressing" : MessageLookupByLibrary.simpleMessage("Get started by pressing the"),
"messageIAgreeToThe" : MessageLookupByLibrary.simpleMessage("I agree to the "),
"messageNewUser" : MessageLookupByLibrary.simpleMessage("New user?"),
"messageNoClassesYet" : MessageLookupByLibrary.simpleMessage("You have not added any classes yet."),
"messageNotLoggedIn" : MessageLookupByLibrary.simpleMessage("You need to be logged in to perform this action."),
"messagePictureUpdatedSuccess" : MessageLookupByLibrary.simpleMessage("Profile picture updated successfully."),
"messageRequestAlreadyExists" : MessageLookupByLibrary.simpleMessage("You have already submitted a request. If you want to add another one, please press \'Send\'."),
"messageRequestHasBeenSent" : MessageLookupByLibrary.simpleMessage("The request has been sent succesfully."),
"messageRequestHasBeenSent" : MessageLookupByLibrary.simpleMessage("The request has been sent successfully."),
"messageResetPassword" : MessageLookupByLibrary.simpleMessage("Enter your e-mai in order to receive instructions on how to reset your password."),
"messageShortcutDeleted" : MessageLookupByLibrary.simpleMessage("Shortcut deleted successfully."),
"messageTapForMoreInfo" : MessageLookupByLibrary.simpleMessage("Tap for more info"),
Expand All @@ -217,6 +226,7 @@ class MessageLookup extends MessageLookupByLibrary {
"messageWelcomeSimple" : MessageLookupByLibrary.simpleMessage("Welcome!"),
"messageYouCanContribute" : MessageLookupByLibrary.simpleMessage("You can contribute to the app data, but you first need to request permissions."),
"navigationAskPermissions" : MessageLookupByLibrary.simpleMessage("Ask for permissions"),
"navigationClassFeedback" : MessageLookupByLibrary.simpleMessage("Review"),
"navigationClassInfo" : MessageLookupByLibrary.simpleMessage("Class information"),
"navigationClasses" : MessageLookupByLibrary.simpleMessage("Classes"),
"navigationEventDetails" : MessageLookupByLibrary.simpleMessage("Event details"),
Expand Down Expand Up @@ -280,6 +290,7 @@ class MessageLookup extends MessageLookupByLibrary {
"warningEmailInUse" : m10,
"warningEventNotEditable" : MessageLookupByLibrary.simpleMessage("This event cannot be edited."),
"warningFavouriteWebsitesInitializationFailed" : MessageLookupByLibrary.simpleMessage("Could not read favourite websites."),
"warningFeedbackAlreadySent" : MessageLookupByLibrary.simpleMessage("You have already submitted feedback for this class!"),
"warningFieldCannotBeEmpty" : MessageLookupByLibrary.simpleMessage("Field cannot be empty."),
"warningFieldCannotBeZero" : MessageLookupByLibrary.simpleMessage("Field cannot be zero."),
"warningFilterAlreadyDisabled" : MessageLookupByLibrary.simpleMessage("Already showing all content."),
Expand All @@ -306,6 +317,7 @@ class MessageLookup extends MessageLookupByLibrary {
"warningUnableToReachNewsFeed" : MessageLookupByLibrary.simpleMessage("Unable to reach the news feed."),
"warningUseProvider" : m12,
"warningWebsiteNameExists" : MessageLookupByLibrary.simpleMessage("A website with the same name already exists."),
"warningYouNeedToSelectAssistant" : MessageLookupByLibrary.simpleMessage("You need to select your assistant for this class."),
"warningYouNeedToSelectAtLeastOne" : MessageLookupByLibrary.simpleMessage("You need to select at least one option."),
"websiteCategoryAdministrative" : MessageLookupByLibrary.simpleMessage("Administrative"),
"websiteCategoryAssociations" : MessageLookupByLibrary.simpleMessage("Associations"),
Expand Down
12 changes: 12 additions & 0 deletions lib/generated/intl/messages_ro.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ class MessageLookup extends MessageLookupByLibrary {
"buttonSend" : MessageLookupByLibrary.simpleMessage("Trimitere"),
"buttonSet" : MessageLookupByLibrary.simpleMessage("Setează"),
"errorAccountDisabled" : MessageLookupByLibrary.simpleMessage("Contul a fost dezactivat."),
"errorAnswerCannotBeEmpty" : MessageLookupByLibrary.simpleMessage("Răspunsul trebuie precizat."),
"errorAnswerIncorrect" : MessageLookupByLibrary.simpleMessage("Răspunsul introdus nu este corect."),
"errorClassCannotBeEmpty" : MessageLookupByLibrary.simpleMessage("Materia trebuie precizată."),
"errorCouldNotLaunchURL" : m1,
"errorEmailInUse" : MessageLookupByLibrary.simpleMessage("Există deja un cont asociat acestui e-mail."),
Expand Down Expand Up @@ -121,6 +123,7 @@ class MessageLookup extends MessageLookupByLibrary {
"infoClasses" : MessageLookupByLibrary.simpleMessage("materiile care vă interesează"),
"infoEmail" : m3,
"infoExportToGoogleCalendar" : MessageLookupByLibrary.simpleMessage("Exportă evenimentele filtrate din Orar"),
"infoFormAnonymous" : MessageLookupByLibrary.simpleMessage("Acest formular este anonim."),
"infoLoading" : MessageLookupByLibrary.simpleMessage("Se încarcă..."),
"infoMakeSureGroupIsSelected" : MessageLookupByLibrary.simpleMessage("Asigurați-vă că aveți grupa/semigrupa selectată în"),
"infoPassword" : MessageLookupByLibrary.simpleMessage("Aceasta trebuie să conțină majuscule, minuscule și cel puțin un număr sau un simbol, având minimum 8 caractere."),
Expand All @@ -131,7 +134,9 @@ class MessageLookup extends MessageLookupByLibrary {
"infoRelevanceNothingSelected" : MessageLookupByLibrary.simpleMessage("Nu selectați nimic dacă este relevant pentru toată lumea."),
"infoSelect" : MessageLookupByLibrary.simpleMessage("Selectați"),
"infoYouNeedToSelect" : MessageLookupByLibrary.simpleMessage("Trebuie întâi să selectați"),
"labelAnswer" : MessageLookupByLibrary.simpleMessage("Răspuns"),
"labelAskPermissions" : MessageLookupByLibrary.simpleMessage("Cere permisiuni de editare"),
"labelAssistant" : MessageLookupByLibrary.simpleMessage("Asistent"),
"labelCategory" : MessageLookupByLibrary.simpleMessage("Categorie"),
"labelClass" : MessageLookupByLibrary.simpleMessage("Materie"),
"labelColor" : MessageLookupByLibrary.simpleMessage("Culoare"),
Expand All @@ -144,7 +149,9 @@ class MessageLookup extends MessageLookupByLibrary {
"labelEnd" : MessageLookupByLibrary.simpleMessage("Sfârșit"),
"labelEvaluation" : MessageLookupByLibrary.simpleMessage("Evaluare"),
"labelEven" : MessageLookupByLibrary.simpleMessage("Pară"),
"labelFeedbackPolicy" : MessageLookupByLibrary.simpleMessage("politica de feedback"),
"labelFirstName" : MessageLookupByLibrary.simpleMessage("Prenume"),
"labelGrade" : MessageLookupByLibrary.simpleMessage("Notă"),
"labelLastName" : MessageLookupByLibrary.simpleMessage("Nume"),
"labelLastUpdated" : MessageLookupByLibrary.simpleMessage("Ultima modificare"),
"labelLecturer" : MessageLookupByLibrary.simpleMessage("Profesor"),
Expand Down Expand Up @@ -176,6 +183,7 @@ class MessageLookup extends MessageLookupByLibrary {
"messageAccountCreated" : MessageLookupByLibrary.simpleMessage("Contul a fost creat cu succes."),
"messageAccountDeleted" : MessageLookupByLibrary.simpleMessage("Contul a fost șters cu succes."),
"messageAddCustomWebsite" : MessageLookupByLibrary.simpleMessage("Încercați să adăugați un website."),
"messageAgreeFeedbackPolicy" : MessageLookupByLibrary.simpleMessage("Înțeleg că acest sondaj este extrem de important pentru dezvoltarea continuă a procesului educațional și voi oferi doar feedback valoros și constructiv pentru această materie."),
"messageAgreePermissions" : MessageLookupByLibrary.simpleMessage("Voi încărca doar informații corecte si precise. Înțeleg că încărcarea informațiilor eronate sau ofensatoare în mod intenționat va conduce la blocarea permisiunilor mele permanent."),
"messageAnnouncedOnMail" : MessageLookupByLibrary.simpleMessage("Veți primi o confirmare pe mail dacă vi se acceptă cererea."),
"messageAskPermissionToEdit" : m6,
Expand All @@ -195,6 +203,7 @@ class MessageLookup extends MessageLookupByLibrary {
"messageEventAdded" : MessageLookupByLibrary.simpleMessage("Eveniment adăugat cu succes."),
"messageEventDeleted" : MessageLookupByLibrary.simpleMessage("Eveniment șters cu succes."),
"messageEventEdited" : MessageLookupByLibrary.simpleMessage("Eveniment modificat cu succes."),
"messageFeedbackHasBeenSent" : MessageLookupByLibrary.simpleMessage("Feedback trimis cu succes."),
"messageGetStartedByPressing" : MessageLookupByLibrary.simpleMessage("Începeți prin a apăsa butonul"),
"messageIAgreeToThe" : MessageLookupByLibrary.simpleMessage("Sunt de acord cu "),
"messageNewUser" : MessageLookupByLibrary.simpleMessage("Utilizator nou?"),
Expand All @@ -217,6 +226,7 @@ class MessageLookup extends MessageLookupByLibrary {
"messageWelcomeSimple" : MessageLookupByLibrary.simpleMessage("Bine ai venit!"),
"messageYouCanContribute" : MessageLookupByLibrary.simpleMessage("Poți contribui la datele din aplicație, dar trebuie mai întâi să ceri permisiuni."),
"navigationAskPermissions" : MessageLookupByLibrary.simpleMessage("Cere permisiuni"),
"navigationClassFeedback" : MessageLookupByLibrary.simpleMessage("Feedback"),
"navigationClassInfo" : MessageLookupByLibrary.simpleMessage("Informații materie"),
"navigationClasses" : MessageLookupByLibrary.simpleMessage("Materii"),
"navigationEventDetails" : MessageLookupByLibrary.simpleMessage("Detalii eveniment"),
Expand Down Expand Up @@ -280,6 +290,7 @@ class MessageLookup extends MessageLookupByLibrary {
"warningEmailInUse" : m10,
"warningEventNotEditable" : MessageLookupByLibrary.simpleMessage("Acest eveniment nu poate fi modificat."),
"warningFavouriteWebsitesInitializationFailed" : MessageLookupByLibrary.simpleMessage("Nu se pot citi date despre site-urile favorite."),
"warningFeedbackAlreadySent" : MessageLookupByLibrary.simpleMessage("Ați trimis deja feedback pentru această materie!"),
"warningFieldCannotBeEmpty" : MessageLookupByLibrary.simpleMessage("Câmpul nu poate fi gol."),
"warningFieldCannotBeZero" : MessageLookupByLibrary.simpleMessage("Câmpul nu poate fi zero."),
"warningFilterAlreadyDisabled" : MessageLookupByLibrary.simpleMessage("Întreg conținutul este vizibil deja."),
Expand All @@ -306,6 +317,7 @@ class MessageLookup extends MessageLookupByLibrary {
"warningUnableToReachNewsFeed" : MessageLookupByLibrary.simpleMessage("Nu am putut încărca fluxul de știri."),
"warningUseProvider" : m12,
"warningWebsiteNameExists" : MessageLookupByLibrary.simpleMessage("Există deja un site cu același nume."),
"warningYouNeedToSelectAssistant" : MessageLookupByLibrary.simpleMessage("Trebuie să selectați asistentul de la această materie."),
"warningYouNeedToSelectAtLeastOne" : MessageLookupByLibrary.simpleMessage("Trebuie să selectați cel puțin o opțiune."),
"websiteCategoryAdministrative" : MessageLookupByLibrary.simpleMessage("Administrativ"),
"websiteCategoryAssociations" : MessageLookupByLibrary.simpleMessage("Asociații"),
Expand Down
Loading

0 comments on commit a07eedd

Please sign in to comment.