Review main Merged

80831[TASK] Cleanup form element reference in FormEngine module

Andreas Kienast CR +2 V +2 Normal +38 −14 updated 09/06/23, 11:09

Commit message

The TypeScript part of the FormEngine got the form element in a weird
way all over again. To make the code a little bit cleaner, the form
element is now accessed using a `FormEngine` getter property
in order to ensure types are properly infered.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 810

  1. Andreas Kienast uploaded patch set 1 09/04/23, 11:49

  2. core-ci voted on patch set 1 V +1 09/04/23, 11:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46188

  3. Stefan Bürk voted on patch set 1 V +1 CR +1 09/05/23, 09:08

  4. Benjamin Franzke commented on patch set 1 CR -1 09/05/23, 19:13

    form-engine.ts:124

    I think this is racy, as the `<form>` element might not be loaded at this point. Maybe we should use some Object.defineProperty `get:` stuff for now?
  5. Benjamin Franzke uploaded patch set 2 CR +1 V +1 09/05/23, 19:57

  6. Benjamin Franzke commented on patch set 2 09/05/23, 19:57

    Thanks, fine for me in general. Do you have a plan to replace `$('form[name=' + FormEngine.formName + ']')` constructs as well? They could all be replaced with `$(FormEngine.formElement)` (or jquery even be removed). What do you think? main-only?

    form-engine.ts:124 Reply

    Done
  7. core-ci voted on patch set 2 V +1 09/05/23, 20:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46255

  8. Stefan Bürk voted on patch set 2 V +1 CR +1 09/06/23, 09:25

  9. Benjamin Franzke voted on patch set 2 V +2 CR +2 09/06/23, 10:57

  10. Benjamin Franzke merged patch set 3 09/06/23, 11:09