Skip to content

Conversation

annavik
Copy link
Member

@annavik annavik commented Jul 12, 2024

In this PR we setup bulk actions for occurrences. At the moment it's possible to agree in bulk and also to apply ID in bulk. The apply options are currently a list of all the common ranks among the selected occurrences. Also we will show the recently applied identification as an apply option.

Comments for later:

Screenshots:

Skärmavbild 2024-07-12 kl  18 22 17
Skärmavbild 2024-07-12 kl  18 22 28

Copy link

netlify bot commented Jul 12, 2024

Deploy Preview for ami-storybook ready!

Name Link
🔨 Latest commit 03a5142
🔍 Latest deploy log https://app.netlify.com/sites/ami-storybook/deploys/66b123ad953480000818176e
😎 Deploy Preview https://deploy-preview-460--ami-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

Copy link

netlify bot commented Jul 12, 2024

Deploy Preview for ami-web ready!

Name Link
🔨 Latest commit 03a5142
🔍 Latest deploy log https://app.netlify.com/sites/ami-web/deploys/66b123addbbb210008170bdc
😎 Deploy Preview https://deploy-preview-460--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: 34
Accessibility: 95
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.

@mihow
Copy link
Collaborator

mihow commented Jul 29, 2024

TODO for @mihow : At least add Family level taxa choices

@mihow mihow added this to the Internal Beta V2 Release milestone Jul 29, 2024
@mihow mihow added the next up! label Jul 29, 2024
@mihow
Copy link
Collaborator

mihow commented Jul 30, 2024

This one is working great. However one change I purpose is that if you select multiple Occurrences and then use the Apply ID quick action, it should only show the taxa choices that are common among all the choices. Right now it shows all of the taxa from all of the choices. I'm hoping there is a reduce function of some sort that can make that easy!

image

And will you go ahead and try to implement the Suggest ID search for the bulk select?

OR!

As an alternative, we could try a new feature:

Under Apply ID, add a "Recent" section of taxa that were recently applied (maybe saved in the current browser session). This would be pretty handy in multiple cases. But also you could use it as an alternative to search. Because you can search & apply a custom ID to a single Occurrence, then it will show up in the recent column.

Thoughts?

return {
isLoading,
isSuccess,
createIdentifications: async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! The async really pays off here. I see all 16 requests fire off at once and the backend seems to respond quickly.

@mihow
Copy link
Collaborator

mihow commented Jul 30, 2024

One experience detail: if you are sorting by score, as soon as you apply a batch of IDs, the Occurrences disappear because they now have a score of 1. Perhaps this is a feature! Because then you are automatically presented with the next batch to verify, but at first this was confusing. Here are some ideas to consider:

  • Show the results of the identification calls in a modal before the table refreshes (similar to an error modal, but it shows the successes as well).
  • Add an "identified_at" column so it's easy to see what was recently identified by sorting
  • Don't change the score field to 1 when a user verifies a prediction. Perhaps this is confusing for other reasons. We can change the icon, but leave the original machine score? (which would be the most recent machine score). But also I was thinking that this would become a variable score even for humans (the identifier can choose their own score based on confidence).
  • It's not an issue! Once you learn the behavior

@annavik
Copy link
Member Author

annavik commented Aug 2, 2024

This one is working great. However one change I purpose is that if you select multiple Occurrences and then use the Apply ID quick action, it should only show the taxa choices that are common among all the choices. Right now it shows all of the taxa from all of the choices. I'm hoping there is a reduce function of some sort that can make that easy!

image

And will you go ahead and try to implement the Suggest ID search for the bulk select?

OR!

As an alternative, we could try a new feature:

Under Apply ID, add a "Recent" section of taxa that were recently applied (maybe saved in the current browser session). This would be pretty handy in multiple cases. But also you could use it as an alternative to search. Because you can search & apply a custom ID to a single Occurrence, then it will show up in the recent column.

Thoughts?

Ah yes, I should definitely only show the common choices! Also once BE is returning more levels, we can do this without risking excluding some choices that are actually common. But anyhow, I will go ahead and fix this!

For suggest ID, I think yes, but could probably need a bit of thinking through UX wise and I don't see it as a blocker for this feature. I think the thing you pointed out above, error handling and the sticky header thing I mentioned in PR descriptions are the most important things to fix, so will do that first! :)

I like your suggestion with showing recent options, seems handy! Probably pretty straight forward design wise as well. I'll see if I include here, or in a separate branch...

@annavik
Copy link
Member Author

annavik commented Aug 5, 2024

Pushed some updates:

  • Updated logic for apply options (only show common ranks for the selected occurrences)
  • Error handling (show how many requests were rejected and make it possible to retry those)
  • Present recent identifications as apply options

Screenshots:

Common ranks visible for the selected occurrences and also the recently applied taxon:
Skärmavbild 2024-08-05 kl  13 18 23

Case when we have no common ranks for selected occurrences:
Skärmavbild 2024-08-05 kl  13 18 32

Error example:
Skärmavbild 2024-08-05 kl  13 20 28

More info on button hover. On button click, we will retry only the failed requests:
Skärmavbild 2024-08-05 kl  13 20 34

@annavik annavik changed the title [Draft] Bulk actions Bulk actions Aug 5, 2024
@annavik
Copy link
Member Author

annavik commented Aug 5, 2024

I have updated the PR description with current status of this task. I think this one could get merged as is and we can handle what is left as separate issues. Hopefully it's still useful even though we of course also want the taxon updates in order to show better choices :)

@annavik annavik marked this pull request as ready for review August 5, 2024 11:38
@annavik
Copy link
Member Author

annavik commented Aug 5, 2024

Reminders for Anna:

  • Do not close popup on selection change
  • Filter selections based on what is currently visible (for example if sort order is changed and some item is no longer visible, clear that selection)

Update: fixed with last 2 commits 👇

@mihow
Copy link
Collaborator

mihow commented Aug 5, 2024

I love using the new persistent modal while adding to the selection! Merging!

@mihow mihow merged commit 91aaf90 into main Aug 5, 2024
@mihow mihow deleted the feature/bulk-actions branch August 5, 2024 21:35
@mihow mihow removed the next up! label Aug 5, 2024
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.

2 participants