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

feat: Select new file #77

Closed oliverroick closed 1 year ago

oliverroick commented 1 year ago

Resolves #59

oliverroick commented 1 year ago

@LanesGood I addressed the comments

oliverroick commented 1 year ago

This workflow technically doesn't have a UI to display the error.

For the initial file select, we do the following:

  1. Display the AudioSelectForm
  2. User selects file
  3. AudioSelectForm validates the file, and a. displays an error in the form if invalid, or b. sets the file in the page state, which then renders the spectrogram

If you reset the file it never uses the AudioSelectForm, everything happens outside any React components until we set the file, which just replaces what we show in the spectrogram. There's no way to load the AudioSelectForm with the file and display the error.

What we can do:

LanesGood commented 1 year ago

@oliverroick I think the second option you've proposed makes sense, as long as there are indicators/divisions to help users understand that the error is for the new file.

As a UI proposal, would something like the below be a logical error state? image

oliverroick commented 1 year ago

@LanesGood Added the error message