developmentseed / bioacoustics-frontend

Frontend code for the Google Bioacoustics project that's used by A2O Search
https://search.acousticobservatory.org/
MIT License
1 stars 0 forks source link

Search permalinks #125

Closed geohacker closed 1 year ago

geohacker commented 1 year ago

Now that we have search and are thinking about workflows like #123 we should figure what it takes to permalink a search result. This allows easy sharing and collaboration. There's no clear ask from any of the partners yet but would be good to gauge interest.

When a search is run:

  1. Store the raw audio and embedding somewhere, may in object storage + a search id in the database
  2. Prepare a uuid or so that the frontend can use
  3. Create a link

cc @willemarcel @oliverroick @batpad @sunu

oliverroick commented 1 year ago

We might also want to consider persisting the state of search results, i.e. filters selected, pagination, state of the results map, so users can share the exact view if results.

sunu commented 1 year ago

Would it be possible to save filters, pagination state etc as part of the search url itself, something like: https://ecoecho.ds.io/search?q=audio-uuid&sites=A&page=3 and share that?

geohacker commented 1 year ago

@oliverroick could we do this workflow as part of a 'Share' button? That way, we don't automatically make search audio public in case a user doesn't want to.

oliverroick commented 1 year ago

@geohacker Not sure I fully understand what you're asking for.

Are you saying, we shouldn't update the URL in the browser and instead generate the share URL with the query parameters when the user clicks that button, and we copy the URL to the clipboard?

geohacker commented 1 year ago

@oliverroick Looks like the permalinks are using http so are failing on the the ecocho.ds.io site. Would you be able to take a look?

geohacker commented 1 year ago

This is complete!