Review 14.3 Merged

97845[TASK] Make the form editor null-safe

Benjamin Kott CR +2 V +2 Normal +90 −83 updated 11/19/26, 14:13

Commit message

Sixth step towards strictNullChecks. Only the backend extension is
left after this one.

The form editor barely touches the DOM directly, so almost none of its
errors were element lookups. They come from three other places.

Its modules keep their state in file-level singletons that a bootstrap
call assigns - the editor application, the configuration, the view
model, the stage element. Every module already exposes an accessor for
them, so the assumption that bootstrapping has happened is now stated
there once instead of at every read.

The application state stack hands out `undefined` for every key,
although each entry is seeded when a state is pushed. Reads state that
at the point they ask for it.

Most of the rest are optional properties of the editor configuration
that only the renderer selected for exactly that template ever reads:
the configuration options of an editor, its select options, its view
ports, the property collections of an element definition.

Several signatures were plainly wrong rather than optimistic and are
corrected instead. `createFormElement`, `buildPropertyPath`,
`renderAbstractStageArea`, `createAndAddAbstractViewFormElementToolbar`
and `addValidatorIdentifiersToFormElementProperty` all handle a missing
argument with `isUndefinedOrNull` in their first lines, yet declared
those parameters as required, and every caller had to pass `undefined`
into a type that did not admit it.

The non-null assertions this step relies on are added with
strictNullChecks itself, as no-unnecessary-type-assertion reports
every such assertion until the option is enabled.

Review

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

Issues 2

Files 28

Show 8 more files

Review log 57

  1. Benjamin Kott commented on patch set 1 11/19/26, 13:56

    Cherry Picked from branch main. The following files contain Git conflicts: * Build/Sources/TypeScript/form/backend/form-editor/view-model.ts * typo3/sysext/form/Resources/Public/JavaScript/backend/form-editor/core.js * typo3/sysext/form/Resources/Public/JavaScript/backend/form-editor/inspector-component.js * typo3/sysext/form/Resources/Public/JavaScript/backend/form-editor/stage-component.js * typo3/sysext/form/Resources/Public/JavaScript/backend/form-editor/view-model.js * typo3/sysext/form/Resources/Public/JavaScript/backend/form-wizard/finisher/create-form-submission-service.js * typo3/sysext/form/Resources/Public/JavaScript/backend/form-wizard/steps/settings-step.js
  2. Benjamin Kott uploaded patch set 2 11/19/26, 14:01

  3. core-ci voted on patch set 2 V +1 11/19/26, 14:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115017

  4. core-ci voted on patch set 1 V -1 11/19/26, 14:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115014

  5. Benjamin Kott commented on patch set 2 11/19/26, 14:12

    This change is ready for review.
  6. Benjamin Kott voted on patch set 2 CR +2 V +2 11/19/26, 14:13

  7. Benjamin Kott merged patch set 3 11/19/26, 14:13