Review main Merged

77317[BUGFIX] Provide tag to add JavaScript Modules to importmap in Backend Form

Benjamin Kott CR +2 V +2 Normal +57 −0 updated 01/10/23, 15:18

Commit message

The JavaScript module import map is static and only generated and
loaded in the first request to a document. All possible future
modules requested in later Ajax calls need to be registered already
in the first initial request.

We are adding a new tag 'backend.form' that is used to identify
JavaScript modules that can be used within the backend forms. This
will ensure that the import maps are available for these modules even
if the element is not displayed directly.

A typical use case for this is an InlineRelationRecord where the
CKEditor is not part of the main record but needs to be loaded for the
child record.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Benjamin Franzke +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Benjamin Franzke +1
    • Rico Drexler +1
    • Jan Delius +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 1113

  1. Benjamin Kott uploaded patch set 1 01/10/23, 12:36

  2. Oliver Hader commented on patch set 1 01/10/23, 12:39

    JavaScriptModules.php:8

    In general I think, this is a good solution to make this loading/initialization explicit. What about using a different name like `backend.importmaps` or similar?
  3. core-ci voted on patch set 1 V +1 01/10/23, 12:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35645

  4. Oliver Hader commented on patch set 1 01/10/23, 12:45

    JavaScriptModules.php:8 Reply

    Since `backend.form` relates to `TYPO3\CMS\Backend\Form` it should be fine.
  5. Benjamin Kott uploaded patch set 2 V +1 01/10/23, 13:46

  6. Benjamin Kott commented on patch set 2 01/10/23, 13:48

    JavaScriptModules.php:8 Reply

    Done
  7. Benjamin Kott commented on patch set 2 01/10/23, 13:50

    would be nice if @BenjaminFranzke would also review the patch.
  8. core-ci voted on patch set 2 V +1 01/10/23, 13:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35648

  9. Jan Delius voted on patch set 2 V +1 01/10/23, 13:55

  10. Rico Drexler voted on patch set 2 V +1 01/10/23, 14:14

  11. Benjamin Franzke commented on patch set 2 V +1 CR +1 01/10/23, 14:54

    Yup, we do need that tag. Looks good!
  12. Georg Ringer voted on patch set 2 V +2 CR +2 01/10/23, 15:18

  13. Georg Ringer merged patch set 3 01/10/23, 15:18