launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #04814
[Merge] lp:~gmb/launchpad/bug-comments-lazy-load into lp:launchpad
The proposal to merge lp:~gmb/launchpad/bug-comments-lazy-load into lp:launchpad has been updated.
Description changed to:
This branch adds feature-flagged asynchronous loading of bug comments. The use of this is twofold:
1. It should hopefully prevent - or at least reduce - the
"BugTask:+index?comments=all times out" problem, since that page
will not get loaded except for non-JS browsers.
2. If it works sufficiently well in production, we can remove the
currently-required user interaction (i.e. clicking the "show
more comments" link) and make the JS run on page load, so that all
bugs will have all comments displayed automatically and
asynchronously (we may want to implement pagination of some sort
first, but that's another bug.
The fix is feature-flagged since it's a UI change and I'd like to get some feedback from our beta-testers - or at least the LP team - before pushing it out to the whole wide world.
I tried working up a solution that involved pushing a lot of the logic for interleaved comments and bug activity back down to the model, but that code is so entwined with the display logic that it ended up being too much work and about 1500+ lines of changes.
Much simpler, then, to add a subclass of BugTaskView that can handle the batching of activity and comments. I've teased apart some of BugTaskView.activity_and_comments to allow the subclass to just reuse that whilst defining a few properties to make the batching work.
Testing plan:
1. Make sure that the bugs.batched_comment_loading.enabled is set to
'on'.
2. Use bin/harness to make a bug with a bunch of comments
(see the TestCase method _makeNoisyBug() for an example of how, but
increase the number of comments to, say, 1500).
3. Look at that bug in the browser. The link should be green.
4. Clicking the link should load all the initially-hidden comments.
QA Plan:
1. Make sure that the bugs.batched_comment_loading.enabled is set to
'on'.
2. Look at a bug with a large number of comments (bug 1 is a good
candidate).
3. The show all comments link should be green.
4. Clicking the link should load all the initially-hidden comments.
For more details, see:
https://code.launchpad.net/~gmb/launchpad/bug-comments-lazy-load/+merge/73367
--
https://code.launchpad.net/~gmb/launchpad/bug-comments-lazy-load/+merge/73367
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~gmb/launchpad/bug-comments-lazy-load into lp:launchpad.
References