juju/juju-gui — pull request #258 by jaycee (2014-04-23 21:07:32+00:00)
Title: Charm search state

This updates the state object to work with autocomplete's categories and charms.

* The state object now updates its already existing filter model based on what's
in metadata.search, which now holds the filter object generated by search
code.
* The presence of a filter object in metatdata.search, as well as the
filter.replace and filter.clear properties, determines whether the state is
handling a search, which determines the generation of a query string.
* The state object is built from the query object if there is a text property or
a categories property--either of these indicate a search has been input.
* The search and view code have been updated to set the right data on metadata
based on the change object. The search widget did not have to be changed for
this--the change object it generates, which is necessary without the flag, is
used by the other code. This can be cleaned up when we remove the old state
object and viewNagivate events.

QA

Test with and without the il flag.

1) Search for 'apache'; click on a charm provided by the autocomplete.
2) You should open the details for the charm as well as populate the search
text.

3) click the search box to bring up the categories. Click one.
4) You should get a search result for the category, with an updated
querystring.