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

Feedback widget #927

Merged
merged 3 commits into from
Nov 22, 2023
Merged

Feedback widget #927

merged 3 commits into from
Nov 22, 2023

Conversation

Fbasham
Copy link
Member

@Fbasham Fbasham commented Nov 16, 2023

Switch Report a problem widget for feedback widget

The report a problem component has been decommissioned in favour of using the feedback widget (read the design specs in the attached ADO card link above). This widget has a few different states. Initially it should display an interactive component that asks the user if they would like to submit feedback. If yes is clicked, the widget displays a thank you message. If no is clicked, a form is displayed where users must input one of the radio buttons, the extra details textarea is optional. After submitting, the same thank you message is displayed as in if the user clicked the yes button.

There is client-side validation that checks if the radio group has an input that's been clicked. There is also server-side validation that checks this as well. If no input has been checked, the server returns a 400 bad request, but still displays the thank you message. If the submission is successful, the widget returns a 200 status and shows the thank you. If there is a failure because an error is caught, the server returns a 500 status and also displays the thank you message. These are tested in a unit test.

Note:
the following env var have been added/updated (check the ADO pipeline to get their values):

  • NOTIFY_FEEDBACK_TEMPLATE_ID
  • NOTIFY_API_KEY

Copy link

Copy link

@andr0272
Copy link
Contributor

Check out a preview of your pull request here: https://app-servicecanadalabs-dev-pr-preview-3.azurewebsites.net

@Fbasham Fbasham requested a review from a team November 16, 2023 12:54
Copy link
Member

@will0684 will0684 left a comment

Choose a reason for hiding this comment

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

Looks good and works as expected great work!

@andr0272
Copy link
Contributor

Check out a preview of your pull request here: https://app-servicecanadalabs-dev-pr-preview-3.azurewebsites.net

@Fbasham Fbasham merged commit 5c862c6 into main Nov 22, 2023
5 checks passed
@Fbasham Fbasham deleted the feedback-widget branch November 22, 2023 11:54
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.

3 participants