-
-
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
Make BWB + Amz prices lazy load on editions page #8576
Comments
can i work on this? |
@mekarpeles Please assign me this issue. |
@nick2432 I've assigned you to work on this (sorry for the delay). Here's some more information about this: The template for our affiliate links is here. I don't think that this file will need to be modified at all, but it will need to be rendered server-side and returned to the client. The template for our book page is here. Currently, we store the links as You'll have to create a new endpoint which will be used to fetch the rendered The path for the new endpoint can be something like Finally, you'll need to replace the placeholder with the HTML for the affiliate links. Make sure to only fetch the links once per book page, and replace both placeholders with the results. |
Please assign me to this issue |
@jimchamp Please assign me this issue on a first come basis I am the one whom you assign sir. |
@tusharv01 happy to assign you, before starting work, can you please post a comment here describing how you will implement the solution and make sure you tag @jimchamp so he can review your approach. Thank you! |
@mekarpeles @jimchamp 1. Update AffiliateLinks Template:- Ensure the AffiliateLinks.html template includes necessary placeholders for BWB and Amazon prices.2. Update Book Page Template:- Replace the current rendering of 'affiliate_links' with a placeholder element.- Create a new template function, render_affiliate_links_placeholder, to generate the placeholder.3. Create a New Endpoint for AffiliateLinks:- Add a new endpoint '/affiliate-links/partials' to fetch rendered AffiliateLinks.- Model the GET handler on an existing handler, using the macro.macrostore['AffiliateLinks'](doc, opts) syntax.4. Replace Placeholders with HTML:- In the JavaScript part of book_page_template.html, fetch affiliate links using the new endpoint.- Replace placeholders with the fetched HTML. |
@tusharv01 are you still working on this issue? |
Yes |
@tusharv01, this issue is rising in priority, and is something that we'd like finished relatively soon. When do you expect to open a PR with your solution? Edit: Just noticed that you don't have the repo forked, so I'm assuming that you are not working on this. Assigning myself. |
Next Steps
Design
Patron should see the affiliate/vendors table but show static "tomb stone" grey placeholders until the amz + bwb data becomes available.
Describe the problem that you'd like solved
Justification: Currently BWB + amazon are expensive network calls which result in slow books page load times in sentry
We want to load this data async to speed up the perf.
Proposal & Constraints
Additional context
Stakeholders
The text was updated successfully, but these errors were encountered: