From 9887171447a600b2883aace562f386daeda8380b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kry=C5=A1p=C3=ADn?= Date: Fri, 9 Jun 2023 23:15:18 +0200 Subject: [PATCH] BREAKING CHANGE(web-twig): Remove `error` Validation State in favor of `danger` #DS-677 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Migration Guide Instead of the `error` value of the validationState prop, use `danger`. This applies to Checkbox, Radio, TextField, TextArea, and TextFieldBase. - `` → `` Please refer back to these instructions or reach out to our team if you encounter any issues during migration. --- .../CheckboxField/CheckboxField.twig | 5 -- .../components/CheckboxField/README.md | 37 +++++++------- .../Resources/components/TextArea/README.md | 1 - .../Resources/components/TextField/README.md | 39 +++++++-------- .../components/TextFieldBase/README.md | 49 +++++++++---------- .../TextFieldBase/TextFieldBase.twig | 3 -- ...data set checkboxFieldDefault.twig__1.html | 2 +- ...data set passwordFieldDefault.twig__1.html | 2 +- ...with data set textAreaDefault.twig__1.html | 2 +- ...data set textFieldBaseDefault.twig__1.html | 2 +- ...ta set textFieldBaseMultiline.twig__1.html | 2 +- ...ith data set textFieldDefault.twig__1.html | 2 +- ...data set textFieldDefaultPure.twig__1.html | 2 +- ...data set checkboxFieldDefault.twig__1.html | 11 +++++ ... set checkboxFieldDefaultPure.twig__1.html | 12 +++++ ...data set passwordFieldDefault.twig__1.html | 7 +++ ...ith data set textFieldDefault.twig__1.html | 7 +++ ...data set textFieldDefaultPure.twig__1.html | 8 +++ .../checkboxFieldDefault.twig | 1 - .../passwordFieldDefault.twig | 2 +- .../components-fixtures/textAreaDefault.twig | 2 +- .../textFieldBaseDefault.twig | 2 +- .../textFieldBaseMultiline.twig | 2 +- .../components-fixtures/textFieldDefault.twig | 2 +- .../textFieldDefaultPure.twig | 2 +- 25 files changed, 119 insertions(+), 87 deletions(-) create mode 100644 packages/web-twig/tests/__snapshots__/ComponentsSnapshotTest__testShouldSnapshotComponents with data set checkboxFieldDefault.twig__1.html create mode 100644 packages/web-twig/tests/__snapshots__/ComponentsSnapshotTest__testShouldSnapshotComponents with data set checkboxFieldDefaultPure.twig__1.html create mode 100644 packages/web-twig/tests/__snapshots__/ComponentsSnapshotTest__testShouldSnapshotComponents with data set passwordFieldDefault.twig__1.html create mode 100644 packages/web-twig/tests/__snapshots__/ComponentsSnapshotTest__testShouldSnapshotComponents with data set textFieldDefault.twig__1.html create mode 100644 packages/web-twig/tests/__snapshots__/ComponentsSnapshotTest__testShouldSnapshotComponents with data set textFieldDefaultPure.twig__1.html diff --git a/packages/web-twig/src/Resources/components/CheckboxField/CheckboxField.twig b/packages/web-twig/src/Resources/components/CheckboxField/CheckboxField.twig index baa9a114c7..49801c6745 100644 --- a/packages/web-twig/src/Resources/components/CheckboxField/CheckboxField.twig +++ b/packages/web-twig/src/Resources/components/CheckboxField/CheckboxField.twig @@ -42,11 +42,6 @@ {%- set _labelClassName = [ _labelClassName, _labelHiddenClassName, _labelRequiredClassName ] -%} {%- set _mainPropsWithoutId = props | filter((value, prop) => prop is not same as('id')) -%} -{# Deprecations #} -{% if _validationState is same as('error') %} - {% deprecated 'CheckboxField: The "error" value for "validationState" property will be removed in the next major version. Use "danger" instead.' %} -{% endif %} -