[FEATURE] Introduce AssetCollector
AssetCollector is a concept to allow custom CSS/JS code, inline or external, to be added multiple times in e.g. a Fluid template (via <f:script> or <f:css> ViewHelpers) and only be added once. It considers best practices by having a "priority" flag to be either be moved in the <head> area (for CSS useful in above-the-fold concepts) or at the bottom of the <body> tag contents. AssetCollector helps to work with content elements as components, reducing effectively the amount of CSS to be loaded and also incorporates the HTTP/2 power where it is not relevant to have all files compressed and concatenated in one file (although this could be added later-on). AssetCollector is implemented as singleton and should slowly replace the various existing options in TypoScript which seem to be confusing. AssetCollector also collects information about "imagesOnPage" effectively taking off pressure from PageRenderer and TSFE to store common data in FE - as this is now handled in AssetCollector, which can be used in cached and non-cached components. Resolves: #90522 Releases: master Change-Id: I6ce8141ad8891a7a8ee6d4f8a7377d93a894c3b8 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63327 Tested-by:Daniel Goerz <daniel.goerz@posteo.de> Tested-by:
Georg Ringer <georg.ringer@gmail.com> Tested-by:
TYPO3com <noreply@typo3.com> Tested-by:
Kevin Appelt <kevin.appelt@icloud.com> Tested-by:
Daniel Gohlke <daniel.gohlke@extco.de> Tested-by:
Susanne Moog <look@susi.dev> Reviewed-by:
Daniel Goerz <daniel.goerz@posteo.de> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com> Reviewed-by:
Kevin Appelt <kevin.appelt@icloud.com> Reviewed-by:
Daniel Gohlke <daniel.gohlke@extco.de> Reviewed-by:
Susanne Moog <look@susi.dev>
Showing
- typo3/sysext/adminpanel/Classes/Modules/Info/GeneralInformation.php 11 additions, 11 deletions...xt/adminpanel/Classes/Modules/Info/GeneralInformation.php
- typo3/sysext/core/Classes/Page/AssetCollector.php 186 additions, 0 deletionstypo3/sysext/core/Classes/Page/AssetCollector.php
- typo3/sysext/core/Classes/Page/AssetRenderer.php 93 additions, 0 deletionstypo3/sysext/core/Classes/Page/AssetRenderer.php
- typo3/sysext/core/Classes/Page/PageRenderer.php 11 additions, 0 deletionstypo3/sysext/core/Classes/Page/PageRenderer.php
- typo3/sysext/core/Documentation/Changelog/master/Deprecation-90522-TSFEPropertiesRegardingImages.rst 35 additions, 0 deletions...aster/Deprecation-90522-TSFEPropertiesRegardingImages.rst
- typo3/sysext/core/Documentation/Changelog/master/Feature-90522-IntroduceAssetCollector.rst 80 additions, 0 deletions...hangelog/master/Feature-90522-IntroduceAssetCollector.rst
- typo3/sysext/core/Tests/Unit/Page/AssetCollectorTest.php 158 additions, 0 deletionstypo3/sysext/core/Tests/Unit/Page/AssetCollectorTest.php
- typo3/sysext/core/Tests/Unit/Page/AssetDataProvider.php 403 additions, 0 deletionstypo3/sysext/core/Tests/Unit/Page/AssetDataProvider.php
- typo3/sysext/core/Tests/Unit/Page/AssetRendererTest.php 92 additions, 0 deletionstypo3/sysext/core/Tests/Unit/Page/AssetRendererTest.php
- typo3/sysext/extbase/Classes/Service/ImageService.php 9 additions, 3 deletionstypo3/sysext/extbase/Classes/Service/ImageService.php
- typo3/sysext/extbase/Tests/Unit/Service/ImageScriptServiceTest.php 4 additions, 1 deletion...ext/extbase/Tests/Unit/Service/ImageScriptServiceTest.php
- typo3/sysext/fluid/Classes/ViewHelpers/Asset/CssViewHelper.php 101 additions, 0 deletions.../sysext/fluid/Classes/ViewHelpers/Asset/CssViewHelper.php
- typo3/sysext/fluid/Classes/ViewHelpers/Asset/ScriptViewHelper.php 97 additions, 0 deletions...sext/fluid/Classes/ViewHelpers/Asset/ScriptViewHelper.php
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php 5 additions, 0 deletions.../frontend/Classes/ContentObject/ContentObjectRenderer.php
- typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php 17 additions, 2 deletions...ntend/Classes/Controller/TypoScriptFrontendController.php
Please register or sign in to comment