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

sort automatically switches relevance whenever the search term is revised #827

Closed
1 task done
richmanrachel opened this issue Apr 29, 2022 · 6 comments
Closed
1 task done
Assignees
Labels
🐛 bug Something isn't working

Comments

@richmanrachel
Copy link

richmanrachel commented Apr 29, 2022

testing notes (qa)

  • In the public site search on QA, start typing a search term and confirm it switches to "relevance". Then, change the sort option to something else (not "random" or "relevance"), add a new search term, and confirm the sort remains on the option you chose.

Describe the bug
When I add a new search term while trying to remain within Shelfmark A-Z sort, the site reverts the search to sort by Relevance.

dev notes

  • only change sort option when sort is default (i.e., user has not changed sorting)
@blms
Copy link
Contributor

blms commented Apr 29, 2022

I think this is actually one of the few times we can say "it's not a bug, it's a feature"! At least, it was planned that way. But perhaps we should revisit now that we have so many more sort options.

Here is the original issue collecting the discussions: #550

Maybe it makes sense to only do this auto-switching to relevance when there isn't already a query in the text box. That way, you could "refine" a query search without impacting the sort option, but if you enter a new query search into a blank box, then it automatically chooses relevance.

@richmanrachel
Copy link
Author

@blms - ahh, I see! That makes sense to me.

Right now the auto-switch is just extra confusing since all the filters stick around. But I think your solution is on the right track.

@blms
Copy link
Contributor

blms commented Apr 29, 2022

Right—maybe "filters applied" could be another condition that prevents the sort from auto-switching!

@richmanrachel
Copy link
Author

I'm not sure I fully understand how that will work, but I trust you!

@rlskoeser
Copy link
Contributor

@blms it works as we planned originally, but when we built it we didn't have so many sort options! I think maybe it should only change if you have the default sort selected. Also should probably only trigger if you go from no keyword text to some keyword text — not modified text, which I think it does now. I think it should not be aware of the filters, though.

@blms blms self-assigned this Apr 29, 2022
@rlskoeser rlskoeser added the 🐛 bug Something isn't working label May 2, 2022
@rlskoeser rlskoeser changed the title In QA frontend, sort auto-reverts back to relevance whenever a new search term is added. sort automatically switches relevance whenever the search term is revised May 2, 2022
blms added a commit that referenced this issue May 17, 2022
blms added a commit that referenced this issue May 17, 2022
blms added a commit that referenced this issue May 17, 2022
@blms blms added the 🗜️ awaiting testing Implemented and ready to be tested label May 18, 2022
@richmanrachel richmanrachel removed the 🗜️ awaiting testing Implemented and ready to be tested label May 18, 2022
@richmanrachel
Copy link
Author

Fixed! Thank you :)

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

3 participants