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/1): render storage mode responses metadata in table #4000

Merged
merged 18 commits into from
Jul 6, 2022

Conversation

karrui
Copy link
Contributor

@karrui karrui commented Jun 16, 2022

No panik at number of lines changed... most come from storybook and msw setup.

edit: wow we are at #4000... i think even the old formsg repo before we open sourced had have this amount... that's awesome.

Problem

This PR implements the table to display metadata of a storage-mode form's responses.

There are also some groundwork done to prepare for navigation of individual responses when clicking into the table row, though that full implementation will come in a later PR.

Closes #3127

Solution

Features:

  • feat: add ResponsesTable component to render metadata of storage-mode responses.
    • some prerendering of the next +/- 1 pages of metadata is done to facilitate individual response navigation, may be removed if it adds too much strain to the server.

Improvements:

  • feat: move StorageResponsesProvider into admin form layout

    • so navigating throughout the form will not reset the secret key once entered
  • feat: update app router to use ResponsesLayout for consistent layout inside the responses subroute.

  • Details ...

Before & After Screenshots

New stories have been added to render unlocked storage mode responses view.

@karrui karrui requested a review from timotheeg June 20, 2022 07:13
Copy link
Contributor

@hanstirtaputra hanstirtaputra left a comment

Choose a reason for hiding this comment

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

LGTM.

Btw, sometimes I can only unlock responses in the storybook for "Storage Form Unlocked" when I "open canvas in new tab"

@karrui
Copy link
Contributor Author

karrui commented Jun 21, 2022

LGTM.

Btw, sometimes I can only unlock responses in the storybook for "Storage Form Unlocked" when I "open canvas in new tab"

Yea, that due to stories rerendering multiple times. Suspect it is due to creating a new react-query client on every story. No big deal, we'll get to it when we get to it 😂

Can remount story using the remount icon in the storybook top bar

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

# Conflicts:
#	frontend/src/mocks/msw/handlers/admin-form/form.ts
@karrui karrui merged commit ef8fab2 into form-v2/develop Jul 6, 2022
@karrui karrui deleted the form-v2/responses/responses-table branch July 6, 2022 08:21
@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.

3 participants