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

feat(storage-responses/2): render individual storage mode form response #4001

Merged
merged 11 commits into from
Jul 6, 2022

Conversation

karrui
Copy link
Contributor

@karrui karrui commented Jun 16, 2022

Builds on top of PR to add ResponseTable, #4000.

Problem

This PR implements individual storage mode form response feature.
It is available on its own endpoint, meaning form admins can navigate to the individual response if they wanted to.

Some metadata is lost if an individual response is navigated to, such as its respondent index from the table, or the ability to go to the next/previous response.
If navigated via the response table, moving to the next/previous respondent will move the page number of the table backlink accordingly.

Allows for downloading of individual attachment in this view, though not the entire attachments of the individual response (pending design).

Related to #3128

TODO: (will be done in future PRs)

  • add feature to download all attachments in submission to achieve feature parity with current AngularJS client.
  • add hover/active styling when clicking in from response table

Solution

Features:

  • feat: add IndividualResponsePage and route
  • feat: add DecryptedRow component to render responses inside the decrypted submission
  • feat: allow nav between individual responses when metadata exists

Bug Fixes:

Bug fix logic will also be moved to the develop branch for backwards compatibility

This PR also contains a bug fix for the bug where the server will reject form submissions due to perceived missing fields due to the change in processing of mobile and email fields in storage mode:

  • previously (and the current behaviour in develop), all mobile and email field answers are sent to the server in storage mode due to the possibility of requiring the data to email users or to verify fields.
  • in refactor(v2/submit-4): add storage mode form submission #3600, the behaviour of the fields to send to the server in storage mode was tightened to only send the minimum data required. This conflicts with the fields the server expects to receive and would return a conflict error.

Before & After Screenshots

TODO: add stories

@karrui karrui force-pushed the form-v2/responses/individual-responses-2 branch from 9c091fd to 178c403 Compare June 17, 2022 02:47
@karrui karrui requested a review from timotheeg June 20, 2022 07:14
@karrui karrui force-pushed the form-v2/responses/individual-responses-2 branch from 178c403 to e781df9 Compare June 28, 2022 02:55
Copy link
Contributor

@timotheeg timotheeg left a comment

Choose a reason for hiding this comment

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

lgtm

Base automatically changed from form-v2/responses/responses-table to form-v2/develop July 6, 2022 08:21
@karrui karrui force-pushed the form-v2/responses/individual-responses-2 branch from 7a9ecb4 to 7e3964e Compare July 6, 2022 08:26
@karrui karrui merged commit bf681fc into form-v2/develop Jul 6, 2022
@karrui karrui deleted the form-v2/responses/individual-responses-2 branch July 6, 2022 08:48
@karrui karrui mentioned this pull request Aug 17, 2022
1 task
@justynoh justynoh mentioned this pull request Oct 5, 2022
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