Skip to content

Auto refresh LDVspec landing page

Robbie Luijben requested to merge SDC-977/auto-refresh into main

To introduce some interactivity on the page in the past, simple data binding was added to the page using knockout.js. The original plan was to expand on this and do rendering/refreshing using the same method. Unfortunately, due to the use of so much conditional rendering in Django templates, this was not feasible. Instead:

  • Refreshing and updating of elements is done using vanilla JS
  • At least, all this manual stuff is abstracted away into a single exported class in AutoRefresher.js
  • In an attempt to introduce some scoping in the frontend, stuff is imported in a script tag of type module
  • UI logic for conditional rendering is duplicated from the Django templates
  • Logic for determining certain model properties is exposed through an additional API endpoint (/enriched), so this is at least not duplicated
Edited by Robbie Luijben

Merge request reports