Review main Merged

73145[TASK] Tag importmaps to include configuration for dynamic imports

Benjamin Franzke CR +2 V +2 Normal +138 −27 updated 02/13/22, 10:47

Commit message

Dynamic JavaScript imports require their respective importmap
configurations to be loaded, therefore it is now allowed to tag
import configurations in order to be loaded when a certain
dispatcher is added to the current response.

This patch adds tags for the currently used dynamic imports.
The tags are added via includeTaggedImports and
might be side-loaded via the ResolveJavaScriptImportEvent.

Notes:

* In the pageRenderer->loadRequireJsModule we currently
  transparently load all configurations in backend context, but
  once we switch all these calls to loadJavaScriptModule(),
  we need to be very explicit about all the required
  importmaps. This patch prepares for that.

* The EventDispatcher is an optional dependency for the ImportMap class
  as the events and tags are not required in the InstallTool importmap.

Review

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

Issues 2

Files 10

Review log 1828

Show 13 earlier messages
  1. Benjamin Franzke uploaded patch set 1 01/25/22, 05:19

  2. core-ci voted on patch set 1 V -1 01/25/22, 05:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22497

  3. core-ci commented on patch set 1 01/25/22, 08:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22497

  1. Benjamin Franzke uploaded patch set 2 01/25/22, 08:37

  2. core-ci voted on patch set 2 V +1 01/25/22, 08:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22503

  3. Benjamin Franzke uploaded patch set 3 01/31/22, 13:38

  4. core-ci voted on patch set 3 V +1 01/31/22, 13:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22802

  5. Benjamin Franzke uploaded patch set 4 01/31/22, 13:56

  6. Benjamin Franzke uploaded patch set 5 01/31/22, 14:06

  7. core-ci voted on patch set 4 V +1 01/31/22, 14:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22807

  8. core-ci voted on patch set 5 V +1 01/31/22, 14:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22811

  9. Benjamin Franzke rebased onto patch set 6 02/01/22, 13:55

  10. core-ci voted on patch set 6 V +1 02/01/22, 14:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22877

  11. Benni Mack updated the commit message in patch set 7 02/07/22, 16:00

  12. core-ci voted on patch set 7 V +1 02/07/22, 16:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23150

  13. Benjamin Franzke uploaded patch set 8 02/08/22, 06:03

  14. core-ci voted on patch set 8 V +1 02/08/22, 06:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23185

  15. Benni Mack voted on patch set 8 V +1 CR +1 02/08/22, 06:24

  16. Christian Kuhn commented on patch set 8 02/10/22, 06:16

    ImportMap.php:45

    why is this nullable? isn't the event dispatcher always resolved?
  17. Benjamin Franzke commented on patch set 8 02/10/22, 12:40

    ImportMap.php:45 Reply

    The importmap is used in installtool without caches and without eventdispatcher (not needed): https://github.com/TYPO3/typo3/blob/main/typo3/sysext/install/Classes/Controller/LayoutController.php#L77 Therefore nullable is allowed here. In regular DI context it is actually always resolved due to the ImportMapFactory.
  18. Christian Kuhn commented on patch set 8 02/10/22, 14:41

    ImportMap.php:45 Reply

    Ack. Thx! maybe add a comment on this? that situation with the install tool was not obvious to me.
  19. Benjamin Franzke uploaded patch set 9 02/11/22, 14:33

  20. Benjamin Franzke commented on patch set 9 02/11/22, 14:33

    ImportMap.php:45 Reply

    Done.
  21. core-ci voted on patch set 9 V +1 02/11/22, 14:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23399

  22. Christian Kuhn voted on patch set 9 V +1 CR +1 02/11/22, 15:41

  23. Benni Mack voted on patch set 9 V +1 CR +1 02/12/22, 17:11

  24. Benjamin Franzke voted on patch set 9 V +2 CR +2 02/13/22, 10:47

  25. Benjamin Franzke merged patch set 10 02/13/22, 10:47