thegetty / terracottas

Ancient Terracottas from South Italy and Sicily, by Maria Lucia Ferruzza
http://www.getty.edu/publications/terracottas
Other
10 stars 2 forks source link

Make catalogue grid sortable #11

Closed egardner closed 8 years ago

egardner commented 8 years ago

As of 0cbeab4d9c0d0f25111670ca86824d947e3ed181 the card grid now outputs a series of data- attributes which can be used for sorting. Right now the available attributes are:

Others could be added (but some, like Date, would need to be normalized first). The idea is to have one or more drop-downs which allow users to sort by these values, or exclude all entries except for a subset (show only heads, for example").

egardner commented 8 years ago

Possible libraries to use for this:

Maybe others...

egardner commented 8 years ago

Basic implementation of this is now working. Will make some improvements in coming days.

geealbers commented 8 years ago

Nice! You may already have this in mind, but for the locations, I think it should reflect and reinforce the catalogue organization as it's seen in the TOC. So, I'd change the label from "Region" to "Location" and then have the dropdown options something like:

Not necessarily a nested list, but styled in some way to suggest this structure.

geealbers commented 8 years ago

And can we add something to indicate the results of the sort? A label that changes with the sort: "37 of 60 Objects", "4 of 60 Objects", etc.? Or a simple visual representation could be cool. It just felt off to me whenever I would sort and nothing visually changed (because it was happening lower).

egardner commented 8 years ago

I was thinking about this – I'll look into adding a result counter or otherwise indicating things have changed with some kind of animation.

Also currently the filters are not cumulative, so I need to make them aware of one another...

egardner commented 8 years ago

As of f01e66b326098c75288a2118d27fe527d13fdfbe basic features are now working.

Things to add:

This code could probably also be re-factored into a more object-oriented pattern (a catalogue object that has a selection property to manage state, a render method, etc. – instead of scattering these into separate functions).

egardner commented 8 years ago

I'm going to treat animation as an added feature and look into ways to add that later. For now this component is working.