73260[FEATURE] Introduce unified and flexible templating for TYPO3 Backend
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Benni Mack +2
- Oli Bartsch +1
- Stefan Bürk +1
-
Verified V +2 Done
- Christian Kuhn +2
- Benni Mack +2
- Oli Bartsch +1
- Stefan Bürk +1
- core-ci +1 CI
Issues 1
Files 13
- Build/phpstan/phpstan-baseline.neon5+5 −10
- typo3/sysext/backend/Classes/Template/ModuleTemplate.php5+212 −308
- typo3/sysext/backend/Classes/Template/ModuleTemplateFactory.php+16 −7
- typo3/sysext/backend/Classes/View/BackendViewFactory.php10new+97 −0
- typo3/sysext/backend/Configuration/Services.yaml+2 −3
- typo3/sysext/backend/Resources/Private/Layouts/Module.htmlnew+33 −0
- typo3/sysext/backend/Resources/Private/Templates/ModuleTemplate/Module.html4+12 −1
- typo3/sysext/core/Classes/View/FluidViewAdapter.php2new+49 −0
- typo3/sysext/core/Classes/View/ResponsableViewInterface.phpnew+31 −0
- typo3/sysext/core/Classes/View/ViewInterface.php2new+41 −0
- typo3/sysext/core/Documentation/Changelog/12.0/Feature-96730-SimplifiedExtbackendModuleTemplateAPI.rst6new+58 −0
- typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php+3 −2
- typo3/sysext/fluid/Classes/Core/Rendering/RenderingContextFactory.php+15 −2
Review log 3342
Show 1317 earlier messages
-
Christian Kuhn uploaded patch set 1 02/02/22, 13:35
-
core-ci voted on patch set 1 V +1 02/02/22, 13:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22905
-
Oliver Klee commented on patch set 1 02/02/22, 13:47
-
Christian Kuhn updated the commit message in patch set 2 02/02/22, 14:08
-
Christian Kuhn commented on patch set 2 02/02/22, 14:10
phpstan-baseline.neon:2214ReplyWe have that in many more places already. Can no be resolved, needs a change in Typo3Fluid ... That issue is on my radar and I'll try to come up with something for Typo3Fluid later (probably an optional interface) to get rid of that later. -
Christian Kuhn commented on patch set 2 02/02/22, 14:13
phpstan-baseline.neon:2214ReplyPoint is: the TemplateView of fluid *is* template aware on render(), but the main Typo3Fluid interface does not reflect this ... to solve this, we'll add another interface in Typo3Fluid, most likely. When that is in place, we can adapt our usages. I also do NOT want to type hint TemplateView here, but ViewInterface. -
core-ci voted on patch set 2 V +1 02/02/22, 14:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22907
-
Oliver Klee wrote 02/02/22, 15:08
Removed cc Oliver Klee. -
Stefan Bürk updated the commit message in patch set 3 02/02/22, 18:30
-
core-ci voted on patch set 3 V +1 02/02/22, 18:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22916
-
Stefan Bürk commented on patch set 3 02/02/22, 19:37
phpstan-baseline.neon:2214ReplyFixing this in Typo3Fluid would be the better way instead of glutter core with possible superflous typehints to mitigate this. Fully following lolli's explanation and strategy on that point. I'm fine with this.BackendViewFactory.php:81Not sure - but before narrowing down template overrides to composer package name construct only, shouldn't we have the pre-requisit in core to enforce all extensions *must* have an composer.json ? https://review.typo3.org/c/Packages/TYPO3.CMS/+/73192 -
Oli Bartsch commented on patch set 3 02/02/22, 22:19
ModuleTemplate.php:116Same question as for the ViewInterface. Why do we duplicate the return type in the method name?ModuleTemplate.php:144While the module is rendered and assigned to the stream, the method still returns the Response object. Therefore, we should IMO just stick to the "createResponse" naming.BackendViewFactory.php:45Why do we allow null here? Will there be any use case where the factory is called, while having no Request available?BackendViewFactory.php:70Possible null pointer here.BackendViewFactory.php:72I currently don't fully get how the TSconfig might look like. Could we get some example here? Also I don't see the possibility to just override single paths, e.g. templateRootPaths. As soon as I configure this, Template, Layout and Partial paths are added even if they do not exist, right?BackendViewFactory.php:76This might lead to an undefined array key warning in case $override does not contain ":".FluidViewAdapter.php:34What's the benefit of this annotation?ViewInterface.php:40Why do we duplicate the return type in the method name?Feature-96730-SimplifiedExtbackendModuleTemplateAPI.rst:36Actually this method does not exist, $moduleTemplate->renderContent() is currently called in those controllers. -
Christian Kuhn commented on patch set 3 02/03/22, 09:03
phpstan-baseline.neon:2214Replykk, so let's adapt Typo3Fluid here.ModuleTemplate.php:116Replynaming things hard ;) renderString() and renderResponse() match well. your suggestion is render() (which is more-in-line with current fluid, too), plus createResponse() ...ModuleTemplate.php:144Replywell. the emphasis is now on 'render': the view is rendered and a response is created from it. your suggestion is to put the emphasis on 'create'. unsure.BackendViewFactory.php:45ReplyRequest is optional in view. It is no hard requirement to add this, it is allowed to not add a request. RenderingContext can deal with setRequest(null). For this backend context. Well yeah, it might be easier to simply enforce Request here.BackendViewFactory.php:70Replywill be changed by making request non-optional.BackendViewFactory.php:72ReplyMy wip has an example, usage will be documented in a .rst with the next patch: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73180/20/typo3/sysext/seo/Configuration/page.tsconfig And yes, all 3 parts are configured to be overriden: This does not hurt and is more convenient in the usage.BackendViewFactory.php:76Replytrue. will adapt.BackendViewFactory.php:81Replyyes / no: A patch to enforce composer.json in pending by Benni already. With current state it's simply that you can't have overrides for a package that does not have composer.json.FluidViewAdapter.php:34Replydon't know. we're using that in various places. can drop it.ViewInterface.php:40Replythat's a bit matter of taste: It fits better to the pair method renderResponse().Feature-96730-SimplifiedExtbackendModuleTemplateAPI.rst:36Replytrue. will adapt. -
Christian Kuhn uploaded patch set 4 02/03/22, 09:21
-
Christian Kuhn commented on patch set 4 02/03/22, 09:21
ModuleTemplate.php:144Replychanged renderString() to render() and renderResponse() to createResponse() now. -
core-ci voted on patch set 4 V +1 02/03/22, 09:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22937
-
Stefan Bürk voted on patch set 4 V +1 CR +1 02/03/22, 11:49
-
Christian Kuhn voted on patch set 4 CR -1 02/03/22, 12:17
-
Christian Kuhn uploaded patch set 5 02/03/22, 12:58
-
Christian Kuhn uploaded patch set 6 02/03/22, 13:00
-
core-ci voted on patch set 5 V +1 02/03/22, 13:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22947
-
core-ci voted on patch set 6 V +1 02/03/22, 13:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22948
-
Benni Mack updated the commit message in patch set 7 02/03/22, 14:16
-
Benni Mack voted on patch set 7 V +1 CR +1 02/03/22, 14:16
-
Benni Mack updated the commit message in patch set 8 02/03/22, 14:17
-
Christian Kuhn voted on patch set 8 V +1 CR +1 02/03/22, 14:18
-
Stefan Bürk voted on patch set 8 V +1 CR +1 02/03/22, 14:30
-
Benjamin Franzke commented on patch set 8 CR -1 02/03/22, 14:32
Module.html:17bootstrap, ContextHelp, GlobalEventHandler, ActionDispatcher and ImmediateActionElement are not related to any HTML in this file (only DocumentHeader as far as I see) These "global" javascript modules should therefore rather be kept in the ModuleTemplate. Would also make the removal of the "($this->getBackendUserAuthentication() && !empty($this->getBackendUserAuthentication()->user)" more obvious for reviewers. -
core-ci voted on patch set 7 V +1 02/03/22, 14:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22950
-
Benjamin Franzke commented on patch set 8 02/03/22, 14:38
Feature-96730-SimplifiedExtbackendModuleTemplateAPI.rst:42packageName attribute missing -
Benjamin Franzke commented on patch set 8 02/03/22, 14:43
Module.html:7Is there a reason why the legacy module template doesn't use the new Layout? -
Benjamin Franzke commented on patch set 8 02/03/22, 14:46
Feature-96730-SimplifiedExtbackendModuleTemplateAPI.rst:18I didn't get what this sentence is saying. I'm not a language expert, but maybe: The default document header of :php:`ModuleTemplate` can be rendered using a new fluid layout named `Module`. -
Christian Kuhn uploaded patch set 9 02/03/22, 15:11
-
Christian Kuhn commented on patch set 9 V +2 CR +2 02/03/22, 15:11
Module.html:7Replyyes. the old one is a template, the new one is a layout. we *could* merge that, but it's more dirty and needs special treatment. i thus decided to duplicate the template.Module.html:17Replyi don't agree on that, but i'll put it back into moduleTemplate to get this patch merged and to not discuss this implementation detail now.Feature-96730-SimplifiedExtbackendModuleTemplateAPI.rst:18Replythat's better. thx.Feature-96730-SimplifiedExtbackendModuleTemplateAPI.rst:42Replyi left that out by intention since it will be obsoleted with one of the next patches. i also didn't wanted to elaborate on soon-obsolete stuff. i'll now put it in there again, we then have to remember to adapt it again. -
core-ci voted on patch set 9 V +1 02/03/22, 15:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22954
-
core-ci voted on patch set 8 V +1 02/03/22, 15:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22951
-
Christian Kuhn voted on patch set 9 V +1 CR +1 02/03/22, 15:29
-
Oli Bartsch voted on patch set 9 V +1 CR +1 02/03/22, 15:55
-
Stefan Bürk voted on patch set 9 V +1 CR +1 02/03/22, 16:08
-
Benni Mack voted on patch set 9 V +2 CR +2 02/03/22, 16:30
-
Christian Kuhn voted on patch set 9 V +2 CR +2 02/03/22, 16:31
-
Christian Kuhn merged patch set 10 02/03/22, 16:35
phpstan-baseline.neon:2214