Review main Merged

86663[TASK] Transform FormEngineValidation into a TypeScript class

Ayke Halder CR +2 V +2 Normal +59 −68 updated 10/31/24, 09:17

Commit message

This introduces complete types for all methods provided by
`FormEngineValidation` and thereby enables working type-checks
and auto-completion.

The one necessary change caused by a wrong return-type-usage is fixed
in a related change.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
    • Garvin Hicking +1
    • Oliver Hader +1
    • Ayke Halder +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Garvin Hicking +1
    • Ayke Halder +1
    • core-ci +1 CI

Issues 2

Files 4

Review log 1925

  1. Ayke Halder uploaded patch set 1 10/19/24, 21:32

  2. core-ci voted on patch set 1 V +1 10/19/24, 21:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68238

  3. Ayke Halder rebased onto patch set 2 V +1 10/20/24, 12:58

  4. core-ci voted on patch set 2 V +1 10/20/24, 13:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68260

  5. Benjamin Franzke uploaded patch set 3 V +1 10/30/24, 08:34

  6. core-ci voted on patch set 3 V +1 10/30/24, 08:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68827

  7. Benjamin Franzke updated the commit message in patch set 4 V +1 10/30/24, 08:49

  8. core-ci voted on patch set 4 V +1 10/30/24, 08:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68829

  9. Ayke Halder commented on patch set 4 10/30/24, 09:08

    form-engine-validation.ts:40

    Are these variables completely public? But I also see the point, that if they become properties of the class, it can not be static anymore. Any idea how to solve this easily? Or should this be solved in a separate change?
  10. Andreas Kienast commented on patch set 4 10/30/24, 11:38

    form-engine-validation.ts:40 Reply

    `@typo3/backend/form-engine-validation` is loaded as an ECMAscript module, therefore such variables are local in the module's scope.
  11. Ayke Halder uploaded patch set 5 V +1 10/30/24, 13:17

  12. Ayke Halder commented on patch set 5 10/30/24, 13:20

    Rebase and ` ./Build/Scripts/runTests.sh -s buildJavascript`

    form-engine-validation.ts:40 Reply

    Nice to know! Acknowledged.
  13. core-ci voted on patch set 5 V +1 10/30/24, 13:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68853

  14. Andreas Kienast voted on patch set 5 CR +1 V +1 10/30/24, 14:39

  15. Ayke Halder commented on patch set 5 CR +1 V +1 10/30/24, 15:54

    I vote on this as code-changes are made by @ben@bnf.dev
  16. Ayke Halder commented on patch set 5 10/30/24, 16:28

    form-engine-validation.ts:48

    Can this be combined with the default-export from below `export default FormEngineValidation;` and become: `export default class FormEngineValidation {…}` ---- Or export both: `export class FormEngineValidation {…}` `export default FormEngineValidation;` Which enables both: `import FormEngineValidation from '@typo3/backend/form-engine-validation';` `import { PostValidationEvent, FormEngineValidation } from '@typo3/backend/form-engine-validation';` As Without `export class FormEngineValidation {…}` an import might look like: `import { PostValidationEvent, default as FormEngineValidation } from '@typo3/backend/form-engine-validation';` ---- Any opinions on this?
  17. Andreas Kienast commented on patch set 5 CR -1 10/31/24, 07:10

    form-engine-validation.ts:48 Reply

    Valid point, I'll check it out.
  18. Andreas Kienast uploaded patch set 6 CR +1 V +1 10/31/24, 07:11

  19. Andreas Kienast commented on patch set 6 CR +1 V +1 10/31/24, 07:11

    form-engine-validation.ts:48 Reply

    Done
  20. core-ci voted on patch set 6 V +1 10/31/24, 07:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68893

  21. Garvin Hicking voted on patch set 6 CR +1 V +1 10/31/24, 08:16

  22. Andreas Kienast voted on patch set 6 CR +2 V +2 10/31/24, 08:16

  23. Ayke Halder voted on patch set 6 CR +1 V +1 10/31/24, 09:00

  24. Andreas Kienast merged patch set 7 10/31/24, 09:12

  25. Oliver Hader voted on patch set 7 CR +1 10/31/24, 09:17