~rharding/juju-gui/renderBundle2

Viewing all changes in revision 982.

  • Committer: Rick Harding
  • Author(s): Richard Harding
  • Date: 2013-08-27 16:00:50 UTC
  • mfrom: (981.1.4 browser-fix-1217060)
  • Revision ID: rick.harding@canonical.com-20130827160050-btmvvsarb7hfzcqc
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

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: