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

Issue 11126043: Support autocomplete of charms in search.

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

Description

Support autocomplete of charms in search. - Adds support to the charm-search widget to autocomplete as a user types - Adds a new api endpoint to the store 'autocomplete' - Adds the yui3-skin-sam to enable proper styling of the AC widget. This caused some CSS changes to undo the damage in other locations. - Update the view to only deal with the search widget when a store is present. In tests it's not, and there's no point getting errors around it. - Make sure we don't display metadata in the tiny charm-token sized used for the AC results display. - Update tests to deal with the new search widget updates. - Add test to the new handlebars unless_eq helper. Testing Notes: I know the tests around the AC widget in the search tests are a bit weak. It's difficult to test since there's not a good way to wait for the html render to complete with suggestions without doing timeout related code. I've tried to test that the custom parts of the code we init are touched and working. So we verify that our results include a charm-token html result vs a plain 'name' of a charm. Most of the work in there is using code that's already under test, like firing viewNavigate and such. If we find bugs I'm more than happy to break into more complicated testing to make sure they don't reoccur, but it's much of this is tying together code that's already under test. https://code.launchpad.net/~rharding/juju-gui/autocomplete-widget/+merge/174016 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Support autocomplete of charms in search. #

Total comments: 6

Patch Set 3 : Support autocomplete of charms in search. #

Patch Set 4 : Support autocomplete of charms in search. #

Total comments: 18

Patch Set 5 : Support autocomplete of charms in search. #

Patch Set 6 : Support autocomplete of charms in search. #

Patch Set 7 : Support autocomplete of charms in search. #

Patch Set 8 : Support autocomplete of charms in search. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4347 lines, -104 lines) Patch
A [revision details] View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M app/index.html View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M app/store/charm.js View 1 2 3 4 5 6 2 chunks +21 lines, -1 line 0 comments Download
M app/subapps/browser/views/view.js View 1 2 3 4 5 5 chunks +60 lines, -52 lines 0 comments Download
M app/templates/charm-token.handlebars View 1 2 3 4 5 1 chunk +8 lines, -6 lines 0 comments Download
M app/views/utils.js View 1 2 3 4 5 1 chunk +15 lines, -0 lines 0 comments Download
M app/widgets/charm-search.js View 1 2 3 4 5 6 6 chunks +156 lines, -0 lines 0 comments Download
M lib/views/browser/bws-searchbox.less View 1 2 3 4 5 6 1 chunk +15 lines, -0 lines 0 comments Download
M lib/views/browser/charm-full.less View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M lib/views/browser/tabview.less View 1 2 3 4 5 1 chunk +45 lines, -32 lines 0 comments Download
A test/data/autocomplete.json View 1 2 1 chunk +3845 lines, -0 lines 0 comments Download
M test/test_browser_app.js View 1 2 3 4 5 4 chunks +40 lines, -9 lines 0 comments Download
M test/test_browser_search_widget.js View 1 2 3 4 5 6 7 3 chunks +87 lines, -3 lines 0 comments Download
M test/test_charm_store.js View 1 2 3 4 5 1 chunk +22 lines, -0 lines 0 comments Download
M test/test_utils.js View 1 2 3 4 5 1 chunk +27 lines, -0 lines 0 comments Download

Messages

Total messages: 12
curtis
Thank for showing my your progress Rick. I have a few remarks. I look forward ...
10 years, 10 months ago (2013-07-10 21:39:16 UTC) #1
rharding
Replies below. https://codereview.appspot.com/11126043/diff/3001/app/config-debug.js File app/config-debug.js (right): https://codereview.appspot.com/11126043/diff/3001/app/config-debug.js#newcode34 app/config-debug.js:34: charmworldURL: 'http://staging.jujucharms.com/', On 2013/07/10 21:39:16, curtis wrote: ...
10 years, 10 months ago (2013-07-11 04:03:03 UTC) #2
rharding
Please take a look.
10 years, 10 months ago (2013-07-11 16:08:01 UTC) #3
rharding
Please take a look.
10 years, 10 months ago (2013-07-11 16:10:43 UTC) #4
jeff.pihach
As far as I can tell the code is looking great but it throws a ...
10 years, 10 months ago (2013-07-11 18:12:01 UTC) #5
rharding
Replies below, will update branch with suggestions. https://codereview.appspot.com/11126043/diff/13001/app/widgets/charm-search.js File app/widgets/charm-search.js (right): https://codereview.appspot.com/11126043/diff/13001/app/widgets/charm-search.js#newcode116 app/widgets/charm-search.js:116: var dataprocessor ...
10 years, 10 months ago (2013-07-11 18:28:00 UTC) #6
curtis
Hi Rick. This looks good I have a question about _fetchSuggestions() tests. https://codereview.appspot.com/11126043/diff/13001/app/widgets/charm-search.js File app/widgets/charm-search.js ...
10 years, 10 months ago (2013-07-11 20:17:17 UTC) #7
rharding
Please take a look. https://codereview.appspot.com/11126043/diff/13001/app/index.html File app/index.html (right): https://codereview.appspot.com/11126043/diff/13001/app/index.html#newcode67 app/index.html:67: <body class="yui3-skin-sam"> On 2013/07/11 18:12:01, ...
10 years, 10 months ago (2013-07-12 11:30:49 UTC) #8
curtis
Thank you rick. LGTM.
10 years, 10 months ago (2013-07-12 15:04:16 UTC) #9
jeff.pihach
Thanks for the updates Rick, I'm going to LGTM this with the css issued being ...
10 years, 10 months ago (2013-07-12 17:27:06 UTC) #10
rharding
Please take a look.
10 years, 10 months ago (2013-07-24 17:29:48 UTC) #11
rharding
10 years, 10 months ago (2013-07-24 18:30:47 UTC) #12
*** Submitted:

Support autocomplete of charms in search.

- Adds support to the charm-search widget to autocomplete as a user types
- Adds a new api endpoint to the store 'autocomplete'
- Adds the yui3-skin-sam to enable proper styling of the AC widget. This
caused some CSS changes to undo the damage in other locations.
- Update the view to only deal with the search widget when a store is present.
In tests it's not, and there's no point getting errors around it.
- Make sure we don't display metadata in the tiny charm-token sized used for
the AC results display.
- Update tests to deal with the new search widget updates.
- Add test to the new handlebars unless_eq helper. 

Testing Notes:

I know the tests around the AC widget in the search tests are a bit weak. It's
difficult to test since there's not a good way to wait for the html render to
complete with suggestions without doing timeout related code. I've tried to
test that the custom parts of the code we init are touched and working. So we
verify that our results include a charm-token html result vs a plain 'name' of
a charm. Most of the work in there is using code that's already under test,
like firing viewNavigate and such. If we find bugs I'm more than happy to
break into more complicated testing to make sure they don't reoccur, but it's
much of this is tying together code that's already under test.

R=curtis, jeff.pihach
CC=
https://codereview.appspot.com/11126043
Sign in to reply to this message.

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