Open sarahtress opened 3 months ago
for now I added sorting for all 3 columns into 1 ticket, but we could split up into more tickets if that were to make sense
this is blocked until filters are implemented (because of Reset button and styling around it)
User Story
As somebody viewing the eCR Library, I want to be able to sort by Patient Name, Received Date, and Encounter Date, so that I can more easily find the eCRs I'm interested in and better group them within the table
Acceptance Criteria
[ ] Sorting is available for 3 columns in the eCR Library Table:
[ ] Sorting styling and functionality matches what's outlined in USWDS table component guidance
[ ] The default sort is that the table is sorted by Received Date, with the most recent eCRs at the top. The arrow next to Received Date should be pointing up by default always to indicate this sort, but the column should not be highlighted blue until somebody clicks the arrow again
[ ] When any sort is applied, a Refresh button appears to the right of the filters, like in the screenshot below. Clicking the button resets any user defined sorting and filters:
[ ] If there is significant loading time, show shimmer loading effect to let the user know it's processing the request (this can be broken into another ticket if it's too much work for this ticket)
[ ] When the user refreshes the browser, sorting is NOT refreshed
Scenarios
Scenario 1:
Patient
andEncounter Date
column headers, and a single arrow pointing up to the right ofReceived Date
column headerScenario 2:
Patient
arrow iconReset
button to the right of the filtersPatient
arrow icon againReset
button, the sort goes back to the default sort and there are no columns highlighted in blueScenario 3:
Encounter Date
arrow iconReset
button to the right of the filtersEncounter Date
arrow icon againReset
button, the sort goes back to the default sort and there are no columns highlighted in blueScenario 4:
Received Date
arrow iconReset
button to the right of the filtersReset
button, the sort goes back to the default sort and there are no columns highlighted in blueDesign Notes
No Figma designs specific to sorting since there isn't anything to prototype beyond what's already built into USWDS table component!
Additional context
We will likely add sorting for Condition, and maybe Rule Summary, but for now we're starting with the higher priority columns to add sorting functionality