openlibrary
openlibrary copied to clipboard
Searches on reading log with no matches incorrectly show "No books on this shelf" screen
Evidence
Relevant url?
E.g. https://openlibrary.org/people/ScarTissue/books/already-read?q=foo+bar
Steps to Reproduce
- Go to one of your reading log shelves (eg https://openlibrary.org/people/ScarTissue/books/already-read )
- Perform a search for something that won't match (eg "foo bar")
- Expected: Text saying no books matched
- Actual: text saying "You haven't added any books to this shelf yet." and the search box disappears
Details
- Logged in (Y/N)? Y
- Browser type/version? FF
- Operating system? Win10
- Environment (prod/dev/local)? prod
Proposal & Constraints
In this case, the search box with the search term should still be visible, and the text should say "No results found in {Already Read}". With an option for searching the entire library "Search all of Open Library for "{query}"?" .
Use a style similar to this page: https://openlibrary.org/search?q=asdfas+fa+sdf+asdf+asd+fasdf&mode=everything
Related files
-
The reading log template: https://github.com/internetarchive/openlibrary/blob/7f8c89f2e5b71ef8cd44866121a459ea9d48eefc/openlibrary/templates/account/reading_log.html#L73-L79
-
"No results" UI / style from this page: https://github.com/internetarchive/openlibrary/blob/41adf1921f1602fb36b37fd0bff472d7c7f9c859/openlibrary/templates/work_search.html#L144-L159
Stakeholders
Hey @cdrini, I would like to pick up this issue. Can I get assigned?
Hey, I tried fixing it, can you please review it and suggest any improvements that are needed?