-
-
Notifications
You must be signed in to change notification settings - Fork 831
Conversation
ara4n
commented
Jan 31, 2019
•
edited
Loading
edited
- renames RoomTooltip to be a generic Tooltip (which it is)
- hooks it into Field to show validation results
- adds onValidate to Field to let Field instances call an arbitrary validation function
* renames RoomTooltip to be a generic Tooltip (which it is) * hooks it into Field to show validation results * adds onValidate to Field to let Field instances call an arbitrary validation function
@@ -90,6 +90,15 @@ export default class ServerConfig extends React.PureComponent { | |||
this.setState({ hsUrl }); | |||
} | |||
|
|||
onHomeserverValidate = (value) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is placeholder to show how it's meant to be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great overall, just added a few questions.
Would be nice to have a screenshot in the future as well. 😁
.mx_Field_valid input, | ||
.mx_Field_valid select, | ||
.mx_Field_valid textarea { | ||
border-color: $input-valid-border-color ! important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What triggered all the important
? Would adding an extra selector like .mx_Field.mx_Field_valid
avoid the need for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's so that the valid/invalid state clobbers the focus-selected colour. i can't remember the specificity of :focus, hence clobbering with !important
, which i agree is ugly. someone with more css-fu would be welcome to switch the selectors to be more elegant ;)
@jryans can i hand this over to you to either tweak & land, or land and tweak & use? |
Sure, works for me! |
* renames RoomTooltip to be a generic Tooltip (which it is) * hooks it into Field to show validation results * adds onValidate to Field to let Field instances call an arbitrary validation function Rebased from @ara4n's matrix-org#2550 by @jryans. Subsequent commits revise and adapt this work.
This is example code from @ara4n's work in matrix-org#2550. We're not ready to actually apply validation yet, so removing this for now.
I have rebased and extended this work in #2780, so the story continues over there. |