Browse Source
fix(onboarding): improve custom connection help
Don't use placeholder for form field help text as this is only visible
when the form field is empty. Instead, add help text below the fields
so that it is always visible to the user in order to help them ensure
they are entering the correct values.
renovate/lint-staged-8.x
Tom Kirkpatrick
7 years ago
No known key found for this signature in database
GPG Key ID: 72203A8EC5967EA8
2 changed files with
23 additions and
14 deletions
app/components/Onboarding/ConnectionDetails.js
app/components/Onboarding/ConnectionDetails.scss
@ -19,12 +19,14 @@ const ConnectionDetails = ({
< input
type = "text"
id = "connectionHost"
placeholder = "Hostname / Port of the Lnd gRPC interface"
className = { ` ${ styles . host } ${ startLndHostError && styles . error } ` }
ref = { input => input }
value = { connectionHost }
onChange = { event => setConnectionHost ( event . target . value ) }
/ >
< p className = { styles . description } >
Hostname and port of the Lnd gRPC interface . Example : localhost : 10009
< / p >
< p className = { ` ${ startLndHostError && styles . visible } ${ styles . errorMessage } ` } >
{ startLndHostError }
< / p >
@ -34,12 +36,12 @@ const ConnectionDetails = ({
< input
type = "text"
id = "connectionCert"
placeholder = "Path to the lnd tls cert"
className = { ` ${ styles . cert } ${ startLndCertError && styles . error } ` }
ref = { input => input }
value = { connectionCert }
onChange = { event => setConnectionCert ( event . target . value ) }
/ >
< p className = { styles . description } > Path to the lnd tls cert . Example : / p a t h / t o / t l s . c e r t < / p >
< p className = { ` ${ startLndCertError && styles . visible } ${ styles . errorMessage } ` } >
{ startLndCertError }
< / p >
@ -49,12 +51,14 @@ const ConnectionDetails = ({
< input
type = "text"
id = "connectionMacaroon"
placeholder = "Path to the lnd macaroon file"
className = { ` ${ styles . macaroon } ${ startLndMacaroonError && styles . error } ` }
ref = { input => input }
value = { connectionMacaroon }
onChange = { event => setConnectionMacaroon ( event . target . value ) }
/ >
< p className = { styles . description } >
Path to the lnd macaroon file . Example : / p a t h / t o / a d m i n . m a c a r o o n
< / p >
< p className = { ` ${ startLndMacaroonError && styles . visible } ${ styles . errorMessage } ` } >
{ startLndMacaroonError }
< / p >
@ -4,15 +4,14 @@
color : $white ;
. input {
margin-bottom : 15 px ;
margin-bottom : 10 px ;
}
label {
display : block ;
font-size : 12 px ;
line-height : 14 px ;
padding-bottom : 5 px ;
min-height : 14 px ;
font-size : 14 px ;
line-height : 18 px ;
margin-bottom : 5 px ;
}
input {
@ -20,13 +19,14 @@
outline : none ;
border : 1 px solid #404040 ;
border-radius : 4 px ;
padding : 10 px ;
padding : 8 px ;
color : $gold ;
-webkit-text-fill-color : $white ;
font-size : 18 px ;
font-weight : 400 ;
width : 600 px ;
transition : all 0 .25 s ;
margin-bottom : 5 px ;
& . error {
border : 1 px solid $red ;
@ -38,15 +38,20 @@
-webkit-text-fill-color : initial ;
}
. description {
font-size : 12 px ;
line-height : 18 px ;
opacity : 0 .5 ;
}
. errorMessage {
margin-top : 10 px ;
font-size : 12 px ;
line-height : 18 px ;
color : $red ;
height : 10 px ;
visibility : hidden ;
font-size : 10 px ;
display : none ;
& . visible {
visibility : visible ;
display : block ;
}
}
}