quire icon indicating copy to clipboard operation
quire copied to clipboard

Add filters for catalogue grid

Open geealbers opened this issue 5 years ago • 2 comments

As in past catalogues like Ancient Terracottas and Ancient Lamps, Quire should support filters on the catalogue grid so that users can get a visual representation of different groupings. We'd have immediate need for this in the CVA volume, as well as upcoming collection catalogues for the Museum.

filter

The filters will be variable from project to project, so users will need a direct way to choose what keys in the object data to filter on. I would suggest we follow the pattern established with object_display_order (used to populate the entry page tombstones), and establish a new object_filter array.

object_display_order:
  - plates
  - accession_number
object_filter:
  - attribution
  - subject
  - date
object_list:
  - id: 1
    plates: "518–20"
    plate_list: 518, 519, 520
    accession_number: 86.AE.205
    link: http://www.getty.edu/art/collection/objects/11968/
    bareiss_number: 342
    fabric: Athenian
    technique: Red-figure
    shape_name: Krater, Column-
    attribution: Myson
    date: -490 to -480
    subject: akontist, athlete, bridle, deer, dog, goat, *haltēres*, himation, horse, javelin, jumper, *kentron*, *paedotribēs*, palmette (*anthemion*), panther, pick, sponge, staff, stick, strigil, trainer

And with this, we'd also need to establish some way to control whether or not the filters display and on what pages. Perhaps we add an object_filter: true parameter to the page yaml where it should display? Or it might be cleaner to do it with a class, rather than add a specialty page yaml key like object_filter.

type: contents
class: grid filter

Notes

Although the filter would primarily be used on pages where the contents list is displayed as a grid of image cards, I think we might as well make it so that it could filter contents lists in whatever display mode they are in. In this way we could facilitate a grid vs. list view down the road, or other such feature.

One of the most common filters for us would be to filter by date, but I think that will require some conversation as to how to best facilitate that. First in filtering interface. Would we construct a dropdown list of applicable ranges like in Terracottas or would we want to introduce something like the slider in Ancient Lamps? And second in the YAML, where we'll need to standardize the way dates (which could be singular or a range) are entered. We would need something like:

start_date: -490
end_date: -480

Or maybe just:

dates: 
  - -490
  - -480

geealbers avatar Mar 05 '19 21:03 geealbers

One enhancement to this feature that would go beyond previous implementations, but might prove to be very useful, would be to make the filter results linkable. This would allow readers to share specific groupings, but more importantly would let authors link to specific grouping within the text of the book.

geealbers avatar Mar 06 '19 16:03 geealbers

Approved for development: https://jira.getty.edu/browse/DEV-6508

geealbers avatar Feb 18 '21 19:02 geealbers