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

Created a Fulltext Suggestion Macro for 0 Results #9332

Open
wants to merge 49 commits into
base: master
Choose a base branch
from

Conversation

merwhite11
Copy link
Collaborator

@merwhite11 merwhite11 commented May 24, 2024

Closes #1001

Feature:
Creates a partial that is rendered within work_search.html in the case when 0 results are returned from a search.

The Fulltext-Search-Suggestion partial retrieves data from the Partials endpoint and renders a card with two suggestions of books with fulltext snippets that match the user's query. If the suggested book or title is clicked, it leads to the book's page. If the fulltext snippet or header/footer is clicked, it leads to the Search Inside results page.

Technical

In order to test the card, I hardcoded data directly into fulltext.py and lending.py.

I 'uploaded' books through the command line by running these commands:
docker compose exec -e PYTHONPATH=. web bash
./scripts/copydocs.py /books/OL32090209M
./scripts/copydocs.py /books/OL24375865M
./scripts/copydocs.py /books/OL24204364M

I took these hardcodings out so that it can be tested against the actual database.

Testing

Type in a search to the search bar that will likely return 0 results eg 'a cricket in the night'

Screenshot

A loading indicator will appear beneath 'No results found', and then will be replaced with this card:
OL_FulltextSuggestionCard_Draft

Design Notes

The design for the card is not finalized. An alternative version has the link to 'All Search Inside Results' as the header and no footer:
Screenshot 2024-06-21 at 11 11 55 AM

Stakeholders

@jimchamp @mekarpeles @cdrini

@merwhite11 merwhite11 marked this pull request as draft May 24, 2024 00:54
@merwhite11 merwhite11 force-pushed the 1001/feature/fulltext-search-box branch 5 times, most recently from 12fffd3 to 77d804d Compare May 31, 2024 16:56
@merwhite11 merwhite11 force-pushed the 1001/feature/fulltext-search-box branch 10 times, most recently from 7c3d4e5 to 54773d1 Compare June 7, 2024 20:19
@merwhite11 merwhite11 force-pushed the 1001/feature/fulltext-search-box branch 2 times, most recently from 64b4c75 to ce95cc4 Compare June 10, 2024 20:47
@merwhite11 merwhite11 force-pushed the 1001/feature/fulltext-search-box branch 10 times, most recently from 53d9448 to 9d370ad Compare June 20, 2024 18:54
@merwhite11 merwhite11 marked this pull request as ready for review June 20, 2024 19:18
@merwhite11 merwhite11 changed the title TESTING: Created a Fulltext Suggestion Macro for 0 Results Created a Fulltext Suggestion Macro for 0 Results Jun 20, 2024
@merwhite11 merwhite11 force-pushed the 1001/feature/fulltext-search-box branch from 6c569da to 04f1db6 Compare June 28, 2024 16:43
@merwhite11 merwhite11 force-pushed the 1001/feature/fulltext-search-box branch from f60eb64 to 4ae75ad Compare June 28, 2024 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 2 Important, as time permits. [managed]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Search Results Experience when 0 results
3 participants