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

Issue 14565044: Make the charm source tab work better

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 7 months ago by gary.poster
Modified:
10 years, 7 months ago
Reviewers:
mp+189970, jeff.pihach
Visibility:
Public.

Description

Make the charm source tab work better This was a quick hack I did that I wanted to land rather than throw away. Quick hacks are a lot less quick once you throw in tests. :-/ https://code.launchpad.net/~gary/juju-gui/bug1203583/+merge/189970 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 3

Patch Set 2 : Make the charm source tab work better #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -2 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M app/models/charm.js View 1 1 chunk +54 lines, -1 line 0 comments Download
M app/subapps/browser/views/bundle.js View 1 chunk +4 lines, -1 line 0 comments Download
M app/subapps/browser/views/charm.js View 1 chunk +7 lines, -0 lines 0 comments Download
M test/test_browser_charm_details.js View 1 chunk +21 lines, -0 lines 0 comments Download
M test/test_model.js View 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 5
gary.poster
Please take a look.
10 years, 7 months ago (2013-10-08 20:51:22 UTC) #1
gary.poster
https://codereview.appspot.com/14565044/diff/1/app/subapps/browser/views/bundle.js File app/subapps/browser/views/bundle.js (right): https://codereview.appspot.com/14565044/diff/1/app/subapps/browser/views/bundle.js#newcode169 app/subapps/browser/views/bundle.js:169: 'subapp-browser-entitybaseview' I discovered that the file needed these in ...
10 years, 7 months ago (2013-10-08 20:53:29 UTC) #2
jeff.pihach
LGTM QA OK with trivial https://codereview.appspot.com/14565044/diff/1/app/models/charm.js File app/models/charm.js (right): https://codereview.appspot.com/14565044/diff/1/app/models/charm.js#newcode466 app/models/charm.js:466: setter: function(value) { you ...
10 years, 7 months ago (2013-10-08 21:03:10 UTC) #3
gary.poster
*** Submitted: Make the charm source tab work better This was a quick hack I ...
10 years, 7 months ago (2013-10-08 21:35:58 UTC) #4
gary.poster
10 years, 7 months ago (2013-10-09 14:35:27 UTC) #5
On 2013/10/08 21:03:10, jeff.pihach wrote:
> LGTM QA OK with trivial
> 
> https://codereview.appspot.com/14565044/diff/1/app/models/charm.js
> File app/models/charm.js (right):
> 
> https://codereview.appspot.com/14565044/diff/1/app/models/charm.js#newcode466
> app/models/charm.js:466: setter: function(value) {
> you can quote this instead of commenting it if you like.
> 
> https://codereview.appspot.com/14565044/diff/1/app/models/charm.js#newcode468
> app/models/charm.js:468: value.sort(function(a, b) {
> This all looks great but I'm curious what this sort method gets you over the
> standard lexicographic sort. You may also want to add this comment to the code
> so others know when looking at this.

Thank you for the review and comments, Jeff.  I added the following explanation
to the code.

            // This sort has several properties that are different than a
            // standard lexicographic sort.
            // * Filenames in the root are grouped together, rather than
            //   sorted along with the names of directories.
            // * Sort ignores case, unless case is the only way to
            //   distinguish between values, in which case it is honored
            //   per-directory. For example, this is sorted: "a", "b/c",
            //   "b/d", "B/b", "B/c", "e/f".  Notice that "b" directory values
            //   and "B" directory values are grouped together, where they
            //   would not necessarily be in a simpler case-insensitive
            //   lexicographic sort.
            // If you rip this out for something different and simpler, that's
            // fine; just don't tell me about it. :-)  This seemed like a good
            // approach at the time.
Sign in to reply to this message.

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