Skip to content

Conversation

@annavik
Copy link
Member

@annavik annavik commented Aug 29, 2023

In this PR we setup UI for occurrence details -> identifications. Also we are adding information related to determinations and identifications in table view.

List identifications:
Screenshot 2023-09-22 at 17 45 02

Suggest new ID:
Screenshot 2023-09-22 at 17 44 51

Table view:
Screenshot 2023-09-22 at 17 45 57

@annavik annavik requested a review from mihow August 29, 2023 11:57
@netlify
Copy link

netlify bot commented Aug 29, 2023

Deploy Preview for ami-web ready!

Name Link
🔨 Latest commit
🔍 Latest deploy log https://app.netlify.com/sites/ami-web/deploys/650e153870ade64707c632bb
😎 Deploy Preview https://deploy-preview-214--ami-web.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 51
Accessibility: 100
Best Practices: 92
SEO: 92
PWA: 70
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Aug 29, 2023

Deploy Preview for ami-storybook canceled.

Name Link
🔨 Latest commit 587e4da
🔍 Latest deploy log https://app.netlify.com/sites/ami-storybook/deploys/650e0e48676e0c00080c1964

@annavik
Copy link
Member Author

annavik commented Aug 30, 2023

@mihow I have tweaked the component API:s to better match how we intend to use them. Example:

Screenshot 2023-08-30 at 10 38 32

@annavik annavik changed the title Setup UI components for identification tab [Draft]: Setup UI components for identification tab Sep 13, 2023
@mihow
Copy link
Collaborator

mihow commented Sep 21, 2023

This is actually working pretty well as-is! Can we merge soon and then add your new UI ideas in a follow up PR?

One feature request: a status indicator when searching species. I can't tell if my search has zero results or if there is a lag. I will work on reducing the lag, but there will always be cases where the network might lag.

@mihow
Copy link
Collaborator

mihow commented Sep 22, 2023

  • Fixed issue when adding more than 2 identifications for an occurrence
  • Added limit parameter to taxon search/suggest endpoint & sped up queries
  • Added "withdrawn" attribute to Identifications. When a user adds a new identification, all of their previous IDs will have withdrawn: true. This may no be necessary but giving it a try. Could be use for strikethrough names.
  • Added new nested determination_details attribute to Occurrences, which looks like:
occurrence: {
  determination_details: {
      taxon: // taxon determined by all IDs & backend logic
      identification: // best identification used for final ID, if there is one
      prediction: // best prediction, if there is no identifications
      score: // repeat of the best prediction score if using predictions. but otherwise 1 if identified by human, 0 if no identifications or predictions.
      }
}

determination: Taxon and determination_score: float attributes remain for temporary backwards compatibility. We can rename determination_details to determination when/if ready.

@mihow
Copy link
Collaborator

mihow commented Sep 22, 2023

Will you sort the identifications & predictions by most recent first? They should be listed in that order in the API response as well.

image

@mihow
Copy link
Collaborator

mihow commented Sep 22, 2023

In the mini inline taxonomy, the nodes should be ordered by "deepest" parent first. Right now it seems to be in reverse. We can revise how parents are returned in the API response if that's tricky to render right now.

image

@annavik annavik changed the title [Draft]: Setup UI components for identification tab Setup UI for identifications Sep 22, 2023
@annavik
Copy link
Member Author

annavik commented Sep 22, 2023

Hey @mihow, think we can merge this beast now and add continue in upcoming PR! The things you mentioned above should be fixed (except for search loading state).

Next up:

  • Test some UI variants of "Suggest ID", not 100% happy with it
  • Add button "Agree" to table view, occurrence details header and to list of identifications
  • Make it possible to withdraw identification
  • Search loading state

@mihow
Copy link
Collaborator

mihow commented Sep 22, 2023

Looking good! I pushed fixes to the limit parameter and the missing withdraw attribute.

Here are the top todo's IMO for the next revision:

  • Add button "Agree" to table view
  • Add permissions check for creating new identifications
  • Add tests on the backend for new & changed IDs
  • Get feedback on UI, bring back auto focus into search box?

@mihow mihow merged commit 2d1c0d4 into main Sep 22, 2023
@annavik annavik deleted the web-ui-identification-components branch October 11, 2023 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants