67464[FEATURE] Introduce backend module web component router
Commit message
Review
-
Code review CR +2 Done
- Benjamin Franzke +2
- Oli Bartsch +1
- Andreas Kienast +1
-
Verified V +2 Done
- Benjamin Franzke +2
- Oli Bartsch +1
- Andreas Kienast +1
- core-ci +1 CI
Issues 2
Files 24
- Build/Sources/Sass/scaffold/_scaffold.scss+3 −0
- Build/Sources/TypeScript/backend/Resources/Public/TypeScript/Enum/Viewport/ScaffoldIdentifier.ts+1 −0
- Build/Sources/TypeScript/backend/Resources/Public/TypeScript/Module/Iframe.tsnew+122 −0
- Build/Sources/TypeScript/backend/Resources/Public/TypeScript/Module/Router.ts9new+208 −0
- Build/Sources/TypeScript/backend/Resources/Public/TypeScript/Viewport/ContentContainer.ts+14 −11
- Build/Sources/TypeScript/backend/Resources/Public/TypeScript/Module.tsnew+64 −0
- Build/Sources/TypeScript/backend/Resources/Public/TypeScript/ModuleMenu.ts+48 −47
- Build/types/TYPO3/index.d.ts+0 −1
- typo3/sysext/backend/Classes/Controller/BackendController.php+13 −10
- typo3/sysext/backend/Classes/Controller/StateTrackerController.php3new+33 −0
- typo3/sysext/backend/Classes/Domain/Model/Module/BackendModule.php+25 −0
- typo3/sysext/backend/Classes/Domain/Repository/Module/BackendModuleRepository.php+9 −0
- typo3/sysext/backend/Classes/Module/ModuleLoader.php2+6 −0
- typo3/sysext/backend/Configuration/Backend/Routes.php+7 −0
- typo3/sysext/backend/Resources/Private/Templates/Backend/Main.html2+1 −1
- typo3/sysext/backend/Resources/Private/Templates/ModuleMenu/Main.html+1 −0
- typo3/sysext/backend/Resources/Public/Css/backend.css+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/Enum/Viewport/ScaffoldIdentifier.js+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/Module/Iframe.jsnew+23 −0
- typo3/sysext/backend/Resources/Public/JavaScript/Module/Router.jsnew+25 −0
Show 4 more files
- typo3/sysext/backend/Resources/Public/JavaScript/Viewport/ContentContainer.js+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/Module.jsnew+13 −0
- typo3/sysext/backend/Resources/Public/JavaScript/ModuleMenu.js+1 −1
- typo3/sysext/core/Documentation/Changelog/master/Feature-93988-BackendModuleURLsReflectIntoBrowserAdressbar.rstnew+28 −0
Review log 5196
Show 3371 earlier messages
-
Benjamin Franzke uploaded patch set 1 01/19/21, 14:46
-
TYPO3com voted on patch set 1 V -1 01/19/21, 14:56 Completed build in 10m 13s on Tue, 19 Jan, 02:56 PM Test Summary: 79 of 32836 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8915
-
Benjamin Franzke uploaded patch set 2 01/19/21, 15:08
-
TYPO3com voted on patch set 2 V -1 01/19/21, 15:20 Completed build in 12m 10s on Tue, 19 Jan, 03:20 PM Test Summary: 79 of 32836 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8917
-
Benjamin Franzke uploaded patch set 3 01/19/21, 19:00
-
TYPO3com voted on patch set 3 V -1 01/19/21, 19:11 Completed build in 11m 22s on Tue, 19 Jan, 07:11 PM Test Summary: 19 of 32837 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8923
-
Benjamin Franzke uploaded patch set 4 01/23/21, 01:31
-
TYPO3com voted on patch set 4 V -1 01/23/21, 01:40 Completed build in 08m 36s on Sat, 23 Jan, 01:40 AM Test Summary: 9 of 32842 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9014
-
TYPO3com commented on patch set 4 01/23/21, 01:50 Completed build in 27m 16s on Sat, 23 Jan, 01:50 AM Test Summary: 9 of 32842 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9014
-
Benjamin Franzke uploaded patch set 5 01/23/21, 07:43
-
TYPO3com voted on patch set 5 V -1 01/23/21, 07:53 Completed build in 09m 43s on Sat, 23 Jan, 07:53 AM Test Summary: 4 of 32843 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9015
-
TYPO3com voted on patch set 5 V +1 01/23/21, 08:17 Completed build in 43m 21s on Sat, 23 Jan, 08:17 AM Test Summary: 32601 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9015
-
Benjamin Franzke uploaded patch set 6 01/23/21, 12:17
-
TYPO3com voted on patch set 6 V -1 01/23/21, 12:27 Completed build in 10m 13s on Sat, 23 Jan, 12:27 PM Test Summary: 2 of 32842 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9016
-
Benjamin Franzke uploaded patch set 7 01/23/21, 12:52
-
TYPO3com voted on patch set 7 V +1 01/23/21, 13:02 Completed build in 09m 43s on Sat, 23 Jan, 01:02 PM Test Summary: 32601 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9017
-
Oliver Hader commented on patch set 7 01/25/21, 19:45
ModuleRouter.ts:59could we use `instanceof WhateverModuleElement` or is that still "dropped" on the way compiling these modules? -
Benjamin Franzke commented on patch set 7 01/28/21, 15:04
ModuleRouter.ts:27ReplyYea, fine be me. I tried to name according to ModuleMenu. But it's fine for me to structure this into Module/ as well. :+1: (Becuase there might be a `Module/Menu` at some point and `ModuleMenu` is then just a deprecated wrapper.)ModuleRouter.ts:59ReplyYes, technically we could do that, but practically we don't have Custom Elements constructor available: a) because that would be the Element Class would need to be exported as default export b) because the tag name can be checked without having to wait for the module to be lazy loaded -
Benjamin Franzke wrote 02/09/21, 08:50
Topic set to lit -
Benjamin Franzke uploaded patch set 8 03/06/21, 14:46
-
TYPO3com voted on patch set 8 V +1 03/06/21, 14:53 Completed build in 06m 53s on Sat, 6 Mar, 02:53 PM Test Summary: 32745 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9880
-
core-ci voted on patch set 8 V +1 03/06/21, 14:58 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1219
-
Benjamin Franzke uploaded patch set 9 03/07/21, 08:32
-
TYPO3com voted on patch set 9 V -1 03/07/21, 08:32 Completed build in 20s on Sun, 7 Mar, 08:32 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9896
-
core-ci voted on patch set 9 V -1 03/07/21, 08:45 Core CI is not happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1238
-
Benjamin Franzke uploaded patch set 10 03/09/21, 19:24
-
TYPO3com voted on patch set 10 V -1 03/09/21, 19:25 Completed build in 19s on Tue, 9 Mar, 07:24 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9987
-
core-ci voted on patch set 10 V -1 03/09/21, 19:26 Core CI is not happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1342
-
Benjamin Franzke uploaded patch set 11 03/09/21, 19:31
-
TYPO3com voted on patch set 11 V -1 03/09/21, 19:32 Completed build in 22s on Tue, 9 Mar, 07:32 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9990
-
core-ci voted on patch set 11 V +1 03/09/21, 19:47 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1345
-
Benjamin Franzke uploaded patch set 12 04/08/21, 11:51
-
TYPO3com voted on patch set 12 V +1 04/08/21, 11:58 Completed build in 07m 26s on Thu, 8 Apr, 11:58 AM Test Summary: 33267 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10547
-
core-ci voted on patch set 12 V +1 04/08/21, 12:06 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/2107
-
Benjamin Franzke uploaded patch set 13 04/08/21, 12:10
-
Benjamin Franzke commented on patch set 13 04/08/21, 12:11
ModuleRouter.ts:27ReplyDone -
TYPO3com voted on patch set 13 V +1 04/08/21, 12:18 Completed build in 07m 16s on Thu, 8 Apr, 12:18 PM Test Summary: 33267 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10551
-
core-ci voted on patch set 13 V +1 04/08/21, 12:23 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/2112
-
Benjamin Franzke uploaded patch set 14 04/12/21, 16:06
-
TYPO3com voted on patch set 14 V +1 04/12/21, 16:14 Completed build in 07m 39s on Mon, 12 Apr, 04:14 PM Test Summary: 33267 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10619
-
core-ci voted on patch set 14 V +1 04/12/21, 16:22 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/2196
-
Benni Mack uploaded patch set 15 04/12/21, 21:28
-
Benni Mack uploaded patch set 16 04/12/21, 21:30
-
TYPO3com voted on patch set 15 V -1 04/12/21, 21:36 Completed build in 07m 49s on Mon, 12 Apr, 09:36 PM Test Summary: 33267 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10632
-
TYPO3com voted on patch set 16 V +1 04/12/21, 21:37 Completed build in 06m 46s on Mon, 12 Apr, 09:37 PM Test Summary: 33267 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10633
-
core-ci voted on patch set 15 V -1 04/12/21, 21:39 Core CI is not happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/2210
-
core-ci voted on patch set 16 V +1 04/12/21, 21:45 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/2211
-
Benni Mack commented on patch set 16 04/13/21, 11:15
Main.html:22personally, I found the naming confusing. I think it's actually the wrapper for the Content Container, and not just bound to modules (finally). -
Benjamin Franzke uploaded patch set 17 04/17/21, 07:40
Rebase -
TYPO3com voted on patch set 17 V +1 04/17/21, 07:47 Completed build in 07m 07s on Sat, 17 Apr, 07:47 AM Test Summary: 33273 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10703
-
core-ci voted on patch set 17 V +1 04/17/21, 07:54 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/2302
-
Benjamin Franzke uploaded patch set 18 04/19/21, 05:10
-
TYPO3com voted on patch set 18 V +1 04/19/21, 05:18 Completed build in 08m 23s on Mon, 19 Apr, 05:18 AM Test Summary: 33273 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10710
-
core-ci voted on patch set 18 V +1 04/19/21, 05:23 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/2315
-
Oliver Hader commented on patch set 18 04/19/21, 08:39
Router.ts:103So, that's "using the event object as DTO", correct? Since modifying the event won't have an impact on any other event handler...Router.ts:153Per default that seems to be `typo3-iframe-module` slot, as define in Fluid template. When would that be different → probably, please add a short description hereRouter.ts:170In general, I'd suggest to use web API here as well: * properly parsing URL parts * properly decoding/encoding URL components ('&ersands=%26%26%26') ``` const url = new URL(state.url); const params = new URLSearchParams(url.search); if (params.has('token')) { ... } ``` -
Benjamin Franzke commented on patch set 18 04/23/21, 05:13
Router.ts:103ReplyYes, it's used s DTO. But the change actually has an effect on outer event handlers (the intention is to notify the ModuleMenu event handler about the new module state, e.g. when navigating with browser back-button between modules). Here is a quick demo how a middle-event-handler can modify event data and thus act as a middleware: const outer = document.createElement('div'), modifier = document.createElement('div'), inner = document.createElement('div'); // will log {bar: 0, foo: 1} due to middleware modification outer.addEventListener('my-event', e => console.log(e.detail)); modifier.addEventListener('my-event', e => e.detail.foo = 1); outer.appendChild(modifier); modifier.appendChild(inner); document.documentElement.appendChild(outer); inner.dispatchEvent(new CustomEvent('my-event', {bubbles: true, detail: {bar: 0}})); But it's good you mention this. I feel like this is to implicit in here. Also it's kinda an intermixture between regular iframe event and fake state events :\ I hope I can come up with a better middle-layer that makes this "processing" more explicit, or maybe it should be another event that is transformed into "typo3-module-loaded". But I don't know yet.Router.ts:153ReplyThere is actually no default slot, it is always derived from the `module` attribute. The fluid template contains the <typo3-iframe-module> by default in order to set some default classes. Will try to comment this in a better way. -
Benjamin Franzke uploaded patch set 19 04/24/21, 04:14
-
TYPO3com voted on patch set 19 V -1 04/24/21, 04:22 Completed build in 07m 49s on Sat, 24 Apr, 04:22 AM Test Summary: 33307 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10849
-
core-ci voted on patch set 19 V -1 04/24/21, 04:28 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10671
-
Benjamin Franzke uploaded patch set 20 04/26/21, 12:05
-
TYPO3com voted on patch set 20 V +1 04/26/21, 12:11 Completed build in 05m 53s on Mon, 26 Apr, 12:11 PM Test Summary: 33312 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10862
-
core-ci voted on patch set 20 V +1 04/26/21, 12:17 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10701
-
Benjamin Franzke uploaded patch set 21 04/26/21, 17:08
-
Benjamin Franzke commented on patch set 21 04/26/21, 17:08
Router.ts:103ReplyTo help readability I've now added proper interfaces for the event (instead of relying on `any`). interface ModuleState is passed in to the `detail` argument of events. interface DecorateModuleState is tracked by the state-tracker iframe and contains the `ModuleState` data plus an additional tagName.Router.ts:153ReplyUpdate Fluid template to reflect that there is no "default" state, as default state would depend on the module to be loaded on startup. Therefore the fluid template now rendered an empty <typo3-backend-module-router> tag. and <typo3-backend-module-router> will create <typo3-iframe-module> ondemand.Router.ts:170ReplyDone -
Benjamin Franzke commented on patch set 21 04/26/21, 17:11
ModuleLoader.php:169Maybe I will merge this into a single `component = TYPO3/CMS/Ext/TheModule` property. The tagName would then be exported by a named export called `componentName`. Makes registration more clean, but means the tag can only be created by the router, once the module is loaded. But the advantage will be: In case the module (javascript) can not be loaded, the router can show proper errors. -
core-ci voted on patch set 21 V +1 04/26/21, 17:18 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10710
-
Benjamin Franzke uploaded patch set 22 04/26/21, 20:32
-
core-ci voted on patch set 22 V +1 04/26/21, 20:43 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10714
-
Benjamin Franzke uploaded patch set 23 04/26/21, 22:01
-
core-ci voted on patch set 23 V +1 04/26/21, 22:16 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10715
-
Benjamin Franzke uploaded patch set 24 04/27/21, 23:07
-
core-ci voted on patch set 24 V +1 04/27/21, 23:19 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10810
-
Benjamin Franzke uploaded patch set 25 04/28/21, 00:02
-
Benjamin Franzke commented on patch set 25 04/28/21, 00:02
Router.ts:103ReplyI've additionally splitted the events to make it clear that there are differences between regular module events and the iframe events. Therefore the events are now no longer modified during propapagation.ModuleRouter.ts:59ReplyRefactored this code. This is no longer needed. Component is now referenced by javascript module name. The HTML Tag (implementation detail) is advertised as named export by the module (benni and me decided on the same approach for navigation components, hope that makes sense.) Closing as this code is no longer available.ModuleLoader.php:169ReplyDoneMain.html:22ReplyAs discussed in slack, its a router componenents. -
Benjamin Franzke commented on patch set 25 04/28/21, 00:06
Note: It helps to checkout https://review.typo3.org/c/Packages/TYPO3.CMS/+/68200 (from the relation chain of this patch) to have "Configuration" module implemented as a web component. Allows to to fully test the router state synchronization. -
core-ci voted on patch set 25 V +1 04/28/21, 00:16 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10813
-
Benni Mack commented on patch set 25 04/28/21, 08:03
Just a quick info about this "state tracker" thingy. We do have a DummyController with `/empty` entry point (route target "dummy"). We could use this one. What do you think? -
Benni Mack updated the commit message in patch set 26 04/28/21, 08:07
-
core-ci voted on patch set 26 V +1 04/28/21, 08:18 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10824
-
Benni Mack commented on patch set 26 V +1 CR +1 04/28/21, 18:18
I think this patch is OK as is, we need to do some fine-tuning for the deeplinking in a separate patch (also making this next step the actual "feature"), but this is a great step forward. -
Benjamin Franzke uploaded patch set 27 04/29/21, 06:17
-
core-ci voted on patch set 27 V +1 04/29/21, 06:31 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10876
-
Benjamin Franzke uploaded patch set 28 04/30/21, 12:56
-
core-ci voted on patch set 28 V +1 04/30/21, 13:07 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10971
-
Oli Bartsch commented on patch set 28 V +1 CR +1 04/30/21, 13:50
Great work! -
Benjamin Franzke commented on patch set 28 CR -1 04/30/21, 14:10
Hm, maybe would should add a Feature.rst for the updating URLs. Will try to add it real quick.. -
Benjamin Franzke uploaded patch set 29 04/30/21, 14:34
-
Benjamin Franzke uploaded patch set 30 04/30/21, 14:42
-
core-ci voted on patch set 29 V +1 04/30/21, 14:46 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10973
-
core-ci voted on patch set 30 V +1 04/30/21, 14:53 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10974
-
Oli Bartsch voted on patch set 30 V +1 CR +1 04/30/21, 15:05
-
Andreas Kienast commented on patch set 30 V +1 04/30/21, 15:12
StateTrackerController.php:27What's the purpose of this controller? Is this a preparation for something or a left-over? -
Benjamin Franzke commented on patch set 30 04/30/21, 15:18
StateTrackerController.php:27ReplyYes it is a preparation for web component based backend modules, as shown in patch relation chain: https://review.typo3.org/c/Packages/TYPO3.CMS/+/68200/14 The idea is to prepare for such modules right from the start (meaning: do not just care for adressbar updates for iframe modules but also for upcoming native-web-component based backend modules). The state tracker will be used to track state of web components (kind of as polyfill/history.pushState which cannot be combined with iframes – tried to document that in the commit message). -
Andreas Kienast commented on patch set 30 CR +1 04/30/21, 15:20
StateTrackerController.php:27Reply UnresolvedAlright, thanks for your explanation! -
Benjamin Franzke voted on patch set 30 V +2 CR +2 04/30/21, 16:20
-
Benjamin Franzke merged patch set 31 04/30/21, 16:22
ModuleRouter.ts:27