[WIP]: Optimal version for allowing collapsed entries to fetch data on request
Review Request #11889 — Created Dec. 6, 2021 and updated
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/.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.TODO: Set the "loaded" state of an expand entry to true.
TODO: Require writing tests for entry model for the newly "loaded" added state.
Summary | ID | Author |
---|---|---|
e5efe2ddb94478ad7ed00ed9f96d6851a5894d43 | Your Name | |
6d22271b67203158e4df73ea6aac8003b2cb0467 | Your Name | |
62e4b4ccb21a2ad45381f4fafd7164b90a2ca957 | Your Name | |
ad5df68ce4b4c6204e2af1aca5cbc3ea8f7addba | Your Name | |
a729ceb24d2c26f71097e64be3d7580385f84a8c | Your Name | |
41ccf48b1b2a3160c3a70a9fac4840eaeecb366e | Your Name | |
e3a0f17e22bfcb4a09cba8a7aa1ca1513d89f535 | Your Name | |
bf3cd0b4df11ae02cb765fdcaa0a2128157d63f5 | Your Name | |
74d904995f62be003fb653c7c6eb8b814bc4e809 | Your Name | |
b667b710a6b7d86853fabe942923f25c1db5c2b0 | Your Name | |
52273caa718ee0933466cf82195965169ebe1129 | Your Name | |
1bae1c99c7b799bdbedb30edba3de1f3433207ad | Your Name | |
ed1bab7a6d126d95ba8968405a9265d4730195c6 | Your Name | |
77205195ee98439162f8971d1d91d1dbf943fd4c | Your Name | |
1fc906713e9341cdea44207ef4d37012d60f217e | Your Name | |
03e49d2d6fbf68ede0aa21b2cd7aa54ec281f3d0 | Your Name | |
09b21641ccb7a7f17dd5f0b69330b5495dea504b | Your Name | |
860e6de534175f6b8fe9ff473ab563e35fc8dca8 | Your Name |
- Summary:
-
WIP: Allow collapsed entries to fetch data on request - optimal version[WIP]: Optimal version for allowing collapsed entries to fetch data on request
- Description:
-
~ 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. - Testing Done:
-
~ Require writing tests for entry model for the newly added state.
~ TODO: Require writing tests for entry model for the newly "loaded" added state.
- Commits:
-
Summary ID Author e5efe2ddb94478ad7ed00ed9f96d6851a5894d43 Your Name 6d22271b67203158e4df73ea6aac8003b2cb0467 Your Name 62e4b4ccb21a2ad45381f4fafd7164b90a2ca957 Your Name ad5df68ce4b4c6204e2af1aca5cbc3ea8f7addba Your Name a729ceb24d2c26f71097e64be3d7580385f84a8c Your Name 41ccf48b1b2a3160c3a70a9fac4840eaeecb366e Your Name e3a0f17e22bfcb4a09cba8a7aa1ca1513d89f535 Your Name bf3cd0b4df11ae02cb765fdcaa0a2128157d63f5 Your Name 74d904995f62be003fb653c7c6eb8b814bc4e809 Your Name b667b710a6b7d86853fabe942923f25c1db5c2b0 Your Name 52273caa718ee0933466cf82195965169ebe1129 Your Name 1bae1c99c7b799bdbedb30edba3de1f3433207ad Your Name ed1bab7a6d126d95ba8968405a9265d4730195c6 Your Name 77205195ee98439162f8971d1d91d1dbf943fd4c Your Name 1fc906713e9341cdea44207ef4d37012d60f217e Your Name 03e49d2d6fbf68ede0aa21b2cd7aa54ec281f3d0 Your Name 09b21641ccb7a7f17dd5f0b69330b5495dea504b Your Name e5efe2ddb94478ad7ed00ed9f96d6851a5894d43 Your Name 6d22271b67203158e4df73ea6aac8003b2cb0467 Your Name 62e4b4ccb21a2ad45381f4fafd7164b90a2ca957 Your Name ad5df68ce4b4c6204e2af1aca5cbc3ea8f7addba Your Name a729ceb24d2c26f71097e64be3d7580385f84a8c Your Name 41ccf48b1b2a3160c3a70a9fac4840eaeecb366e Your Name e3a0f17e22bfcb4a09cba8a7aa1ca1513d89f535 Your Name bf3cd0b4df11ae02cb765fdcaa0a2128157d63f5 Your Name 74d904995f62be003fb653c7c6eb8b814bc4e809 Your Name b667b710a6b7d86853fabe942923f25c1db5c2b0 Your Name 52273caa718ee0933466cf82195965169ebe1129 Your Name 1bae1c99c7b799bdbedb30edba3de1f3433207ad Your Name ed1bab7a6d126d95ba8968405a9265d4730195c6 Your Name 77205195ee98439162f8971d1d91d1dbf943fd4c Your Name 1fc906713e9341cdea44207ef4d37012d60f217e Your Name 03e49d2d6fbf68ede0aa21b2cd7aa54ec281f3d0 Your Name 09b21641ccb7a7f17dd5f0b69330b5495dea504b Your Name 860e6de534175f6b8fe9ff473ab563e35fc8dca8 Your Name - Diff:
-
Revision 2 (+2416 -1942)