Merge lp:~rharding/juju-gui/routing-issues into lp:juju-gui/experimental
Status: | Merged | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Merged at revision: | 905 | ||||||||||||||||
Proposed branch: | lp:~rharding/juju-gui/routing-issues | ||||||||||||||||
Merge into: | lp:juju-gui/experimental | ||||||||||||||||
Diff against target: |
350 lines (+121/-41) 8 files modified
app/app.js (+5/-0) app/assets/javascripts/ns-routing-app-extension.js (+19/-16) app/subapps/browser/browser.js (+21/-17) app/subapps/browser/views/charm.js (+2/-1) app/subapps/browser/views/view.js (+9/-0) app/widgets/charm-search.js (+1/-1) test/test_browser_app.js (+44/-0) test/test_routing.js (+20/-6) |
||||||||||||||||
To merge this branch: | bzr merge lp:~rharding/juju-gui/routing-issues | ||||||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju GUI Hackers | Pending | ||
Review via email: mp+177401@code.launchpad.net |
Description of the change
Fixes routing issues around search and charm tabs
- See bug #1205468
- See bug #1200743
Summary
-------
There are two problems. The first is that when doing some view state changes
we need to also clear the hash so that it doesn't carry around. We also clear
the charm id when doing searches in fullscreen mode. This helps the browser
app ack that there were changes in state and show the correct view.
The second issue was that clicking a tab on the fullscreen charm details after
a search causes two #bws-readme (for instance) to be added. One is before the
query string and one is after the querysting. This is caused by our double
dispatch and the fact that our routing code builds urls with query strings
after the hash of the url. This is not proper. The Y.App adds it to the end of
the url. In this way we ended up with it in both places.
Our routing code would then assume the whole #bws-readme?
hash of the url and that there was no query string. All kinds of trouble came
out of this.
Tests are added to verify the changes work as expected given our sample bad
urls.
QA
---
To QA simpler go through the steps in the two bugs and it should work as
expected. Other QA would be to verify that other usage is not adversely
effected by moving the hash to be at the end of the url while the querystring
is immediately after the path.
Reviewers: mp+177401_ code.launchpad. net,
Message:
Please take a look.
Description:
Fixes routing issues around search and charm tabs
- See bug #1205468
- See bug #1200743
Summary
-------
There are two problems. The first is that when doing some view state
changes
we need to also clear the hash so that it doesn't carry around. We also
clear
the charm id when doing searches in fullscreen mode. This helps the
browser
app ack that there were changes in state and show the correct view.
The second issue was that clicking a tab on the fullscreen charm details
after
a search causes two #bws-readme (for instance) to be added. One is
before the
query string and one is after the querysting. This is caused by our
double
dispatch and the fact that our routing code builds urls with query
strings
after the hash of the url. This is not proper. The Y.App adds it to the
end of
the url. In this way we ended up with it in both places.
Our routing code would then assume the whole #bws-readme? text=apache2
was the
hash of the url and that there was no query string. All kinds of trouble
came
out of this.
Tests are added to verify the changes work as expected given our sample
bad
urls.
QA
---
To QA simpler go through the steps in the two bugs and it should work as
expected. Other QA would be to verify that other usage is not adversely
effected by moving the hash to be at the end of the url while the
querystring
is immediately after the path.
https:/ /code.launchpad .net/~rharding/ juju-gui/ routing- issues/ +merge/ 177401
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/12036043/
Affected files: javascripts/ ns-routing- app-extension. js browser/ browser. js browser/ views/view. js charm-search. js browser_ app.js routing. js
A [revision details]
M app/assets/
M app/subapps/
M app/subapps/
M app/widgets/
M test/test_
M test/test_