Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent search for collections behavior #6120

Open
1 task done
goplayoutside3 opened this issue Jun 5, 2024 · 3 comments
Open
1 task done

Inconsistent search for collections behavior #6120

goplayoutside3 opened this issue Jun 5, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@goplayoutside3
Copy link
Contributor

goplayoutside3 commented Jun 5, 2024

Package

Choose from the list:

  • app-project

Describe the bug

The 'search for collections' feature is intended to return a list of a user's collections where the collection name matches the search text-input.

The search behavior is inconsistent and originally reported in this PFE Issue: zooniverse/Panoptes-Front-End#7121

When adding a subject into an existing collection from the classification interface of a new frontend project, the search gives nice results - I get all three birds collections displayed immediately after typing 'bir'. Sadly, there seems to be a bug - if I type one more character ('bird'), it displays all my collections (Corpses, WOW, COOL, etc.) instead of just the three that actually include 'Birds' in their name. And after typing another one more character 'birds' it gives me the 'No matches found' result.

To Reproduce

In the video below my account has six collections. Three have the word 'birds' in the name:

  1. Birds One
  2. Birds Two
  3. Third named birds

When I search three letters 'bir', all three collections appear. However, when I search with four letters 'bird', all six of my collections appear regardless if bird is in the name. When I type five letters 'birds', only the first two collections with birds in the name appear. When I type a space after the five letters 'birds ', the list of collections is filtered to the three with 'birds' in the name.

This behavior is unexpected and buggy. Users should be able to type a string of text into the search field and see list of their collections where the name of the collection matches the string of text.

Screenshots

birds.mov

Additional Info

Collections search last edited in #4867

Link to CollectionsModal search field in the codebase.

CollectionsModal Storybook

@goplayoutside3 goplayoutside3 added the bug Something isn't working label Jun 5, 2024
@goplayoutside3
Copy link
Contributor Author

@yshish I've copied your original collections search bug report here. Thanks again!

@eatyourgreens
Copy link
Contributor

eatyourgreens commented Jun 10, 2024

However, when I search with four letters 'bird', all six of my collections appear regardless if bird is in the name.

I just realised that this is a really simple bug in my original collections search code. The text box isn’t waiting for search results to be fetched from Panoptes. #6127 fixes it.

@eatyourgreens
Copy link
Contributor

eatyourgreens commented Jun 10, 2024

When I type five letters 'birds', only the first two collections with birds in the name appear. When I type a space after the five letters 'birds ', the list of collections is filtered to the three with 'birds' in the name.

With five characters or more, you should be seeing whichever collections are sent back by the collections search here:
https://github.com/zooniverse/panoptes/blob/6b7c85ee3b8191d3dbfd568409fc27fb2fcc3faf/app/models/collection.rb#L23-L26

My own experience is that the Panoptes full-text search doesn't always match what you'd expect for short search strings. That's also true for other full-text searches, such as searching projects by name, or Zooniverse users by login.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants