zooniverse / Panoptes-Front-End

Front end for zooniverse/Panoptes
https://www.zooniverse.org
Apache License 2.0
64 stars 75 forks source link

Bad search results while adding a subject to an existing collection #7121

Open yshish opened 4 weeks ago

yshish commented 4 weeks ago

Expected behavior

When searching for an existing collection to add a subject in it, you start typing any word from the collection name and you get a list of your collections (in a pop-up list) containing the typed characters. With some collections it seems to work fine. F.e. collection called Corpses gets listed after typing the first 3 characters "cor". Collection called WOW appears even after typing 2 characters "wo".

The difference seems to be that there's no other collection that would include 'wo' in the name while there's also a collection including 'co' in the name (called 'COOL') - so I believe it requires 3 characters for the 'Corpses' to sort out whether I search for 'corpses' or 'cool'. I'm surprised it doesn't show me both after typing 'co' though, as it is something I expect as a user. But with other collections, it becomes even more weird.

Current behavior

I'm having also two collections called Birds of ... (there's a project location instead of "..."), and I can also add images into a shared collection created by someone else called C&S best of birds that appears listed among my collections. As you can see, all the three collections include words 'birds'.

When searching for one of the first two collections (Birds of ...) and typing 'Birds' into the search box, only the third collection 'C&S best of birds' appears in the list as if there were no other collections including 'birds' in its name. This is odd! (And I would say buggy.) Only after typing 'Birds of' (8 characters!) I get those two collections listed but I have to write all the 8 characters first. When I only type the first 7 ('Birds o') I get no results. Why it doesn't work the same as with the 'Corpses' where I only need to write 'cor'? I would prefer to see all the 3 collections that include 'birds' in their name listed after typing just 'bir'. This is so irritating. And why it displays 'C&S best of birds' after typing just 'birds' and not the other two that also include the word?

I also wonder if there were 3 collections, one called 'Australian birds - Kalbarri', second one called 'Australian birds - Jarrah forest' and third called 'Juveniles of Australian birds' how many characters of 'Australian' I would have to type to get any of them listed? (If there was also 'Australian mammals' then it would require to type the whole 'Australian birds' or 'Australian mammals' to get either of the 4 collections listed?)

Steps to replicate

Create the same collections I mentioned above, or your owns. You'll need at least 3 collections that include the same word (of at least 5 characters) in their name - two of them will start with that word, the third will have the word after another word(s). Try the same with two shared words in the name (f.e. 'Bird of'). Try it with a word made out of more than 5 characters etc. Then go either to the classification of an "old" frontend project or to the Talk interface of a subject (image/video). Click on the 'Collect' button under the subject, then use the search box. Type slowly the characters of the word shared in names of the test-collections (f.e. 'Birds') and see what happens.

Additional information

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. That's very odd. Don't you think? :) Shall I start a new issue for this one?

goplayoutside3 commented 3 weeks ago

Thank you for reporting this bug. I can replicate the following behavior on the old frontend:

In the new frontend I can confirm the bug where:

Big picture, the Zooniverse team is focusing development on the new frontend (FEM Github repo), and I'm happy to write up an Issue over there because fixing this bug would definitely improve a volunteer's experience! I'll tag your account in a comment on the FEM Issue so you can subscribe to updates. Thanks again!

yshish commented 3 weeks ago

Thank you Delilah.

I understand the focus is on the new frontend. But I'm curious about the Talk. The new frontend projects run on the old frontend Talk so even if this is fixed in the new frontend, adding images in the Talk interface will behave buggy.

Can you tell when the Talk will 'move' on a new frontend? Will it be in years or months or?

goplayoutside3 commented 3 weeks ago

For Talk specifically, it will likely be years before all features are migrated to the new frontend. Because we're a small team, prioritization of bug fixes is often a hardline between newer frontend and older frontend, but we do our best to address pain points in the volunteer experience.

There are some brand new pages and features coming to Zooniverse this year in the Fall 🎉

yshish commented 3 weeks ago

Thanks. Looking forward then. :)

eatyourgreens commented 3 weeks ago

I've written a small function that copies the logic from the new collection search and opened PR #7124 with that function replacing the existing collections search. That should fix the problem where search doesn't work unless you type at least 3 characters.

When the search is 4 characters or more, the actual searching is handled by https://github.com/zooniverse/Panoptes, so there's not much that can be done here to fix that, I'm afraid, except maybe update the frontend so that it only uses full-text search for much longer strings.