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

As a front end user, I want to filter documents by date so that I can find documents known to be from a particular time period. #865

Closed
13 tasks done
rlskoeser opened this issue May 16, 2022 · 13 comments
Assignees

Comments

@rlskoeser
Copy link
Contributor

rlskoeser commented May 16, 2022

testing notes

Try out the new document date filter on the document search on the test site. Note that filtering will only work on documents with standard dates that can be parsed by the new code, so there may be some dates that display that cannot be used for filtering or sorting.

  • documents after x date (start date but no end date in range filter)
  • documents before x date (end date but no start in range filter)
  • documents between x and y dates (set both start and end date)
  • documents from a single year (set start and end to same date)
  • try putting in a year that's out of range — should warn you
  • try putting a start that's after the end — should warn about invalid range

dev notes

  • index standardized date as date range in solr
  • add date range filter to form
  • display date range on search page
  • add date range filtering to view
  • style date range filter inputs
  • index and populate min/max dates for validation and placeholder display
  • unit tests for view functionality and indexing
@rlskoeser rlskoeser self-assigned this May 16, 2022
@rlskoeser rlskoeser changed the title As a front end user, I want a filter documents by date so that I can find documents known to be from a particular time period. As a front end user, I want to filter documents by date so that I can find documents known to be from a particular time period. May 17, 2022
blms added a commit that referenced this issue May 17, 2022
@rlskoeser rlskoeser added the 🗜️ awaiting testing Implemented and ready to be tested label May 18, 2022
@richmanrachel
Copy link

@rlskoeser - functionality works and is so cool!!!

Design wise, I think we should spend a little more time on this. I wouldn't have known how to use these boxes properly without the testing instructions:
image

I think part of the confusion stems from having the numbers 775 and 1965 in gray. They're good numbers to capture the range of Geniza fragments, but they're so far outside the field that my brain didn't know how to interpret them at first.

Should we create a separate issue for design?

@rlskoeser
Copy link
Contributor Author

@richmanrachel I think you're not seeing the latest styles, would you try a hard refresh and see if the design looks more usable? (We may still need additional instructions)

@richmanrachel
Copy link

You're right, this is a little better:
image

Could we add "From" and "To" before the input boxes and clarify that these are dates in CE?

@richmanrachel
Copy link

@rlskoeser - also, if we're not using the filter to include dates in other calendar types, can we make the full dates searchable (so you can put 4963 into the search to get the AM docs dated to that year)?

@rlskoeser
Copy link
Contributor Author

@gissoo could you advise? Your designs had "From Year" and "To Year" as placeholder text, but we can't do non-numeric placeholders for a numeric input. Would it work to add labels to the left of the inputs?

@richmanrachel would it work to make the label Document Dates (CE), or does the CE need to be elsewhere? Also, should it be Document Dates or Document Date ?

@rlskoeser
Copy link
Contributor Author

@richmanrachel yes! I think that would be covered by the date searching we discussed yesterday, I hadn't gotten around to creating an issue yet. Great to have a specific use case.

@richmanrachel
Copy link

@rlskoeser - having Document Dates (CE) as the title makes sense to me. I think the plural is fine since you're searching for multiple documents most of the time? I'll double check with Marina

@rlskoeser
Copy link
Contributor Author

Yes, you're filtering on multiple documents but each one only has one date; I'm not sure semantically which makes more sense.

@rlskoeser rlskoeser added ⚠️ tested needs attention Has been through acceptance testing and needs additional work and removed 🗜️ awaiting testing Implemented and ready to be tested labels May 24, 2022
@gissoo
Copy link
Contributor

gissoo commented May 24, 2022

@rlskoeser we could add labels to the left of the fields, I think!

@gissoo
Copy link
Contributor

gissoo commented May 24, 2022

Just noticing some things here for usability / potentially problematic:

  • whenever there is an alert/invalid message the fields jump and I'm selecting the "has image" filter by mistake.
  • it's not a great experience that when you change the "from" date to a value that exceeds the "to" date you instantly get an "invalid" message – could it update the "to" date to match the "From" date by default? Or just reset the "to" date field when you revise the "from" date?

Screen Shot 2022-05-24 at 10 48 59 AM

@rlskoeser rlskoeser modified the milestone: date filtering & sorting May 24, 2022
@rlskoeser
Copy link
Contributor Author

@gissoo I'm disinclined to add extra logic because it could introduce false assumptions or unnecessary assumptions (e.g., it could make as much sense to clear out the other value as to increase it), and also because it increases the complexity of the code.

The jump in fields is not great and should probably be addressed; hopefully there's a simple way to adjust the spacing so that the error message space is always accounted for.

blms added a commit that referenced this issue Jun 2, 2022
@rlskoeser rlskoeser added 🗜️ awaiting testing Implemented and ready to be tested and removed ⚠️ tested needs attention Has been through acceptance testing and needs additional work labels Jun 2, 2022
@rlskoeser
Copy link
Contributor Author

@richmanrachel have updated to add labels on the date filter fields as you requested. I've also adjusted the order and labels for the sort options as we discussed in our meeting today. Please confirm on the test site: https://test-geniza.cdh.princeton.edu/en/documents/

@richmanrachel
Copy link

@rlskoeser - I love it! Closing.

@rlskoeser rlskoeser removed the 🗜️ awaiting testing Implemented and ready to be tested label Jun 6, 2022
rlskoeser pushed a commit that referenced this issue Jun 15, 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

No branches or pull requests

3 participants