Merge lp:~abentley/launchpad/back-button-support into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 14284 | ||||
Proposed branch: | lp:~abentley/launchpad/back-button-support | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
260 lines (+102/-25) 2 files modified
lib/lp/bugs/javascript/buglisting.js (+41/-18) lib/lp/bugs/javascript/tests/test_buglisting.js (+61/-7) |
||||
To merge this branch: | bzr merge lp:~abentley/launchpad/back-button-support | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
j.c.sackett (community) | Approve | ||
Review via email: mp+81875@code.launchpad.net |
Commit message
Dynamic bug listings support back button
Description of the change
= Summary =
Support back, next, reload in browser
== Proposed fix ==
Use YUI History module
== Pre-implementation notes ==
Discussed with deryck
== Implementation details ==
Rendering is now triggered by YUI's history:change event. The event contains the batch_key, which is used to retrieve the batch from the cache.
Various methods had their parameters changed, to reduce the number of sites where we generate a batch_key or batch query. update_from_model is split into update_from new_model and update_from_cache, the latter triggering the render using Y.history.
I also reduced the number of places where namespace.
== Tests ==
bin/test -t test_buglisting
== Demo and Q/A ==
Go to a bug listing page. Click Next, Next. Press the browser back button. You should be on the second batch. Click the browser forward button. You should be on the third batch. Click reload. You should still be on the third batch.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
This looks fine to land.