-
Notifications
You must be signed in to change notification settings - Fork 87
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: Filter Storage Mode Responses by Submission Id #71
Conversation
Some design help for the "no responses found screen/table" and the exact placement for the filter textbox will be much appreciated. |
Have uploaded screens on Zeplin for implementation |
4486480
to
f65693a
Compare
@liangyuanruo can you take a look? this is pretty close -- I just don't have the SVG for the "filter" icon. |
Hey @frankchn , I just tried it out the feature, and noticed a few things
|
f73df5e
to
5f56ba6
Compare
@liangyuanruo Thanks for the comments! I updated the functionality per your suggestion in (1) and tested (2) to verify that file upload works with the latest rebase. |
5f56ba6
to
d79ec17
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tested this branch on the staging environment - the database query isn't using existing indexes when the ObjectID is included in the query, triggering a collection scan and eventual 504 Gateway Timeout.
I think we'll have to investigate further on what's the best way to improve this. Some of the steps in the aggregate pipeline is clearly unnecessary if a query is only going to return metadata of a single response, so perhaps we could cater to 3 query types
- Valid submission ID included - return single result (TODO)
- Invalid submission ID - return empty output (done)
- No submission ID - execute existing production query
You can force push to staging
branch if you'd like to test out the performance on a production-scale dataset:
git push -f origin frank-search-response:staging
src/public/modules/forms/services/submissions.client.factory.js
Outdated
Show resolved
Hide resolved
OK I guess if MongoDB isn't quite smart enough to use the index, we will just have to do a single item query. |
@liangyuanruo Tested on staging and both attachment upload and filtering should work now that we switched to |
This reverts commit eaef2eb.
Problem
Users have trouble finding specific responses and trying to download attachments for these responses.
Solution
This introduces a new textbox which filters submissions by reference ID so users can jump to a certain response immediately.
Screenshots