Review 13.4 Merged

87480[BUGFIX] Make `GridEditor.writeConfig` update content area as intended

Andreas Kienast CR +2 V +2 Normal +59 −61 updated 12/13/24, 14:23

Commit message

This fixes `GridEditor.writeConfig` to update the content area as
intended.

Before the code used an `undefined` property:
`codemirror.editorView.viewState.state.doc.length`

Correct is:
`codemirror.editorView.state.doc.length`

As a separate change made "t3-editor" part of the backend, the function
`CodeMirrorElement.setContent` is used, instead of fixing the issue.
Thereby the code is de-duplicated.

As LitElement `Ref`-objects are in use, first there is a check for
instantiation of the `Ref.value` to see if the actual object is
ready-to-use.

This also implements proper type-hints:

```
const codemirror: CodeMirrorElement | undefined = this.codeMirrorRef.value;
```

Instead of:

```
const codemirror: any = this.codeMirrorRef.value!;
```

Also this fixes web-test-runner import-map to correctly resolve scripts
in `backend/Resources/Public/JavaScript/Contrib`.

Review

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

Issues 2

Files 3

Review log 34

  1. Andreas Kienast uploaded patch set 1 12/13/24, 14:02

  2. core-ci voted on patch set 1 V +1 12/13/24, 14:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71068

  3. Benni Mack voted on patch set 1 CR +2 V +2 12/13/24, 14:23

  4. Benni Mack merged patch set 2 12/13/24, 14:23