-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Closed
merwhite11
wants to merge
60
commits into
internetarchive:master
from
merwhite11:1001/feature/fulltext-search-box
Closed
Created a Fulltext Suggestion Macro for 0 Results #9332
merwhite11
wants to merge
60
commits into
internetarchive:master
from
merwhite11:1001/feature/fulltext-search-box
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
merwhite11
force-pushed
the
1001/feature/fulltext-search-box
branch
5 times, most recently
from
May 31, 2024 16:56
12fffd3
to
77d804d
Compare
merwhite11
force-pushed
the
1001/feature/fulltext-search-box
branch
10 times, most recently
from
June 7, 2024 20:19
7c3d4e5
to
54773d1
Compare
merwhite11
force-pushed
the
1001/feature/fulltext-search-box
branch
2 times, most recently
from
June 10, 2024 20:47
64b4c75
to
ce95cc4
Compare
merwhite11
force-pushed
the
1001/feature/fulltext-search-box
branch
10 times, most recently
from
June 20, 2024 18:54
53d9448
to
9d370ad
Compare
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
force-pushed
the
1001/feature/fulltext-search-box
branch
from
August 12, 2024 20:54
d34e71e
to
d952364
Compare
for more information, see https://pre-commit.ci
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
On testing.openlibrary.org
This PR has been deployed to testing.openlibrary.org for testing
Priority: 2
Important, as time permits. [managed]
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Edge Cases:
Measuring Effectiveness:
SearchInsideCard|SeeAllClick
toa
tags in FulltextSearchSuggestion.htmlSearchInsideCard|BookClick
toa
tags in FulltextSuggestionItem.htmlSearchInsideCard|QuoteClick
toa
tags in FulltextSuggestionSnippet.htmlTechnical
In order to test the card, I added a json of sample data to conf
I then referenced the sample data in 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 did not commit the json of sample data or the addition to lending.py.
Testing
Happy case:
Edge case:
Screenshot
Happy case: A loading indicator will appear beneath 'No results found', and then will be replaced with this card:
Edge case: If there are no Search Inside matches, only the 'No results' message will appear
Stakeholders
@jimchamp @mekarpeles @cdrini