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: refresh storage mode responses when navigating to data / responses tab #210

Closed
wants to merge 3 commits into from

Conversation

tshuli
Copy link
Contributor

@tshuli tshuli commented Aug 25, 2020

Problem

Closes #182

Tests

  • Create a storage mode form. Activate the form. Go to the Data tab in the admin panel. The responses view should say "This form doesn't have any responses yet.".
  • Submit a response. Click the feedback sub-tab and then back to responses. The response count should now be 1.
  • Submit another responses. Click the Share tab and then back to Data. The response count
    should now be 2.
  • Unlock responses. Submit another response. Click the feedback sub-tab and then back to responses. The response count should now be 3. Check that the responses are correctly reflected in the list of responses.
  • Submit another responses. Click the Share tab and then back to Data. The response count should now be 4. Check that the responses are correctly reflected in the list of responses.
  • Open a response in the list. Submit another response. Exit the response view. The response count should now be 5. Check that the responses are correctly reflected in the list of responses.

@tshuli tshuli force-pushed the refresh-responses branch 2 times, most recently from 910386e to 6add7ae Compare August 26, 2020 02:57
@tshuli tshuli force-pushed the refresh-responses branch from 6add7ae to b6f0a92 Compare August 26, 2020 03:37
@tshuli tshuli changed the title wip: feat: refresh responses when navigating to Data / Responses tab feat: refresh responses when navigating to Data / Responses tab Aug 27, 2020
@tshuli tshuli changed the title feat: refresh responses when navigating to Data / Responses tab feat: refresh storage mode responses when navigating to data / responses tab Aug 27, 2020
@tshuli tshuli requested review from karrui and mantariksh August 27, 2020 02:33
@tshuli tshuli marked this pull request as ready for review August 27, 2020 02:33
Copy link
Contributor

@mantariksh mantariksh left a comment

Choose a reason for hiding this comment

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

Hmm, tbh I'm not sure if this is the right approach. Refreshing upon every single access of the tab might place a large load on the Submissions collection. A better approach might be to have a refresh button which allows admins to choose when to refresh the list, but that will require design input. @karrui thoughts?

@tshuli tshuli requested a review from liangyuanruo September 2, 2020 02:23
@tshuli
Copy link
Contributor Author

tshuli commented Sep 2, 2020

as discussed at sync-up, @liangyuanruo to review before we decide what to do next

@r00dgirl
Copy link
Contributor

r00dgirl commented Sep 2, 2020

not sure if this has alr been discussed but perhaps we can put in a check to compare response count or on timestamp of latest response before triggering the refresh @shuli-ogp @liangyuanruo

@liangyuanruo
Copy link
Contributor

De-prioritising this improvement in UX due to potential to introduce database performance problems, as discovered in #174.

@liangyuanruo liangyuanruo deleted the refresh-responses branch September 7, 2020 08:29
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.

Improve refresh trigger for storage mode responses
4 participants