-
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 #174
Conversation
Note - do not merge until read from primary is verified, and internal processes are complete. |
881252f
to
c2d829a
Compare
@liangyuanruo Ah OK I didn't know the scan and serve can be so expensive on Mongo. I thought it would be more like the equivalent of a One thing we can do is to just add a button to trigger the filter instead of doing debouncing and triggering on keydowns. |
We already have an index on the
Something like that could work, although we should probably introduce both a "search" and a "clear" button. I'll create a new issue for awareness since the potential fixes would involve engineering as well as design. |
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.
Blocked by #276.
514be69
to
d3fb59f
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.
Can we put in a Reset button too? The current UI will confuse users because it doesn't quite make sense to filter when the search box is empty. Could we also disable the filter button if the input doesn't match the regex for a MongoDB ObjectID (/^[0-9a-fA-F]{24}$/
)? This could save on network calls to the backend.
For the Reset button, I suspect we can reuse the same styling as "Open in new window".
@liangyuanruo I suspect introducing a "Clear" button that sends a request to the backend to paginate will cause the # of requests to increase. Instead of clearing the textbox manually and pasting in the next ID, users may decide to just click the Clear button to clear the textbox. This brings us back to the same issue that we had with the original design. |
@liangyuanruo Updated per discussion. |
9772a76
to
d88957a
Compare
@liangyuanruo I updated this based on the design in #276 -- main change being that I let the text box appear on a second row instead as it is a bit of a squeeze in the zeplin mockup if the user's screen is too narrow. Let me know what you think! |
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.
thanks @frankchn . i tested the new behavior and it's great. can we do up the UI before merging:
@frankchn adding on
|
Hi @syan-syan, made the second change, but the |
@liangyuanruo PTAL again, thanks! |
I know, I'm thinking it may be scary to users since 'Reset' is often associated with drastic changes (could be wiping out all the data?), while what people generally expect with 'Refresh' is what we have planned for showing the unfiltered results |
@syan-syan No problem, updated! cc @liangyuanruo |
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.
lgtm @frankchn , except for a last-bit layout issue for the iPad Pro. could i trouble you to fine-tune the CSS?
afb292d
to
912c8b8
Compare
I am thinking of merging this and getting some feedback, and also changed the text for going back to looking at all responses to "View All". I think users might just end up clicking "Refresh" if they want to reload the particular filtered item. |
* feat: Filter Storage Mode Responses by Submission Id (updated 2020-09-13) * Update page design so that it is compatible with tablets and everything is on one row * Update CSS for iPad
* feat: Filter Storage Mode Responses by Submission Id (#174) * feat: Filter Storage Mode Responses by Submission Id (updated 2020-09-13) * Update page design so that it is compatible with tablets and everything is on one row * Update CSS for iPad * fix: add else on Submission.aggregate to prevent indefinite query * refactor: fix logging format Co-authored-by: Frank Chen <[email protected]> Co-authored-by: Antariksh Mahajan <[email protected]>
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
Notes
This is a resubmission of #71 as the earlier PR was reverted due to performance issues.