Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2514)

Issue 12036043: Fixes routing issues around search and charm tabs

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by rharding
Modified:
10 years, 9 months ago
Reviewers:
mp+177401, j.c.sackett, jeff.pihach
Visibility:
Public.

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)

Patch Set 1 #

Total comments: 1

Patch Set 2 : Fixes routing issues around search and charm tabs #

Patch Set 3 : Fixes routing issues around search and charm tabs #

Patch Set 4 : Fixes routing issues around search and charm tabs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -41 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M app/app.js View 1 1 chunk +5 lines, -0 lines 0 comments Download
M app/assets/javascripts/ns-routing-app-extension.js View 1 2 5 chunks +19 lines, -16 lines 0 comments Download
M app/subapps/browser/browser.js View 1 4 chunks +21 lines, -17 lines 0 comments Download
M app/subapps/browser/views/charm.js View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M app/subapps/browser/views/view.js View 2 chunks +9 lines, -0 lines 0 comments Download
M app/widgets/charm-search.js View 1 chunk +1 line, -1 line 0 comments Download
M test/test_browser_app.js View 1 4 chunks +44 lines, -0 lines 0 comments Download
M test/test_routing.js View 4 chunks +20 lines, -6 lines 0 comments Download

Messages

Total messages: 7
rharding
Please take a look.
10 years, 9 months ago (2013-07-29 16:00:11 UTC) #1
j.c.sackett
LGTM, thanks. https://codereview.appspot.com/12036043/diff/1/app/assets/javascripts/ns-routing-app-extension.js File app/assets/javascripts/ns-routing-app-extension.js (right): https://codereview.appspot.com/12036043/diff/1/app/assets/javascripts/ns-routing-app-extension.js#newcode104 app/assets/javascripts/ns-routing-app-extension.js:104: var hashIndex = qs.indexOf('#'); Thanks for using ...
10 years, 9 months ago (2013-07-29 16:29:14 UTC) #2
jeff.pihach
QA No Go Go to http://localhost:8888/fullscreen/precise/cinder-8/ Click, Readme, Interfaces Click JuJu (top left) Click Browse ...
10 years, 9 months ago (2013-07-29 16:54:49 UTC) #3
rharding
Please take a look.
10 years, 9 months ago (2013-07-29 17:54:17 UTC) #4
rharding
Please take a look.
10 years, 9 months ago (2013-07-29 18:10:57 UTC) #5
jeff.pihach
LGTM Thanks for getting these blockers/criticals fixed! QA OK This branch exposed an issue where ...
10 years, 9 months ago (2013-07-29 19:33:24 UTC) #6
rharding
10 years, 9 months ago (2013-07-29 19:39:46 UTC) #7
*** Submitted:

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.

R=j.c.sackett, jeff.pihach
CC=
https://codereview.appspot.com/12036043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b