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

Issue 13282043: Fixes #1217060 - fix viewmode controls in :gui:

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by rharding
Modified:
10 years, 8 months ago
Reviewers:
mp+182398, jeff.pihach, matthew.scott
Visibility:
Public.

Description

Fixes #1217060 - fix viewmode controls in :gui: - When you go to a :gui: charm details view the browser is hidden from view, but holds control of the viewmode controls for build/browser. - Because of this, the event for clicking on the controls is part of the :charmbrowser: namespace and cannot clear the :gui: space. You can never escape! This branch then does a few things: - Fixes an edge case where, when hidden, the clean old view helper,has no old view to clean. - Make sure that, even when hidden, we update the _oldState to be able to track viewstate changes while hidden. - Add a giant XXX'd hack to operate viewmode controls from the app so that when the browser is hidden, the controls operate as expected doing evil things to fire navigate events that clear all namespaces and force something for the users to work with. Tests are added for the things we want to keep, like updating view state in the browser. However, the giant XXX hack is not tested and is marked with XXX so that we can come back and clear this when the serviceInspector is the default in the very near future. QA: - Deploy a charm - Click on the charm and hit view to go into the details - Note that the active viewmode control is selected (build) - Click on browse and you end up in browse mode correcetly - Click on build to get back to the canvas - Click on the charm again and go to view to get back to details - Note that the viewmode controls keeps in sync this whole time - Click on browser again to verify it works successive times. https://code.launchpad.net/~rharding/juju-gui/browser-fix-1217060/+merge/182398 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 1

Patch Set 2 : Fixes #1217060 - fix viewmode controls in :gui: #

Patch Set 3 : Fixes #1217060 - fix viewmode controls in :gui: #

Unified diffs Side-by-side diffs Delta from patch set Stats (+109 lines, -4 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M app/app.js View 3 chunks +57 lines, -2 lines 0 comments Download
M app/subapps/browser/browser.js View 5 chunks +23 lines, -2 lines 0 comments Download
M test/test_app.js View 1 chunk +8 lines, -0 lines 0 comments Download
M test/test_browser_app.js View 2 chunks +19 lines, -0 lines 0 comments Download

Messages

Total messages: 4
rharding
Please take a look.
10 years, 8 months ago (2013-08-27 15:23:58 UTC) #1
matthew.scott
LGTM, QA okay (Chrome, FF). Shame about the hack, but it'll go away soon.
10 years, 8 months ago (2013-08-27 15:34:12 UTC) #2
jeff.pihach
LGTM QA OK IE QA OK Thanks for doing this fix https://codereview.appspot.com/13282043/diff/1/test/test_app.js File test/test_app.js (right): ...
10 years, 8 months ago (2013-08-27 15:44:08 UTC) #3
rharding
10 years, 8 months ago (2013-08-27 16:01:15 UTC) #4
*** Submitted:

Fixes #1217060 - fix viewmode controls in :gui:

- When you go to a :gui: charm details view the browser is hidden from view,
but holds control of the viewmode controls for build/browser.
- Because of this, the event for clicking on the controls is part of the
:charmbrowser: namespace and cannot clear the :gui: space. You can never
escape!

This branch then does a few things:
- Fixes an edge case where, when hidden, the clean old view helper,has no old
view to clean.
- Make sure that, even when hidden, we update the _oldState to be able to
track viewstate changes while hidden.
- Add a giant XXX'd hack to operate viewmode controls from the app so that
when the browser is hidden, the controls operate as expected doing evil things
to fire navigate events that clear all namespaces and force something for the
users to work with.

Tests are added for the things we want to keep, like updating view state in
the browser. However, the giant XXX hack is not tested and is marked with XXX
so that we can come back and clear this when the serviceInspector is the
default in the very near future.

QA:

- Deploy a charm
- Click on the charm and hit view to go into the details
- Note that the active viewmode control is selected (build)
- Click on browse and you end up in browse mode correcetly
- Click on build to get back to the canvas
- Click on the charm again and go to view to get back to details
- Note that the viewmode controls keeps in sync this whole time
- Click on browser again to verify it works successive times.

R=matthew.scott, jeff.pihach
CC=
https://codereview.appspot.com/13282043
Sign in to reply to this message.

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