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

Issue 6816046: Change charm search to use HTML5 placeholder

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 6 months ago by gary.poster
Modified:
11 years, 5 months ago
Reviewers:
mp+131788
Visibility:
Public.

Description

Change charm search to use HTML5 placeholder CSS does not allow you to specify a selector for a dynamic empty (or not empty) field value. The two approaches around it I found are JS and required/:valid. I chose required/:valid because it required no JS and seemed simpler. However, this required a CSS workaround: bootstrap wants to highlight focused invalid fields with a red glow. I changed this to have the usual blue glow in the case of this one field. https://code.launchpad.net/~gary/juju-gui/placeholder/+merge/131788 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 3

Patch Set 2 : Change charm search to use HTML5 placeholder #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -18 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M app/index.html View 1 1 chunk +2 lines, -1 line 0 comments Download
M app/views/charm-search.js View 1 1 chunk +0 lines, -15 lines 0 comments Download
M lib/views/stylesheet.less View 1 1 chunk +10 lines, -2 lines 0 comments Download

Messages

Total messages: 5
gary.poster
Please take a look.
11 years, 6 months ago (2012-10-28 16:42:42 UTC) #1
bac
Nice change Gary both in effect and implementation. Thanks. I hope it can land very ...
11 years, 5 months ago (2012-11-01 09:47:56 UTC) #2
benjamin.saller
Well played. I didn't remember that exists, but it does raise the question of browser ...
11 years, 5 months ago (2012-11-01 11:02:25 UTC) #3
gary.poster
Thank you both, Ben and Brad. https://codereview.appspot.com/6816046/diff/1/lib/views/stylesheet.less File lib/views/stylesheet.less (right): https://codereview.appspot.com/6816046/diff/1/lib/views/stylesheet.less#newcode103 lib/views/stylesheet.less:103: box-shadow: inset 0 ...
11 years, 5 months ago (2012-11-01 11:11:19 UTC) #4
gary.poster
11 years, 5 months ago (2012-11-01 11:13:53 UTC) #5
*** Submitted:

Change charm search to use HTML5 placeholder

CSS does not allow you to specify a selector for a dynamic empty (or not empty)
field value.  The two approaches around it I found are JS and required/:valid. 
I chose required/:valid because it required no JS and seemed simpler.  However,
this required a CSS workaround: bootstrap wants to highlight focused invalid
fields with a red glow.  I changed this to have the usual blue glow in the case
of this one field.

R=bac, benjamin.saller
CC=
https://codereview.appspot.com/6816046
Sign in to reply to this message.

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