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

Issue 8922043: Use textarea for charm config entries.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 12 months ago by bac
Modified:
10 years, 12 months ago
Reviewers:
benjamin.saller, mp+160435, gary.poster
Visibility:
Public.

Description

Use textarea for charm config entries. If a charm config default value has multiple lines, then use a textarea box for the entry in the charm config panel. The textarea has some known styling issues when a scrollbar is automatically shown. Given the infrequency of this styling being shown it has been OK'd for landing with these visual deficiencies. https://code.launchpad.net/~bac/juju-gui/1170468/+merge/160435 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 10

Patch Set 2 : Use textarea for charm config entries. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+200 lines, -15 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M app/templates/service-config.partial View 1 chunk +13 lines, -6 lines 0 comments Download
M app/views/utils.js View 1 1 chunk +15 lines, -2 lines 0 comments Download
M lib/views/stylesheet.less View 2 chunks +5 lines, -2 lines 0 comments Download
M test/test_charm_configuration.js View 4 chunks +47 lines, -5 lines 0 comments Download
M test/test_utils.js View 1 chunk +118 lines, -0 lines 0 comments Download

Messages

Total messages: 4
bac
Please take a look.
10 years, 12 months ago (2013-04-23 16:57:19 UTC) #1
gary.poster
LGTM, thank you! Gary https://codereview.appspot.com/8922043/diff/1/app/views/utils.js File app/views/utils.js (right): https://codereview.appspot.com/8922043/diff/1/app/views/utils.js#newcode622 app/views/utils.js:622: // For simplicity, numLines will ...
10 years, 12 months ago (2013-04-23 18:00:56 UTC) #2
benjamin.saller
LGTM The comment thing is a trival but should be corrected. Thanks! https://codereview.appspot.com/8922043/diff/1/app/views/utils.js File app/views/utils.js ...
10 years, 12 months ago (2013-04-23 18:57:03 UTC) #3
bac
10 years, 12 months ago (2013-04-23 19:41:05 UTC) #4
*** Submitted:

Use textarea for charm config entries.

If a charm config default value has multiple lines, then use a textarea box
for the entry in the charm config panel.

The textarea has some known styling issues when a scrollbar is automatically
shown.  Given the infrequency of this styling being shown it has been OK'd for
landing with these visual deficiencies.

R=gary.poster, benjamin.saller
CC=
https://codereview.appspot.com/8922043

https://codereview.appspot.com/8922043/diff/1/app/views/utils.js
File app/views/utils.js (right):

https://codereview.appspot.com/8922043/diff/1/app/views/utils.js#newcode622
app/views/utils.js:622: // For simplicity, numLines will be 0 if not multi-line
or 2 or more
On 2013/04/23 18:57:04, benjamin.saller wrote:
> On 2013/04/23 18:00:56, gary.poster wrote:
> > 0 or 1 if not multi-line, right?
> 
> Yes, this comment appears to be wrong.
> "".split("\n").length === 1
> 
> but the test below (>1) is valid.

Done.

https://codereview.appspot.com/8922043/diff/1/app/views/utils.js#newcode622
app/views/utils.js:622: // For simplicity, numLines will be 0 if not multi-line
or 2 or more
Originally I tried to skate by without isMultiLine and just rely on rows being 0
or >=2.  That was too hacky so I backed it out but forgot to fix the comment.

The comment has been removed entirely as it is no longer needed.

https://codereview.appspot.com/8922043/diff/1/app/views/utils.js#newcode622
app/views/utils.js:622: // For simplicity, numLines will be 0 if not multi-line
or 2 or more
Originally I tried to skate by without isMultiLine and just rely on rows being 0
or >=2.  That was too hacky so I backed it out but forgot to fix the comment.

The comment has been removed entirely as it is no longer needed.

https://codereview.appspot.com/8922043/diff/1/app/views/utils.js#newcode623
app/views/utils.js:623: // if there are multiple lines.
On 2013/04/23 18:00:56, gary.poster wrote:
> Could you file a juju core bug about this (requesting an explicit multi-line
> type, or something like that, explaining the use case), or make me do it
(happy
> to), and then reference the bug here?

Done.

https://codereview.appspot.com/8922043/diff/1/lib/views/stylesheet.less
File lib/views/stylesheet.less (right):

https://codereview.appspot.com/8922043/diff/1/lib/views/stylesheet.less#newco...
lib/views/stylesheet.less:1110: height: 15px;
Maybe but I'm hesitant to get into it in this branch.  You'll note I just moved
the existing height specification for an input[type=text] box to this location
so that a single string input has this specified height but it is unset for the
textarea and the size is computed by the 'rows' parameter.
Sign in to reply to this message.

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