65418[BUGFIX] Streamline AjaxDataHandler event names
Commit message
Review
-
Code review CR +2 Done
- Andreas Kienast +2
-
Verified V +2 Done
- Andreas Kienast +2
- TYPO3com +1 CI
Issues 1
Files 8
- Build/Sources/TypeScript/backend/Resources/Public/TypeScript/AjaxDataHandler.ts3+2 −2
- Build/Sources/TypeScript/recordlist/Resources/Public/TypeScript/Recordlist.ts+14 −2
- Build/Sources/TypeScript/tstemplate/Resources/Public/TypeScript/InformationModule.ts+5 −2
- Build/Sources/TypeScript/workspaces/Resources/Public/TypeScript/Toolbar/WorkspacesMenu.ts+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/AjaxDataHandler.js+1 −1
- typo3/sysext/recordlist/Resources/Public/JavaScript/Recordlist.js+1 −1
- typo3/sysext/tstemplate/Resources/Public/JavaScript/InformationModule.js+1 −1
- typo3/sysext/workspaces/Resources/Public/JavaScript/Toolbar/WorkspacesMenu.js+1 −1
Review log 67
-
Andreas Kienast commented on patch set 1 08/21/20, 16:12
Cherry Picked from branch master. -
TYPO3com voted on patch set 1 V +1 08/21/20, 16:25 Completed build in 12m 12s on Fri, 21 Aug, 04:25 PM Test Summary: 74034 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC104-253
-
Andreas Kienast voted on patch set 1 V +2 CR +2 08/21/20, 16:27
-
Andreas Kienast merged patch set 2 08/21/20, 16:27
-
Oliver Hader commented on patch set 2 09/01/20, 21:05
Some remarks on AjaxDataHandler - did not check the othersAjaxDataHandler.ts:97Hm... the broadcasted event is basically the same `typo3:datahandler:process` - thus, the event seems to be triggered twice, correct? * event names should be past tense, e.g. "processed" instead of "process" - or `process-succeeded` (see below) * this component is not the data handler, it's the AJAX data handler Considering the missing catch block for failed promises, we finally would have * `typo3:ajax-data-handler:process-succeeded` * `typo3:ajax-data-handler:process-failed` I'll have a look... -
Andreas Kienast commented on patch set 2 09/02/20, 05:37
AjaxDataHandler.ts:97ReplyYes, we trigger two events. The reason is that only the most-outer frame listens to Broadcast channel events. I tried to add the listener to the RecordList as well (that was my test case) which got completely ignored. I assume that Broadcast Channel events cannot be listened to when emitting and listening happens in the same frame. -
Oliver Hader commented on patch set 2 09/04/20, 11:39
→ is started a WIP for streamlining the scenario https://review.typo3.org/c/Packages/TYPO3.CMS/+/65578 → using in/required for https://github.com/FriendsOfTYPO3/sudo-mode/pull/5AjaxDataHandler.ts:97Reply Unresolved> Yes, we trigger two events. The reason is that only the most-outer frame listens to Broadcast channel events. I tried to add the listener to the RecordList as well (that was my test case) which got completely ignored. I assume that Broadcast Channel events cannot be listened to when emitting and listening happens in the same frame. The document containing RecordList (I guess an IFRAME) would need to listen to the same broadcast channel as well (e.g. using BroadcastService.listen()).