[WIP] Implementing lazy load feature for review request

Review Request #11433 — Created Feb. 5, 2021 and updated

Information

Review Board
master

Reviewers

ReviewBoard currently renders all historic data for review request,
and the data ends up getting computed and loaded on the client, which
makes things seem slow. In order to enhance performance, we would like
to implement a lazy-load feature where collapsed review entries get sent
to the client empty, and then fetch the content dynamically when and if
the entry is expanded.

When we inspect elements on the browser, any entry boxes that is collapsed
will not render the body tag (the body tag will be empty).

Summary ID
Added function for rendering contents when the box is not collapsed
8caa5459798cb675024431c4f053f24d50607178
Added logic in the Django template (base.html) to have body elements only when box is not collapsed
70e11185887defc3fb79eca88a8b380f214b5dcb
Description From Last Updated

There's a bunch of stuff in your change that probably got pulled in during some merges. Please make sure that …

daviddavid

I don't think these are changes we want to make, especially in the base class.

daviddavid

For now, we should keep our changes only for reviews. Let's do this within the entry_content block in reviewboard/templates/reviews/entries/review.html

daviddavid
CL
CL
Review request changed

Change Summary:

Added logic/condition in base.html file that makes sure the body element of any entry box will be rendered when the box is not collapsed.

Testing Done:

  +

When we inspect elements on the browser, any entry boxes that is collapsed

  + will not render the body tag (the body tag will be empty).

Commits:

Summary ID
Added function for rendering contents when the box is not collapsed
8caa5459798cb675024431c4f053f24d50607178
Added function for rendering contents when the box is not collapsed
8caa5459798cb675024431c4f053f24d50607178
Added logic in the Django template (base.html) to have body elements only when box is not collapsed
70e11185887defc3fb79eca88a8b380f214b5dcb

Diff:

Revision 3 (+65 -39)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
david
  1. 
      
  2. reviewboard/__init__.py (Diff revision 3)
     
     

    There's a bunch of stuff in your change that probably got pulled in during some merges. Please make sure that you revert them.

  3. I don't think these are changes we want to make, especially in the base class.

  4. reviewboard/templates/reviews/entries/base.html (Diff revision 3)
     
     
     
     

    For now, we should keep our changes only for reviews. Let's do this within the entry_content block in reviewboard/templates/reviews/entries/review.html

  5. 
      
Loading...