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

Separate template for search facets from work_search.html #9276

Merged

Conversation

jimchamp
Copy link
Collaborator

@jimchamp jimchamp commented May 15, 2024

Supports #7271

Moves search facets sidebar into its own template. The new work_search_facets template supports asynchronous loading, and will display Loading... indicators when facet_counts is None.

Technical

Testing

As of now, there is no way to trigger async_load mode via the UI. However, you can make the following change to work_search.html to view the loading indicators:
https://github.com/internetarchive/openlibrary/pull/9276/files#r1602125790

Screenshot

image
Facet sidebar when facet_counts is None.

Stakeholders

</div>
</div>
</div>
$:render_template('search/work_search_facets', facet_map, param, facet_counts=search_response.facet_counts)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set facet_counts=None here to test async_load mode.

@mekarpeles mekarpeles self-assigned this May 16, 2024
@mekarpeles mekarpeles added Priority: 2 Important, as time permits. [managed] Priority: 1 Do this week, receiving emails, time sensitive, . [managed] and removed Priority: 2 Important, as time permits. [managed] labels May 16, 2024
@mekarpeles mekarpeles requested a review from cdrini May 23, 2024 18:25
Copy link
Collaborator

@cdrini cdrini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Lgtm 👍 Tested a few various facets on testing.openlibrary.org , and it works as before.

@cdrini cdrini merged commit 5a2cd09 into internetarchive:master May 24, 2024
4 checks passed
@cdrini cdrini changed the title Create template for search facets Separate template for search facets from work_search.html May 24, 2024
@jimchamp jimchamp deleted the 7271/feature/lazy-load-search-facets branch May 30, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 1 Do this week, receiving emails, time sensitive, . [managed]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants