-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Lazy-load book page "Lists" section #10654
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
Lazy-load book page "Lists" section #10654
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10654 +/- ##
==========================================
- Coverage 17.27% 17.21% -0.06%
==========================================
Files 87 89 +2
Lines 4845 4861 +16
Branches 860 853 -7
==========================================
Hits 837 837
- Misses 3477 3495 +18
+ Partials 531 529 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
$if "lists" in ctx.features and not page.is_fake_record(): | ||
$# pages like /books/ia:foo00bar are fake records created from metadata API. | ||
$# Adding them to lists doesn't work. Disabling it to avoid any issues. | ||
$if "lists" in ctx.features and not page.is_fake_record(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eec7218
to
393a113
Compare
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on testing, and lgtm! List correctly load on https://testing.openlibrary.org/books/OL1285376M/Les_mise%CC%81rables
Tested book without lists: https://testing.openlibrary.org/works/OL36422278W/Merry_Wives_of_Windsor?edition=key%3A/books/OL49293233M
Closes #10653
Replaces initial book page "Lists" section with a loading indicator. Whenever a patron scroll withing
200px
of the "Lists" section, a/partials
request is made for the section's content and the view is updated with the results.If either the work or edition is on a list, the "See All" link becomes visible. This link was previously conditionally rendered, but is now always rendered with the
hidden
class.Technical
Testing
Screenshot
Stakeholders