Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core/presentation): Handle 'null' in orEmptyString helper #7606

Merged
merged 3 commits into from
Nov 7, 2019

Conversation

christopherthielen
Copy link
Contributor

orEmptyString is useful when passing a value to a controlled input, i.e.: <input type="text" value={orEmptyString(props.value)} />. If you pass in null or undefined to a controlled component, react complains.

Previously, only undefined was handled. Now any falsey value will be coerced to empty string "" which should be fine anywhere strings values are being fed to inputs.

@christopherthielen christopherthielen added the ready to merge Reviewed and ready for merge label Nov 7, 2019
@mergify mergify bot added the auto merged Merged automatically by a bot label Nov 7, 2019
@mergify mergify bot merged commit 9abd35f into spinnaker:master Nov 7, 2019
erikmunson pushed a commit to erikmunson/deck that referenced this pull request Nov 11, 2019
fc054fe feat(core/managed): visually refresh/rebrand infra details indicator (spinnaker#7617)
9c8ac86 fix(core/managed): properly diff/patch mutable infra groupings (spinnaker#7618)
ae91048 feat(core/presentation): Create a SpelInput that supports server-side preview of spel expressions (against previous executions)
55beff7 feat(core/spel): Add a SpelService to (initially) evaluate expressions on the Server
b01e6db refactor(core/presentation): use useInternalValidator in NumberInput
49f880f feat(core/presentation): Create a useInternalValidator hook for FormInputs to use
e370d47 feat(core/presentation): Made useData hook default result behavior more reasonable (spinnaker#7602)
9d99e04 feat(core/managed): add RESUMED resource status (spinnaker#7611)
f49fedf feat(core/managed): add deep links to status reference doc (spinnaker#7610)
9abd35f fix(core/presentation): Handle 'null' in orEmptyString helper (spinnaker#7606)
e0cc0d6 feat(core/presentation): Mark all SpinFormik initialValues fields as 'touched' (spinnaker#7604)
431cb86 feat(core/presentation): Add generic type param (for selected data type) to ReactSelectInput (spinnaker#7603)
e6280e5 fix(core/presentation): MapEditor: Make errors fill the entire row width.
3df215b fix(core/presentation): FormikFormField: call revalidate whenever internal validators change
ae396e5 fix(core/presentation): pass objects through in useValidationData There's a weird case where a FormikFormField may be used for a complex object with multiple fields and/or arrays. In this case, the Field's validator should return a structured error object. This isn't fully accounted for in the FormField API. For now, pass the complex error object through as 'validationMessage'. Tag it as "hidden" so we don't try to render it elsewhere as a ReactNode.
ef35c5c fix(artifacts): enable inline editing of base64 artifacts (spinnaker#7612)
97a033f chore(core/presentation): rename test file to FormValidator.spec.ts
d343512 fix(core/application): add error state to application models, log exceptions (spinnaker#7599)
236e623 fix(core/presentation): remove style + wrapperClassName from HoverablePopover (spinnaker#7597)
7a81a66 feat(script): expose propertiesFile field (spinnaker#7595)
erikmunson pushed a commit that referenced this pull request Nov 11, 2019
* chore(core): Bump version to 0.0.430

fc054fe feat(core/managed): visually refresh/rebrand infra details indicator (#7617)
9c8ac86 fix(core/managed): properly diff/patch mutable infra groupings (#7618)
ae91048 feat(core/presentation): Create a SpelInput that supports server-side preview of spel expressions (against previous executions)
55beff7 feat(core/spel): Add a SpelService to (initially) evaluate expressions on the Server
b01e6db refactor(core/presentation): use useInternalValidator in NumberInput
49f880f feat(core/presentation): Create a useInternalValidator hook for FormInputs to use
e370d47 feat(core/presentation): Made useData hook default result behavior more reasonable (#7602)
9d99e04 feat(core/managed): add RESUMED resource status (#7611)
f49fedf feat(core/managed): add deep links to status reference doc (#7610)
9abd35f fix(core/presentation): Handle 'null' in orEmptyString helper (#7606)
e0cc0d6 feat(core/presentation): Mark all SpinFormik initialValues fields as 'touched' (#7604)
431cb86 feat(core/presentation): Add generic type param (for selected data type) to ReactSelectInput (#7603)
e6280e5 fix(core/presentation): MapEditor: Make errors fill the entire row width.
3df215b fix(core/presentation): FormikFormField: call revalidate whenever internal validators change
ae396e5 fix(core/presentation): pass objects through in useValidationData There's a weird case where a FormikFormField may be used for a complex object with multiple fields and/or arrays. In this case, the Field's validator should return a structured error object. This isn't fully accounted for in the FormField API. For now, pass the complex error object through as 'validationMessage'. Tag it as "hidden" so we don't try to render it elsewhere as a ReactNode.
ef35c5c fix(artifacts): enable inline editing of base64 artifacts (#7612)
97a033f chore(core/presentation): rename test file to FormValidator.spec.ts
d343512 fix(core/application): add error state to application models, log exceptions (#7599)
236e623 fix(core/presentation): remove style + wrapperClassName from HoverablePopover (#7597)
7a81a66 feat(script): expose propertiesFile field (#7595)

* chore(amazon): Bump version to 0.0.223

3e655b9 feat(amazon/instance): add configurable exclusion rules for families + categories (#7623)
@christopherthielen christopherthielen deleted the oremptystring branch November 12, 2019 01:20
sergiopena pushed a commit to sergiopena/deck that referenced this pull request Jan 10, 2020
* chore(core): Bump version to 0.0.430

fc054fe feat(core/managed): visually refresh/rebrand infra details indicator (spinnaker#7617)
9c8ac86 fix(core/managed): properly diff/patch mutable infra groupings (spinnaker#7618)
ae91048 feat(core/presentation): Create a SpelInput that supports server-side preview of spel expressions (against previous executions)
55beff7 feat(core/spel): Add a SpelService to (initially) evaluate expressions on the Server
b01e6db refactor(core/presentation): use useInternalValidator in NumberInput
49f880f feat(core/presentation): Create a useInternalValidator hook for FormInputs to use
e370d47 feat(core/presentation): Made useData hook default result behavior more reasonable (spinnaker#7602)
9d99e04 feat(core/managed): add RESUMED resource status (spinnaker#7611)
f49fedf feat(core/managed): add deep links to status reference doc (spinnaker#7610)
9abd35f fix(core/presentation): Handle 'null' in orEmptyString helper (spinnaker#7606)
e0cc0d6 feat(core/presentation): Mark all SpinFormik initialValues fields as 'touched' (spinnaker#7604)
431cb86 feat(core/presentation): Add generic type param (for selected data type) to ReactSelectInput (spinnaker#7603)
e6280e5 fix(core/presentation): MapEditor: Make errors fill the entire row width.
3df215b fix(core/presentation): FormikFormField: call revalidate whenever internal validators change
ae396e5 fix(core/presentation): pass objects through in useValidationData There's a weird case where a FormikFormField may be used for a complex object with multiple fields and/or arrays. In this case, the Field's validator should return a structured error object. This isn't fully accounted for in the FormField API. For now, pass the complex error object through as 'validationMessage'. Tag it as "hidden" so we don't try to render it elsewhere as a ReactNode.
ef35c5c fix(artifacts): enable inline editing of base64 artifacts (spinnaker#7612)
97a033f chore(core/presentation): rename test file to FormValidator.spec.ts
d343512 fix(core/application): add error state to application models, log exceptions (spinnaker#7599)
236e623 fix(core/presentation): remove style + wrapperClassName from HoverablePopover (spinnaker#7597)
7a81a66 feat(script): expose propertiesFile field (spinnaker#7595)

* chore(amazon): Bump version to 0.0.223

3e655b9 feat(amazon/instance): add configurable exclusion rules for families + categories (spinnaker#7623)
yunzhangit pushed a commit to yunzhangit/deck that referenced this pull request Mar 28, 2021
* chore(core): Bump version to 0.0.430

fc054fe feat(core/managed): visually refresh/rebrand infra details indicator (spinnaker#7617)
9c8ac86 fix(core/managed): properly diff/patch mutable infra groupings (spinnaker#7618)
ae91048 feat(core/presentation): Create a SpelInput that supports server-side preview of spel expressions (against previous executions)
55beff7 feat(core/spel): Add a SpelService to (initially) evaluate expressions on the Server
b01e6db refactor(core/presentation): use useInternalValidator in NumberInput
49f880f feat(core/presentation): Create a useInternalValidator hook for FormInputs to use
e370d47 feat(core/presentation): Made useData hook default result behavior more reasonable (spinnaker#7602)
9d99e04 feat(core/managed): add RESUMED resource status (spinnaker#7611)
f49fedf feat(core/managed): add deep links to status reference doc (spinnaker#7610)
9abd35f fix(core/presentation): Handle 'null' in orEmptyString helper (spinnaker#7606)
e0cc0d6 feat(core/presentation): Mark all SpinFormik initialValues fields as 'touched' (spinnaker#7604)
431cb86 feat(core/presentation): Add generic type param (for selected data type) to ReactSelectInput (spinnaker#7603)
e6280e5 fix(core/presentation): MapEditor: Make errors fill the entire row width.
3df215b fix(core/presentation): FormikFormField: call revalidate whenever internal validators change
ae396e5 fix(core/presentation): pass objects through in useValidationData There's a weird case where a FormikFormField may be used for a complex object with multiple fields and/or arrays. In this case, the Field's validator should return a structured error object. This isn't fully accounted for in the FormField API. For now, pass the complex error object through as 'validationMessage'. Tag it as "hidden" so we don't try to render it elsewhere as a ReactNode.
ef35c5c fix(artifacts): enable inline editing of base64 artifacts (spinnaker#7612)
97a033f chore(core/presentation): rename test file to FormValidator.spec.ts
d343512 fix(core/application): add error state to application models, log exceptions (spinnaker#7599)
236e623 fix(core/presentation): remove style + wrapperClassName from HoverablePopover (spinnaker#7597)
7a81a66 feat(script): expose propertiesFile field (spinnaker#7595)

* chore(amazon): Bump version to 0.0.223

3e655b9 feat(amazon/instance): add configurable exclusion rules for families + categories (spinnaker#7623)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto merged Merged automatically by a bot ready to merge Reviewed and ready for merge target-release/1.18
Projects
None yet
4 participants