Merge lp:~gmb/launchpad/fix-subscribe-form-preloading-bug-722450 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Graham Binns |
Approved revision: | no longer in the source branch. |
Merged at revision: | 12496 |
Proposed branch: | lp:~gmb/launchpad/fix-subscribe-form-preloading-bug-722450 |
Merge into: | lp:launchpad |
Diff against target: |
69 lines (+20/-5) 1 file modified
lib/lp/bugs/javascript/bugtask_index_portlets.js (+20/-5) |
To merge this branch: | bzr merge lp:~gmb/launchpad/fix-subscribe-form-preloading-bug-722450 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Benji York (community) | code | Approve | |
Review via email: mp+51510@code.launchpad.net |
Commit message
[r=benji][ui=none] [r=benji][bug=722450] The advanced direct bug subscription overlay's content is now loaded in the onClick handler for the Subscribe link rather than being loaded with every bug page load, which added unnecessary load to the server.
Description of the change
This branch is a minor JS refactoring to prevent the advanced subscription overlay from being loaded with every page load, which as lifeless pointed out increases server load unnecessarily.
The fix for this was to move the code that fetches the form content for the overlay into a function that is called in the onClick handler for the "Subscribe" link. This also means that we can do away with reloading the form content after the user has made a change to their subscription, saving us another unnecessary page load.
This branch looks good. The only suggestion I have is that I suspect
that users would have a slightly better experience if we hypnotize them
with a spinner so they don't notice the passage of time while we do the
HTTP request to populate the form overlay.