~ | | This is a modified version based on Christian's suggestions in review
|
~ | | request here: https://reviews.reviewboard.org/r/11886/. |
| ~ | This is a modified version of the working lazy collapsed project
|
| ~ | based on Christian's suggestions in the review request here:
|
| + | https://reviews.reviewboard.org/r/11886/. |
| |
|
~ | | TODO: Set the "loaded" state of an expand entry to true. |
~ | |
|
~ | | 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. |
| ~ | The only difference is that instead of checking the entry's html attributes,
|
| ~ | we keep a state on the entry model indicating if the entry has been loaded,
|
| ~ | which would be part of the initial model data on the page. If loaded,do
|
| ~ | nothing.If not then load it by calling the function "fetchEntryUpdates"
|
| ~ | which can trigger an immediate update to load the content of an entry. |
| |
|
~ | | This change makes collapsed review entries get sent to the client
|
| ~ | TODO: Set the "loaded" state of an expand entry to true. |
- | | empty, then fetch its content on request. When they expand the entry,
|
- | | we first check if this entry already has content loaded.
|
- | | Instead of checking the entry's html attributes, we keep a state on the
|
- | | entry model indicating if the entry has been loaded, which would be part
|
- | | of the initial model data on the page. If loaded, have this function do
|
- | | nothing.If not then load it by using the new function "fetchEntryUpdates".
|
- | | 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. |