Review main Merged

76001[TASK] Replace `imagesloaded` with native browser API

Andreas Kienast CR +2 V +2 Normal +10 −66 updated 10/10/22, 10:09

Commit message

The library `imagesloaded` is only used in the image cropper to
initialize the cropper functionality once the image is loaded. This can
be achieved with native browser API, `imagesloaded` is therefor not
needed anymore and thus removed.

See https://caniuse.com/mdn-api_htmlimageelement_complete
for compatibility.

Executed command:

    npm remove --save imagesloaded @types/imagesloaded

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Benjamin Franzke +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Benjamin Franzke +1
    • core-ci +1 CI

Issues 1

Files 10

Review log 1116

  1. Andreas Kienast uploaded patch set 1 10/07/22, 14:12

  2. Andreas Kienast uploaded patch set 2 10/07/22, 14:14

  3. Andreas Kienast uploaded patch set 3 10/07/22, 14:17

  4. core-ci voted on patch set 1 V -1 10/07/22, 14:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32070

  5. core-ci voted on patch set 3 V +1 10/07/22, 14:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32073

  6. core-ci voted on patch set 2 V -1 10/07/22, 14:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32071

  7. Benni Mack updated the commit message in patch set 4 10/07/22, 15:16

  8. core-ci voted on patch set 4 V +1 10/07/22, 15:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32077

  9. Frank Nägler voted on patch set 4 CR +1 10/07/22, 17:03

  10. Frank Nägler voted on patch set 4 V +1 10/07/22, 17:10

  11. Benjamin Franzke uploaded patch set 5 10/08/22, 15:34

  12. Benjamin Franzke commented on patch set 5 10/08/22, 15:34

    image-manipulation.ts:181

    Hm, I don't see a problem with the current code, but I think I'd like this to be an always-async operation, in order for the for .init() to always be called asynchronously, no matter whether image was complete or not. So it's perfectly clear that initializeCropperModal() will always be async, not sometimes sync and sometimes async. (Good to know for methods/code that run after this method). So I adapted to use a wrapper promise here, hope that's fine.
  13. core-ci voted on patch set 5 V +1 10/08/22, 15:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32103

  14. Andreas Kienast commented on patch set 5 10/10/22, 06:54

    image-manipulation.ts:181 Reply

    That's fine for me, thanks.
  15. Georg Ringer voted on patch set 5 V +2 CR +2 10/10/22, 10:09

  16. Georg Ringer merged patch set 6 10/10/22, 10:09