Review main Merged

80507[TASK] Migrate from jQuery in `@typo3/backend/online-media`

Andreas Kienast CR +2 V +2 Normal +127 −73 updated 08/11/23, 13:49

Commit message

This patch removes jQuery from the `@typo3/backend/online-media` module
in favor of native APIs. The form has been migrated to Lit, which now
uses proper submit events.

Also, in case of an error the modal doesn't disappear anymore, but a
proper notification is rendered.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
    • Andreas Nedbal +1
    • Lina Wolf +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Andreas Nedbal +1
    • Lina Wolf +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 1518

  1. Andreas Kienast uploaded patch set 1 08/10/23, 13:22

  2. core-ci voted on patch set 1 V +1 08/10/23, 13:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45336

  3. Andreas Kienast uploaded patch set 2 V +1 08/10/23, 13:33

  4. core-ci voted on patch set 2 V +1 08/10/23, 13:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45338

  5. Lina Wolf commented on patch set 2 08/10/23, 19:08

    For me it works in Chrome but not in Firefox
  6. Andreas Kienast commented on patch set 2 08/10/23, 19:10

    Reply

    what exactly does not work?
  7. Lina Wolf commented on patch set 2 V -1 08/10/23, 19:12

    When I open the Add media by URL Dialog I get the following error in the firefox console and it is not possible anymore to input an URL ``` Uncaught TypeError: this.createRenderRoot is not a function connectedCallback https://t3master2.ddev.site/typo3/sysext/core/Resources/Public/JavaScript/Contrib/@lit/reactive-element/reactive-element.js?bust=1690970468:6 connectedCallback https://t3master2.ddev.site/typo3/sysext/core/Resources/Public/JavaScript/Contrib/lit-element/lit-element.js?bust=1690970468:6 k https://t3master2.ddev.site/typo3/sysext/core/Resources/Public/JavaScript/Contrib/lit-html/lit-html.js?bust=1690970468:6 $ https://t3master2.ddev.site/typo3/sysext/core/Resources/Public/JavaScript/Contrib/lit-html/lit-html.js?bust=1690970468:6 g https://t3master2.ddev.site/typo3/sysext/core/Resources/Public/JavaScript/Contrib/lit-html/lit-html.js?bust=1690970468:6 _$AI https://t3master2.ddev.site/typo3/sysext/core/Resources/Public/JavaScript/Contrib/lit-html/lit-html.js?bust=1690970468:6 D https://t3master2.ddev.site/typo3/sysext/core/Resources/Public/JavaScript/Contrib/lit-html/lit-html.js?bust=1690970468:6 update https://t3master2.ddev.site/typo3/sysext/core/Resources/Public/JavaScript/Contrib/lit-element/lit-element.js?bust=1690970468:6 performUpdate https://t3master2.ddev.site/typo3/sysext/core/Resources/Public/JavaScript/Contrib/@lit/reactive-element/reactive-element.js?bust=1690970468:6 scheduleUpdate https://t3master2.ddev.site/typo3/sysext/core/Resources/Public/JavaScript/Contrib/@lit/reactive-element/reactive-element.js?bust=1690970468:6 _$Ej https://t3master2.ddev.site/typo3/sysext/core/Resources/Public/JavaScript/Contrib/@lit/reactive-element/reactive-element.js?bust=1690970468:6 requestUpdate https://t3master2.ddev.site/typo3/sysext/core/Resources/Public/JavaScript/Contrib/@lit/reactive-element/reactive-element.js?bust=1690970468:6 u https://t3master2.ddev.site/typo3/sysext/core/Resources/Public/JavaScript/Contrib/@lit/reactive-element/reactive-element.js?bust=1690970468:6 u https://t3master2.ddev.site/typo3/sysext/core/Resources/Public/JavaScript/Contrib/@lit/reactive-element/reactive-element.js?bust=1690970468:6 s https://t3master2.ddev.site/typo3/sysext/core/Resources/Public/JavaScript/Contrib/lit-element/lit-element.js?bust=1690970468:6 ModalElement https://t3master2.ddev.site/typo3/sysext/backend/Resources/Public/JavaScript/modal.js?bust=1690970468:13 generate https://t3master2.ddev.site/typo3/sysext/backend/Resources/Public/JavaScript/modal.js?bust=1690970468:53 advanced https://t3master2.ddev.site/typo3/sysext/backend/Resources/Public/JavaScript/modal.js?bust=1690970468:53 triggerModal https://t3master2.ddev.site/typo3/sysext/backend/Resources/Public/JavaScript/online-media.js?bust=1690970468:13 registerEvents https://t3master2.ddev.site/typo3/sysext/backend/Resources/Public/JavaScript/online-media.js?bust=1690970468:13 delegateTo https://t3master2.ddev.site/typo3/sysext/core/Resources/Public/JavaScript/event/regular-event.js?bust=1690970468:13 ```
  8. Andreas Kienast commented on patch set 2 08/10/23, 19:14

    Reply

    That‘s odd. The same method is used at multiple locations and it works without issues. Which Firefox version do you use?
  9. Andreas Nedbal commented on patch set 2 08/10/23, 23:12

    Reply

    I encounter the error as well, on Windows with Firefox 116.0.2.
  10. Andreas Kienast commented on patch set 2 08/11/23, 08:40

    At first glance it looks like a scoping issue. The component is loaded in the inner frame, but rendered in the outer frame as part of the modal. Thanks, Firefox.
  11. Andreas Kienast uploaded patch set 3 V +1 08/11/23, 08:49

  12. core-ci voted on patch set 3 V +1 08/11/23, 08:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45366

  13. Lina Wolf commented on patch set 3 08/11/23, 09:36

    Reply

    I have 114.0.1, 64 bits on windows
  14. Andreas Kienast commented on patch set 3 08/11/23, 09:42

    Reply

    Can you please test Patch Set 3?
  15. Lina Wolf commented on patch set 3 V +1 CR +1 08/11/23, 09:49

    Reply

    Done

    Reply

    Done
    Patch set 3 works in my firefox
  16. Andreas Nedbal voted on patch set 3 V +1 CR +1 08/11/23, 13:47

  17. Andreas Kienast voted on patch set 3 V +2 CR +2 08/11/23, 13:49

  18. Andreas Kienast merged patch set 4 08/11/23, 13:49