amy-jung / collectivedaoarchives.catalog

The Collective DAO Catalog is an open source index of DAO historical events. Together, as an open source database that anyone can contribute to, we can use the power of collective intelligence to highlight patterns and improve the development of new and existing DAOs
https://www.daocatalog.xyz/
MIT License
6 stars 1 forks source link

Advanced search #48

Closed damianmarti closed 9 months ago

damianmarti commented 9 months ago

Add advanced search to the backend and links to entity searches to the frontend.

The search endpoint now allows to filter by organization, author, and category, and sort by date, author and organization, asc and desc (plus the default rank sorting order).

Links to the searches filtering by organization, author, and category were added to the RecordTeaser and the record page.

The search result page will filter the results if the filters are set and will keep the filters between pages.

There are some improvements to do with the URLs generated on the paginations (like avoiding empty fields) that maybe we can improve later.

vercel[bot] commented 9 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
collectivedaoarchives-catalog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 6, 2023 0:31am
carletex commented 9 months ago

Hey @damianmarti,

thanks for this!

Found a couple of issues with the sorting (fix attempt on https://github.com/amy-jung/collectivedaoarchives.catalog/pull/48/commits/a7054235f0b2c0f066985fa14ce9262075dccfe0)

  1. null/"" values where appearing first in date-desc and author-asc
  2. It was case-sensitive, so uppercase Organizations/Authors where appearing after/before lowercase ones (depending on asc/desc)

Also clean up the URL on search for https://github.com/amy-jung/collectivedaoarchives.catalog/pull/48/commits/7b65b4ab74ab070826c2888460dc05c299245780

Please test and merge (if it works :))

Thanks!