| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #3220 +/- ##
==========================================
+ Coverage 67.44% 67.46% +0.02%
==========================================
Files 892 892
Lines 24872 24906 +34
Branches 2142 2151 +9
==========================================
+ Hits 16774 16804 +30
- Misses 7093 7097 +4
Partials 1005 1005
Continue to review full report at Codecov.
|
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-3220.surge.sh |
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-3220.surge.sh |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good to me.
Sorry, something went wrong.
|
We should add new props to demo app to verify them in integration environment. |
Sorry, something went wrong.
| /** Sets the FormGroup isValid. */ | ||
| isValid?: boolean; | ||
| /** Sets the FormGroup validated. */ | ||
| validated?: boolean; |
There was a problem hiding this comment.
should we call this isValidated to match our other boolean modifier props?
Sorry, something went wrong.
There was a problem hiding this comment.
I was looking at this again. I think having the 2 props isValid and validated may be a little confusing. I know to make them one prop would be a breaking change. Could we maybe make validated into an enum? If the enum is used, isValid can be ignored. We can then deprecate isValid when we have a breaking change release.
ValidatedOptions { success = 'success', error = 'error', default = 'default' }
the modifiers would be applied if not default validated !== ValidatedOptions.default
Sorry, something went wrong.
There was a problem hiding this comment.
@tlabaj is this something that could be done all together for the next breaking change release? That is, leave it this way for now and change both isValid and validated to an enum value as a follow-on?
Sorry, something went wrong.
There was a problem hiding this comment.
It could. I just worry that the two props could be confusing. I wonder if we should at least make the comments more clear as to what the prop actually does. To me isValid could implies that it was validated and it might not be clear you need to also apply validated.
Sorry, something went wrong.
| /** Flag to show if the TextArea is valid or invalid. */ | ||
| isValid?: boolean; | ||
| /** Flag to show if the TextArea has been validated. */ | ||
| validated?: boolean; |
There was a problem hiding this comment.
same question as above.
Sorry, something went wrong.
|
In the <FormSelect> example, if you choose an invalid option, then choose the valid option before the validation finishes, you'll end up with this: And I don't see a validated example for <TextInput>, even though validated works fine. |
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-3220.surge.sh |
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-3220.surge.sh |
Sorry, something went wrong.
| /** Sets the FormGroup isValid. This prop will be deprecated you should use validated instead. */ | ||
| isValid?: boolean; | ||
| /** Sets the FormGroup validated. */ | ||
| validated?: 'success' | 'error' | 'default'; |
There was a problem hiding this comment.
Maybe some explanation that success is going to add the treatments (typically not wanted).
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-3220.surge.sh |
Sorry, something went wrong.
| /** Sets the FormGroup required. */ | ||
| isRequired?: boolean; | ||
| /** Sets the FormGroup isValid. */ | ||
| /** Sets the FormGroup isValid. This prop will be deprecated you should use validated instead. */ |
There was a problem hiding this comment.
| /** Sets the FormGroup isValid. This prop will be deprecated you should use validated instead. */ | |
| /** Sets the FormGroup isValid. This prop will be deprecated. You should use validated instead. */ |
Sorry, something went wrong.
| /** value of selected option */ | ||
| value?: any; | ||
| /** Flag indicating selection is valid */ | ||
| /** Flag indicating selection is valid. This prop will be deprecated you should use validated instead. */ |
There was a problem hiding this comment.
| /** Flag indicating selection is valid. This prop will be deprecated you should use validated instead. */ | |
| /** Flag indicating selection is valid. This prop will be deprecated. You should use validated instead. */ |
Sorry, something went wrong.
| /** Flag to show if the TextArea is required. */ | ||
| isRequired?: boolean; | ||
| /** Flag to show if the TextArea is valid or invalid. */ | ||
| /** Flag to show if the TextArea is valid or invalid. This prop will be deprecated you should use validated instead. */ |
There was a problem hiding this comment.
| /** Flag to show if the TextArea is valid or invalid. This prop will be deprecated you should use validated instead. */ | |
| /** Flag to show if the TextArea is valid or invalid. This prop will be deprecated. You should use validated instead. */ |
Sorry, something went wrong.
| * If set to success, input will be modified to indicate valid state. If set to success, input will be modified to indicate valid state. | ||
| * If set to error, text color of helper text will be modified to indicate error state. | ||
| */ | ||
| validated?: 'success' | 'error' | 'default' | ValidatedOptions; |
There was a problem hiding this comment.
What is ValidatedOptions? It isn't in the docs for TextInput or Select.
Sorry, something went wrong.
There was a problem hiding this comment.
Nice catch!
Sorry, something went wrong.
| /** Flag to show if the TextArea is valid or invalid. This prop will be deprecated you should use validated instead. */ | ||
| isValid?: boolean; | ||
| /** Value to indicate if the input is modified to show that validation state. | ||
| * If set to success, input will be modified to indicate valid state. If set to success, input will be modified to indicate valid state. |
There was a problem hiding this comment.
| * If set to success, input will be modified to indicate valid state. If set to success, input will be modified to indicate valid state. | |
| * If set to success, textarea will be modified to indicate valid state. |
Sorry, something went wrong.
| isValid?: boolean; | ||
| /** Value to indicate if the input is modified to show that validation state. | ||
| * If set to success, input will be modified to indicate valid state. If set to success, input will be modified to indicate valid state. | ||
| * If set to error, text color of helper text will be modified to indicate error state. |
There was a problem hiding this comment.
| * If set to error, text color of helper text will be modified to indicate error state. | |
| * If set to error, textarea will be modified to indicate error state. |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good, functions as I would expect. Left some comments about the docs.
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-3220.surge.sh |
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-3220.surge.sh |
Sorry, something went wrong.
| /** Flag to show if the input is required. */ | ||
| isRequired?: boolean; | ||
| /** Flag to show if the input is valid or invalid. */ | ||
| /** Flag to show if the input is valid or invalid. This prop will be deprecated you should use validated instead. */ |
There was a problem hiding this comment.
| /** Flag to show if the input is valid or invalid. This prop will be deprecated you should use validated instead. */ | |
| /** Flag to show if the input is valid or invalid. This prop will be deprecated. You should use validated instead. */ |
Sorry, something went wrong.
| /** Flag indicating selection is valid */ | ||
| /** Flag indicating selection is valid. This prop will be deprecated. You should use validated instead. */ | ||
| isValid?: boolean; | ||
| /* Value to indicate if the input is modified to shoe that validation state. |
There was a problem hiding this comment.
| /* Value to indicate if the input is modified to shoe that validation state. | |
| /* Value to indicate if the select is modified to show that validation state. |
Sorry, something went wrong.
| /** Flag indicating selection is valid. This prop will be deprecated. You should use validated instead. */ | ||
| isValid?: boolean; | ||
| /* Value to indicate if the input is modified to shoe that validation state. | ||
| * If set to success, input will be modified to indicate valid state. If set to success, input will be modified to indicate valid state. |
There was a problem hiding this comment.
| * If set to success, input will be modified to indicate valid state. If set to success, input will be modified to indicate valid state. | |
| * If set to success, select will be modified to indicate valid state. |
Sorry, something went wrong.
| isValid?: boolean; | ||
| /* Value to indicate if the input is modified to shoe that validation state. | ||
| * If set to success, input will be modified to indicate valid state. If set to success, input will be modified to indicate valid state. | ||
| * If set to error, text color of helper text will be modified to indicate error state. |
There was a problem hiding this comment.
| * If set to error, text color of helper text will be modified to indicate error state. | |
| * If set to error, select will be modified to indicate error state. |
Sorry, something went wrong.
| /** Flag to show if the TextArea is valid or invalid. */ | ||
| /** Flag to show if the TextArea is valid or invalid. This prop will be deprecated. You should use validated instead. */ | ||
| isValid?: boolean; | ||
| /** Value to indicate if the input is modified to show that validation state. |
There was a problem hiding this comment.
| /** Value to indicate if the input is modified to show that validation state. | |
| /** Value to indicate if the textarea is modified to show that validation state. |
Sorry, something went wrong.
| /** Flag to show if the input is valid or invalid. */ | ||
| /** Flag to show if the input is valid or invalid. This prop will be deprecated. You should use validated instead. */ | ||
| isValid?: boolean; | ||
| /* Value to indicate if the selection is modified to shoe that validation state. |
There was a problem hiding this comment.
| /* Value to indicate if the selection is modified to shoe that validation state. | |
| /* Value to indicate if the input is modified to show that validation state. |
Sorry, something went wrong.
| /** Flag to show if the input is valid or invalid. This prop will be deprecated. You should use validated instead. */ | ||
| isValid?: boolean; | ||
| /* Value to indicate if the selection is modified to shoe that validation state. | ||
| * If set to success, input will be modified to indicate valid state. If set to success, input will be modified to indicate valid state. |
There was a problem hiding this comment.
| * If set to success, input will be modified to indicate valid state. If set to success, input will be modified to indicate valid state. | |
| * If set to success, input will be modified to indicate valid state. |
Sorry, something went wrong.
| isValid?: boolean; | ||
| /* Value to indicate if the selection is modified to shoe that validation state. | ||
| * If set to success, input will be modified to indicate valid state. If set to success, input will be modified to indicate valid state. | ||
| * If set to error, text color of helper text will be modified to indicate error state. |
There was a problem hiding this comment.
| * If set to error, text color of helper text will be modified to indicate error state. | |
| * If set to success, input will be modified to indicate valid state. |
Sorry, something went wrong.
There was a problem hiding this comment.
⭐️LGTM! ⭐️
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-3220.surge.sh |
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-3220.surge.sh |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What:
Add validated variant to form inputs
Additional issues:
React follow on to: patternfly/patternfly#2338
closes #3091