Review main Merged

80738[TASK] Remove jQuery from @typo3/workspaces/workspaces

Andreas Nedbal CR +2 V +2 Hard +182 −75 updated 12/02/25, 09:20

Commit message

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Andreas Kienast +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 1

Files 8

Review log 2227

Show 2 earlier messages
  1. Andreas Nedbal uploaded patch set 1 08/28/23, 19:28

  2. Andreas Nedbal uploaded patch set 2 08/28/23, 19:29

  1. Benjamin Franzke commented on patch set 2 08/28/23, 19:35

    workspaces.ts:30

    This needs to be created in a modal callback and use modal.ownerDocument.createElement(), as `document.createElement()` from an iframe, attached to another frame, currently doesn't work in Firefox. See https://forge.typo3.org/issues/101747#note-4 where I've documented that. Also note that is the reason why I changed such cases in the install tool migration patch to ownerDocument. BUT – and I'm sorry for that. Loading the module on the top frame and creating the module on the top frame is good and works, but then the iframe state is not available. That means language labels added as inline-javascript to the inner frame, need to be copied into the component. That's quite a hassle right now, and we probably need to find a "good" API for language management in components first.
  2. Benjamin Franzke voted on patch set 2 CR -1 08/28/23, 19:35

  3. core-ci voted on patch set 2 V +1 08/28/23, 19:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45940

  4. core-ci voted on patch set 1 V -1 08/28/23, 19:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45939

  5. Benjamin Franzke commented on patch set 2 08/28/23, 19:37

    workspaces.ts:30 Reply

    other than that: cool and right way to use web components, we are (or better the platform) is just not ready for good interframe component usage.
  6. Andreas Nedbal uploaded patch set 3 CR -1 V +1 08/28/23, 20:15

  7. core-ci voted on patch set 3 V +1 08/28/23, 20:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45941

  8. Andreas Nedbal commented on patch set 3 08/28/23, 20:41

    workspaces.ts:30 Reply

    Okay, I moved the creation of the form over to the modal callback, thanks for the feedback on that. > BUT – and I'm sorry for that. Loading the module on the top frame and creating the module on the top frame is good and works, but then the iframe state is not available. That means language labels added as inline-javascript to the inner frame, need to be copied into the component. > > That's quite a hassle right now, and we probably need to find a "good" API for language management in components first. That's exactly why I did the workaround of having a `TYPO3lang` property in this component in the meantime.
  9. Benjamin Franzke uploaded patch set 4 V +1 08/28/23, 20:57

  10. Benjamin Franzke commented on patch set 4 08/28/23, 20:57

    backend.ts:94

    EXT:form is always in iframe, so this should/could be done without a condition. (Done)

    send-to-stage-form.ts:38

    Let's use `typeof TYPO3.lang` in such cases (although technically identical), in order to easily "find" languages records/maps in our codebase, once we need to migrate. (Done)

    workspaces.ts:30 Reply

    Ack
  11. Benjamin Franzke commented on patch set 4 08/28/23, 20:57

    backend.ts:94 Reply

    sorry, meant EXT:workspaces
  12. Benjamin Franzke commented on patch set 4 08/28/23, 21:02

    send-to-stage-form.ts:52

    A component that uses a form should also handle it's submit event. This (probably, didn't chekc in detail) happens in backend.ts via some parent.document delegate event handler. Do you want to migrate those later? I mean, I don't care, but I'd like to get "rid" of those delegate and bound the events to the components. (Whether in this or in a following patch, doesn't matter for me)
  13. core-ci voted on patch set 4 V +1 08/28/23, 21:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45947

  14. Andreas Nedbal commented on patch set 4 08/28/23, 21:17

    send-to-stage-form.ts:52 Reply

    I didn't check the outside logic in `backend.ts` too much while refactoring, but I went ahead and have taken a look now. https://github.com/TYPO3/typo3/blob/main/Build/Sources/TypeScript/workspaces/backend.ts#L562 (there is a second call which basically does the same) The function around that only sets up a `button.clicked` modal event listener, and the form itself is used mostly for convenience to turn the values into serialized data, so there is no submit at all.
  15. Andreas Kienast voted on patch set 4 V +1 CR +1 08/29/23, 13:46

  16. Christian Kuhn commented on patch set 4 V -1 08/30/23, 09:58

    This seems to break the "Send to page" modal window in the workspace preview: There is a green "Send to stage "x"" button in the preview, clicking this usually renders the same modal when using the workspace BE module. With patch, that modal is empty in workspace preview. Could you have a look?
  17. Andreas Kienast commented on patch set 4 V -1 CR 0 08/30/23, 11:52

    What lolli says...
  18. Andreas Kienast uploaded patch set 5 V +1 08/30/23, 11:57

  19. Andreas Kienast commented on patch set 5 08/30/23, 11:58

    The "Send to stage x" action in the preview module is still broken server-side, but doesn't seem to be related to this patch.
  20. core-ci voted on patch set 5 V +1 08/30/23, 12:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46033

  21. Andreas Kienast voted on patch set 5 V +1 CR +1 08/30/23, 12:18

  22. Christian Kuhn commented on patch set 5 08/30/23, 14:35

  23. Christian Kuhn voted on patch set 5 V +2 CR +2 08/30/23, 14:37

  24. Christian Kuhn merged patch set 6 08/30/23, 14:37

  25. Christian Kuhn commented on patch set 6 12/02/25, 09:20

    workspaces.ts:44 Unresolved

    the buttons have not been transferred.