Allow collapsed entries to fetch data on request

Review Request #11886 — Created Nov. 29, 2021 and updated — Latest diff uploaded

Information

Review Board
master

Reviewers

Review Board will collapse old reviews to streamline information.
While the data is visually hidden it will still be computed
and loaded to the client which can cause slowness.

This change makes collapsed review entries get sent to the client
empty, then fetch its content on request. When they expand the entry, we
first check if this entry already has content loaded, if not then load it
by using the new function "fetchEntryUpdates" in reviewRequestPageModel.js
which can trigger an immediate update to load the content of an entry.
This function uses and extends the machinery related to "page pending updates"
In order to make it feel even snappier, I add a mouseover event listener
on the expand button and the expand all button. We start to pull down information
before they even lift the mouse button.

Only load the entry content if the entry is of type "review". Without this restriction,
when they click the expand all button, the entry of type "initial_status_updates" or
"changedesc"also tries to check whether it has content which causes an error.

Created entryViewTests.es6.js that contains test cases for the
behavior of expanding an entry. All tests passed.

Ran all Javascript unit tests and no newly introduced test fails.

Diff Revision 2

This is not the most recent revision of the diff. The latest diff is revision 4. See what's changed.

orig
1
2
3
4

Commits

First Last Summary ID Author
add console log for debug
e5efe2ddb94478ad7ed00ed9f96d6851a5894d43 Your Name
load the collapsed entry info, finally get it working
6d22271b67203158e4df73ea6aac8003b2cb0467 Your Name
finalize project
62e4b4ccb21a2ad45381f4fafd7164b90a2ca957 Your Name
code clean up
ad5df68ce4b4c6204e2af1aca5cbc3ea8f7addba Your Name
remove white spaces
a729ceb24d2c26f71097e64be3d7580385f84a8c Your Name
remove white space
41ccf48b1b2a3160c3a70a9fac4840eaeecb366e Your Name
review bot issues
e3a0f17e22bfcb4a09cba8a7aa1ca1513d89f535 Your Name
review bot issues
bf3cd0b4df11ae02cb765fdcaa0a2128157d63f5 Your Name
remove white spaces
74d904995f62be003fb653c7c6eb8b814bc4e809 Your Name
remove white spaces
b667b710a6b7d86853fabe942923f25c1db5c2b0 Your Name
reviewboard/staticbundles.py
reviewboard/static/rb/js/reviewRequestPage/models/entryModel.es6.js
reviewboard/static/rb/js/reviewRequestPage/models/reviewRequestPageModel.es6.js
reviewboard/static/rb/js/reviewRequestPage/views/baseStatusUpdatesEntryView.es6.js
reviewboard/static/rb/js/reviewRequestPage/views/changeEntryView.es6.js
reviewboard/static/rb/js/reviewRequestPage/views/entryView.es6.js
reviewboard/static/rb/js/reviewRequestPage/views/reviewRequestPageView.es6.js
reviewboard/static/rb/js/reviewRequestPage/views/reviewView.es6.js
reviewboard/static/rb/js/reviewRequestPage/views/tests/entryViewTests.es6.js
reviewboard/templates/reviews/entries/base.html
Loading...