Repository navigation
refactor: route site layout through Jinja (first step) (#13524) - #13529
Conversation
|
@RsbhThakur Python tests are failing and please provide a screenshot to show that the site is actually working with your changes. |
0f2a8d6 to
928790f
Compare
@RayBB here are the screenshots of the pages getting rendered properly, the python tests failed due to an issue i was working on while pushing the 1st commit, its fixed in the latest commit. The PR is ready for review! |
|
@RsbhThakur why did the tests change so much? |
|
@RayBB, The change in In I stubbed it in |
3c65ab7 to
a200aee
Compare
RayBB
left a comment
There was a problem hiding this comment.
I've been prodding this on testing and locally.
I don't see any performance change from doing this (which is good and expected) and it seems to work flawlessly.
I did push some some changes to simplify and actually render jinja at the highest level so we can start working our way down but overall this seems very safe and a great step.
Thanks for your contribution!


Closes #13524
refactor: routes the top-level site layout through Jinja as the first step of the layout modernization roadmap.
Technical
openlibrary/templates/site.html.jinjato render the existing Templetor partials (site/head,site/body, andsite/footer) using the reverse bridge helperrender_templetor_template.render_templetor_templatereturnsMarkupso Jinja autoescape does not entity-escape the returned HTML; no| safeneeded at call sites.openlibrary/templates/site.html;setup()inopenlibrary/plugins/openlibrary/code.pyregistersSiteLayoutTemplateviatemplate.render.add_source({"site": ...})so Infogami'srender.site()serves Jinja directly.Testing
docker compose up) and verify that pages (/,/works/OL...,/authors/OL...,/status) render normally with intact chrome.Screenshot
N/A — UI output and DOM structure are diff-clean (unchanged).
Stakeholders
@RayBB