73112[TASK] Add and use includeJavaScriptModules in <f:be.pageRenderer>
Commit message
Review
-
Code review CR +2 Done
- Andreas Kienast +2
- Christian Kuhn +1
-
Verified V +2 Done
- Andreas Kienast +2
- Christian Kuhn +1
- core-ci +1 CI
Issues 2
Files 37
- typo3/sysext/backend/Resources/Private/Templates/ModuleTemplate/Collapse.html+2 −2
- typo3/sysext/backend/Resources/Private/Templates/ModuleTemplate/Tabs.html+2 −2
- typo3/sysext/backend/Resources/Private/Templates/Page/NewPages.html+3 −3
- typo3/sysext/backend/Resources/Private/Templates/Page/SortSubPages.html+4 −4
- typo3/sysext/backend/Resources/Private/Templates/SiteConfiguration/Edit.html+4 −4
- typo3/sysext/backend/Resources/Private/Templates/SiteConfiguration/Overview.html+3 −3
- typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/ClearCacheToolbarItem.html+2 −2
- typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/ClearCacheToolbarItemSingle.html+2 −2
- typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/LiveSearchToolbarItem.html+2 −2
- typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/ShortcutToolbarItemItem.html+2 −2
- typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/SystemInformationToolbarItem.html+2 −2
- typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/UserToolbarItemDropDown.html+2 −2
- typo3/sysext/beuser/Resources/Private/Templates/Permission/Index.html+3 −3
- typo3/sysext/core/Documentation/Changelog/12.0/Feature-96510-InfrastructureForJavaScriptModulesAndImportmaps.rst+15 −2
- typo3/sysext/core/Resources/Private/Templates/Authentication/MfaProvider/Totp/Setup.html+1 −1
- typo3/sysext/extensionmanager/Resources/Private/Layouts/Main.html+1 −1
- typo3/sysext/fluid/Classes/ViewHelpers/Be/PageRendererViewHelper.php+9 −1
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/PageRendererViewHelperTest.php+1 −1
- typo3/sysext/impexp/Resources/Private/Templates/Export.html+4 −4
- typo3/sysext/impexp/Resources/Private/Templates/Import.html+4 −4
Show 17 more files
- typo3/sysext/info/Resources/Private/Templates/Main.html+3 −3
- typo3/sysext/install/Resources/Private/Templates/BackendModule/BackendUserConfirmation.html+1 −1
- typo3/sysext/linkvalidator/Resources/Private/Templates/Backend/CheckLinks.html+1 −1
- typo3/sysext/linkvalidator/Resources/Private/Templates/Backend/Report.html+1 −1
- typo3/sysext/lowlevel/Resources/Private/Templates/Configuration.html+2 −2
- typo3/sysext/lowlevel/Resources/Private/Templates/CustomSearch.html+2 −2
- typo3/sysext/lowlevel/Resources/Private/Templates/ReferenceIndex.html+2 −2
- typo3/sysext/opendocs/Resources/Private/Templates/ToolbarItems/DropDown.html+2 −2
- typo3/sysext/redirects/Resources/Private/Templates/Management/Overview.html+3 −3
- typo3/sysext/scheduler/Resources/Private/Templates/AddTaskForm.html+3 −3
- typo3/sysext/scheduler/Resources/Private/Templates/EditTaskForm.html+3 −3
- typo3/sysext/scheduler/Resources/Private/Templates/ListTasks.html+5 −5
- typo3/sysext/tstemplate/Resources/Private/Templates/ConstantEditor.html+1 −1
- typo3/sysext/tstemplate/Resources/Private/Templates/InformationModule.html+1 −1
- typo3/sysext/tstemplate/Resources/Private/Templates/TemplateObjectBrowserModuleFunction.html+1 −1
- typo3/sysext/viewpage/Resources/Private/Templates/Show.html+2 −2
- typo3/sysext/workspaces/Resources/Private/Templates/ToolbarItems/ToolbarItem.html+2 −2
Review log 78
-
Benjamin Franzke uploaded patch set 1 01/21/22, 10:32
-
Benjamin Franzke wrote 01/21/22, 10:32
Topic set to esm -
core-ci voted on patch set 1 V +1 01/21/22, 10:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22344
-
Christian Kuhn voted on patch set 1 V +1 CR +1 01/21/22, 12:04
-
Andreas Kienast voted on patch set 1 V +2 CR +2 01/21/22, 12:28
-
Andreas Kienast merged patch set 2 01/21/22, 12:28
-
Benni Mack commented on patch set 2 01/21/22, 12:29
not a huge fan here... I'd rather use a <f:script> VH (or <f:asset.script>) to use this in the future? So we could have multiple of them, and use AssetRenderer and not PageRenderer directly. -
Benjamin Franzke commented on patch set 2 01/21/22, 13:50
Reply
yea, I'm not a huge fan of using viewhelpers that access global state-objects, but that's of course applies to both, AssetRenderer and PageRenderer. I think olly was right in not making JavaScriptRenderer a global object (was easy because PageRenderer is the global object that holds JavaScriptRenderer). But yea, it would be better to use AssetRenderer instead of PageRenderer. To be fair: I didn't have a deep look into AssetRenderer yet and how to integrate the modules there, mainly because I didn't need it, because the browsers would (per ECMAScript) specification never execute a module twice. (Thats very different between classical scripts and module scripts) But still, I think it's better if we emit one module only once, not multiple times. I actually think, currently the "cleanest" way would be to add the modules via ModuleTemplate (and that uses whatever is wants underneath) – because ModuleTemplate is an object, so it's fine to add data there. I know Christian added a lot of these viewHelper invocations with the recent patches, but maybe we can revisit that at some point.