Fulltext Suggestion Macro for 0 Results#9734
Merged
mekarpeles merged 6 commits intointernetarchive:masterfrom Aug 20, 2024
Merged
Fulltext Suggestion Macro for 0 Results#9734mekarpeles merged 6 commits intointernetarchive:masterfrom
mekarpeles merged 6 commits intointernetarchive:masterfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9734 +/- ##
==========================================
+ Coverage 16.06% 16.45% +0.39%
==========================================
Files 90 91 +1
Lines 4769 4897 +128
Branches 832 853 +21
==========================================
+ Hits 766 806 +40
- Misses 3480 3557 +77
- Partials 523 534 +11 ☔ View full report in Codecov by Sentry. |
mekarpeles
reviewed
Aug 13, 2024
mekarpeles
reviewed
Aug 14, 2024
mekarpeles
reviewed
Aug 14, 2024
mekarpeles
reviewed
Aug 14, 2024
mekarpeles
reviewed
Aug 14, 2024
mekarpeles
reviewed
Aug 14, 2024
Member
mekarpeles
left a comment
There was a problem hiding this comment.
- 1 question about an i18n string containing a closing
</a> - A handful of cases where we're using !important css rules that I'd prefer we avoid
Otherwise, ready to merge!
mekarpeles
reviewed
Aug 15, 2024
mekarpeles
reviewed
Aug 15, 2024
mekarpeles
reviewed
Aug 15, 2024
dee955d to
a9e40fc
Compare
mekarpeles
reviewed
Aug 20, 2024
Created macro, not inserting into work_search html Response from partial loading in macro Basic outline for card Added in pseucode for data call plan Partial querying db and sending back data Trying to get macro to render, not working Can't create FulltextSearchBox macro, 500 error Adding partial with data to DOM ! Deleted some console.logs Author last name and covers loading in macro Attempting to get author name
Redesigned mobile style w flex, truncated text, quotes Resolved conflict-Book title blue and underlined Styling changes LoadingIndicator displaying which results fetching
i18n quotes, header and footer option Cleaning up code Fixed linter errors Fixed js test error Corrected more js test errors Removed print out Added i18n syntax Added blue hover to quote link
Fixed header alignment, page num fix, tab specific message, authors
Fixed nesting in less
d4388b7 to
2cfb69c
Compare
dc06e79 to
dbbde6e
Compare
This was referenced Aug 20, 2024
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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|SeeAllClicktoatags in FulltextSearchSuggestion.htmlSearchInsideCard|BookClicktoatags in FulltextSuggestionItem.htmlSearchInsideCard|QuoteClicktoatags 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/OL24204364MI 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