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

Issue 8317043: Handles edge conditions for charm container

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 1 month ago by j.c.sackett
Modified:
11 years, 1 month ago
Reviewers:
rharding, mp+156839, jeff.pihach
Visibility:
Public.

Description

Handles edge conditions for charm container The charm container previously could end up in an awkward situation if the cutoff was higher than the number of charms passed in. This addresses that situation. -Cutoff must be a nonnegative number -The expander control only renders if there are extra charm tokens; in other words, only renders if more charms are passed in than the cutoff. -The expand event is only created and bound if the same condition is met. -As a side effect, the container is now made safe if no charms are passed in at all. https://code.launchpad.net/~jcsackett/juju-gui/charm-container-cutoff-boundary/+merge/156839 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 9

Patch Set 2 : Handles edge conditions for charm container #

Total comments: 1

Patch Set 3 : Handles edge conditions for charm container #

Patch Set 4 : Handles edge conditions for charm container #

Patch Set 5 : Handles edge conditions for charm container #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -6 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M app/templates/charm-container.handlebars View 1 chunk +3 lines, -1 line 0 comments Download
M app/widgets/charm-container.js View 1 2 4 chunks +31 lines, -4 lines 0 comments Download
M test/test_charm_container.js View 1 2 chunks +32 lines, -1 line 0 comments Download

Messages

Total messages: 11
j.c.sackett
Please take a look.
11 years, 1 month ago (2013-04-03 12:58:48 UTC) #1
rharding
LGTM with trivial below. https://codereview.appspot.com/8317043/diff/1/app/widgets/charm-container.js File app/widgets/charm-container.js (right): https://codereview.appspot.com/8317043/diff/1/app/widgets/charm-container.js#newcode42 app/widgets/charm-container.js:42: this.set('has_extra', false); I'd change this ...
11 years, 1 month ago (2013-04-03 13:58:46 UTC) #2
j.c.sackett
Thanks. Comments addressed, changes coming. https://codereview.appspot.com/8317043/diff/1/app/widgets/charm-container.js File app/widgets/charm-container.js (right): https://codereview.appspot.com/8317043/diff/1/app/widgets/charm-container.js#newcode42 app/widgets/charm-container.js:42: this.set('has_extra', false); Done. https://codereview.appspot.com/8317043/diff/1/app/widgets/charm-container.js#newcode95 ...
11 years, 1 month ago (2013-04-03 14:32:22 UTC) #3
jeff.pihach
Thanks for these changes - for some reason this test suite causes our tests to ...
11 years, 1 month ago (2013-04-03 14:38:27 UTC) #4
j.c.sackett
Please take a look.
11 years, 1 month ago (2013-04-03 14:59:32 UTC) #5
jeff.pihach
See zee comment below. https://codereview.appspot.com/8317043/diff/8001/app/widgets/charm-container.js File app/widgets/charm-container.js (right): https://codereview.appspot.com/8317043/diff/8001/app/widgets/charm-container.js#newcode172 app/widgets/charm-container.js:172: has_extra: { I'm really not ...
11 years, 1 month ago (2013-04-03 15:04:54 UTC) #6
j.c.sackett
https://codereview.appspot.com/8317043/diff/1/app/widgets/charm-container.js File app/widgets/charm-container.js (right): https://codereview.appspot.com/8317043/diff/1/app/widgets/charm-container.js#newcode177 app/widgets/charm-container.js:177: has_extra: { On 2013/04/03 14:38:27, jeff.pihach wrote: > What ...
11 years, 1 month ago (2013-04-03 15:16:40 UTC) #7
j.c.sackett
Please take a look.
11 years, 1 month ago (2013-04-03 15:18:09 UTC) #8
jeff.pihach
LGTM - Ahh well in that case that should be a handlebars helper. But I'm ...
11 years, 1 month ago (2013-04-03 15:19:43 UTC) #9
j.c.sackett
On 2013/04/03 15:19:43, jeff.pihach wrote: > LGTM - Ahh well in that case that should ...
11 years, 1 month ago (2013-04-03 15:48:04 UTC) #10
j.c.sackett
11 years, 1 month ago (2013-04-03 17:09:10 UTC) #11
*** Submitted:

Handles edge conditions for charm container

The charm container previously could end up in an awkward situation if the
cutoff was higher than the number of charms passed in. This addresses that
situation.

-Cutoff must be a nonnegative number
-The expander control only renders if there are extra charm tokens; in other
words, only renders if more charms are passed in than the cutoff.
-The expand event is only created and bound if the same condition is met.
-As a side effect, the container is now made safe if no charms are passed in
at all.

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

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