Review main Merged

71044[TASK] Reduce inline JavaScript of requireJS in FormEngine

Oliver Hader CR +2 V +2 Hard +586 −200 updated 10/01/21, 23:36

Commit message

To reduce arbitrary inline JavaScript, requireJS callbacks used in
FormEngine are streamlined to be more explicit - allowed instructions
are `load` (module), `invoke` (a method), (create a new) `instance`.

This change is an intermediate preparation for delegating loading,
assignment and invocation directly to JavaScript processes. Relevant
parts have been extracted from corresponding client-side handling in
https://review.typo3.org/c/Packages/TYPO3.CMS/+/64123

The possibility to load and append arbitrary inline JavaScript to
FormEngine segment `requireJsModules` is deprecated. Instructions
need to be declared using new `JavaScriptModuleInstruction`.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Oli Bartsch +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 1

Files 41

Show 21 more files

Review log 3551

Show 1826 earlier messages
  1. Oliver Hader uploaded patch set 1 09/12/21, 14:09

  2. core-ci voted on patch set 1 V -1 09/12/21, 14:21 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16619

  3. Oliver Hader uploaded patch set 2 09/12/21, 14:54

  4. core-ci voted on patch set 2 V -1 09/12/21, 15:05 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16623

  5. Oliver Hader wrote 09/13/21, 16:09

    Topic set to inline-javascript
  6. Oliver Hader updated the commit message in patch set 3 09/13/21, 16:24

  7. core-ci voted on patch set 3 V -1 09/13/21, 16:43 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16663

  8. Oliver Hader uploaded patch set 4 09/14/21, 08:46

  9. core-ci voted on patch set 4 V -1 09/14/21, 09:05 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16688

  10. Oliver Hader uploaded patch set 5 09/14/21, 09:47

  11. Oliver Hader uploaded patch set 6 09/14/21, 09:50

  12. Oliver Hader uploaded patch set 7 09/14/21, 09:53

  13. Oliver Hader uploaded patch set 8 09/14/21, 10:07

  14. core-ci voted on patch set 7 V -1 09/14/21, 10:08 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16695

  15. core-ci voted on patch set 8 V +1 09/14/21, 10:19 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16696

  16. Oliver Hader commented on patch set 8 CR -1 09/20/21, 08:52

    On it...
  17. Oliver Hader voted on patch set 8 CR 0 09/20/21, 08:57

  18. Oliver Hader rebased onto patch set 9 09/24/21, 08:06

  19. Benni Mack commented on patch set 9 CR -1 09/24/21, 08:09

    FormEngineUtility.ts:34

    this is a dependency of EXT:rte_ckeditor for EXT:backend
  20. Oliver Hader commented on patch set 9 09/24/21, 08:13

    FormEngineUtility.ts:34 Reply

    Oh, right... I'll move the new JavaScript initializer to ext:rte_ckeditor
  21. Oliver Hader uploaded patch set 10 09/24/21, 08:31

  22. core-ci voted on patch set 9 V +1 09/24/21, 08:31 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17139

  23. Benni Mack commented on patch set 10 09/24/21, 08:46

    FormEngineUtility.ts:34 Reply

    Ack
  24. core-ci voted on patch set 10 V +1 09/24/21, 08:47 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17141

  25. Benni Mack voted on patch set 10 CR +1 09/24/21, 08:47

  26. Oliver Hader uploaded patch set 11 09/24/21, 16:50

  1. core-ci voted on patch set 11 V +1 09/24/21, 17:07 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17171

  2. Benni Mack rebased onto patch set 12 09/30/21, 14:50

  3. core-ci voted on patch set 12 V +1 09/30/21, 15:20 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17351

  4. Nikita Hovratov uploaded patch set 13 10/01/21, 14:13

  5. core-ci voted on patch set 13 V +1 10/01/21, 14:27 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17440

  6. Nikita Hovratov commented on patch set 13 V -1 10/01/21, 14:30

    RTE in inline is not working anymore. Styleguide > "elements rte" > "in inline"
  7. Oliver Hader commented on patch set 13 10/01/21, 14:57

    Reply

    What exactly is not working anymore?
  8. Nikita Hovratov commented on patch set 13 10/01/21, 15:03

    Reply

    The RTE field is not loaded. Try to open the inline container. There seems to be another (not related) JavaScript bug as well in the console. Will open another ticket for that.
  9. Oliver Hader commented on patch set 13 10/01/21, 15:16

    `AbstractFormEngineAjaxController::createExecutableStringRepresentationOfRegisteredRequireJsModules` is missing... I don't have any idea yet how to solve that...
  10. Oliver Hader uploaded patch set 14 10/01/21, 16:32

  11. Oliver Hader commented on patch set 14 10/01/21, 16:33

    @Nikita, that was a very good catch. I'd be glad if you could test my recent update again and verify it (hopefully) works now. Thanks in advance!
  12. core-ci voted on patch set 14 V -1 10/01/21, 16:48 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17453

  13. Nikita Hovratov uploaded patch set 15 10/01/21, 16:55

  14. Nikita Hovratov commented on patch set 15 V +1 CR +1 10/01/21, 17:04

    Reply

    Thanks! Really like this patch. Looks good for me, everything works now.
  15. core-ci voted on patch set 15 V +1 10/01/21, 17:10 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17455

  16. Benjamin Franzke uploaded patch set 16 10/01/21, 22:55

  17. core-ci voted on patch set 16 V -1 10/01/21, 22:59 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17466

  18. Benjamin Franzke uploaded patch set 17 10/01/21, 23:01

  19. Oli Bartsch uploaded patch set 18 10/01/21, 23:04

  20. Benjamin Franzke uploaded patch set 19 10/01/21, 23:09

  21. Oli Bartsch commented on patch set 19 V +1 CR +1 10/01/21, 23:15

    JavaScriptModuleInstruction.php:22

    Maybe we could add a bit of description for this new class.
  22. core-ci voted on patch set 17 V +1 10/01/21, 23:15 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17467

  23. core-ci voted on patch set 19 V +1 10/01/21, 23:24 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17469

  24. Benjamin Franzke commented on patch set 19 V +2 CR +2 10/01/21, 23:35

    JavaScriptModuleInstruction.php:22 Reply

    Maybe: DTO for a defined set of JavaScript instruction opcodes that can be attached to JavaScript modules. But as you already said via slack, olly can add that afterwards as well.
  25. Benjamin Franzke merged patch set 20 10/01/21, 23:36