Review main Merged

80692[BUGFIX] Hide form validators label when no one is available

Benjamin Franzke CR +2 V +2 Easy +20 −5 updated 09/07/23, 05:39

Commit message

With the deprecation removal of regular expressions
based EXT:form validators in #101070, the set of available
validators for the form element type URL became empty.
(See EXT:form/Configuration/Yaml/FormElements/Url.yaml)

Instead of only removing the select element from the DOM,
the entire form-group is now removed, in order to also hide
the corresponding <label> tag, as such a stray label tag
isn't helpful for an enduser and is therefore actually even
invalid HTML (as the reference to an input element is missing).

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Benjamin Kott +1
    • Benni Mack +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Benjamin Kott +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 4

Review log 1316

  1. Benjamin Franzke uploaded patch set 1 08/25/23, 05:07

  2. core-ci voted on patch set 1 V +1 08/25/23, 05:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45819

  3. Andreas Kienast commented on patch set 1 08/25/23, 06:12

    helpful
  4. Benjamin Franzke updated the commit message in patch set 2 V +1 08/25/23, 06:16

    Fix typo
  5. Benjamin Franzke commented on patch set 2 08/25/23, 06:16

    Reply

    Done
  6. Andreas Kienast voted on patch set 2 V +1 CR +1 08/25/23, 06:17

  7. core-ci voted on patch set 2 V +1 08/25/23, 06:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45820

  8. Christian Kuhn voted on patch set 2 V +1 08/28/23, 08:58

  9. Benjamin Kott commented on patch set 2 CR -1 08/29/23, 08:14

    1. form element is not removed completely 2. when validators are existing but not available anymore for selection the "label" is missing and the user has no idea what the entries are for
  10. Benjamin Franzke uploaded patch set 3 CR +1 V +1 09/06/23, 08:06

  11. Benjamin Franzke commented on patch set 3 09/06/23, 08:06

    Reply

    Thanks, good point! We can not remove .form-editor, as the helper API doesn't allow that. But I've adapted to remove the contents. I've adapted the code to show a non <label> element (<label> had to be removed as it's invalid to output a label without an associated input/select field) for the validators (when they exist) when the select element is removed.
  12. core-ci voted on patch set 3 V +1 09/06/23, 08:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46269

  13. Benjamin Kott voted on patch set 3 V +1 CR +1 09/06/23, 08:24

  14. Benni Mack voted on patch set 3 V +1 CR +1 09/07/23, 05:37

  15. Benjamin Franzke voted on patch set 3 V +2 CR +2 09/07/23, 05:39

  16. Benjamin Franzke merged patch set 4 09/07/23, 05:39