Review main Merged

91438[TASK] Add QR Code web-component

Jochen Roth CR +2 V +2 Hard +495 −0 updated 11/12/25, 20:17

Commit message

To render a QR code in the Backend this component
will allow to pass in a "content", "size" and
"show-download" to render a QR code.

This way a QR Code can be rendered anywhere
in the backend.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 1

Files 11

Review log 2943

Show 1118 earlier messages
  1. Jochen Roth uploaded patch set 1 11/06/25, 17:17

  2. Jochen Roth marked it work in progress 11/06/25, 17:19

  3. core-ci voted on patch set 1 V -1 11/06/25, 17:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88596

  4. Jochen Roth uploaded patch set 2 V -1 11/09/25, 19:26

  5. core-ci voted on patch set 2 V -1 11/09/25, 19:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88751

  6. Jochen Roth uploaded patch set 3 V -1 11/09/25, 20:01

  7. core-ci voted on patch set 3 V +1 11/09/25, 20:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88752

  8. Jochen Roth updated the commit message in patch set 4 V +1 11/09/25, 20:10

  9. Jochen Roth marked it ready for review 11/09/25, 20:15

  10. core-ci voted on patch set 4 V +1 11/09/25, 20:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88753

  11. Jochen Roth uploaded patch set 5 V +1 11/09/25, 20:33

  12. core-ci voted on patch set 5 V +1 11/09/25, 20:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88754

  13. Benni Mack commented on patch set 5 CR -1 11/10/25, 08:56

    qrcode-element.ts:77

    I'd assume that each route would be its own action...

    qrcode-element.ts:109

    see above. each action should be its own route

    locallang_qrcode.xlf:3

    please name the whole file just "qrcode.xlf"
  14. Jochen Roth uploaded patch set 6 CR -1 V +1 11/10/25, 17:58

  15. core-ci voted on patch set 6 V -1 11/10/25, 18:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88892

  16. Jochen Roth uploaded patch set 7 V -1 11/10/25, 18:18

  17. core-ci voted on patch set 7 V +1 11/10/25, 18:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88893

  18. Jochen Roth commented on patch set 7 11/10/25, 18:27

    qrcode-element.ts:77 Reply

    Done

    qrcode-element.ts:109 Reply

    Done

    locallang_qrcode.xlf:3 Reply

    Done
  1. Oli Bartsch commented on patch set 7 11/10/25, 18:33

    QrCodeController.php:47

    Please use `'methods' => ['GET']` in AjaxRoutes.php

    QrCodeController.php:51

    undefined array access?

    QrCodeController.php:53

    Does it make sense to generate a svg with empty content?

    QrCodeController.php:55

    Please let's use PSR-17 factories instead.

    QrCodeController.php:60

    Please use `'methods' => ['POST']` in AjaxRoutes.php

    QrCodeController.php:68

    Does it make sense to generate a svg with empty content?

    QrCodeController.php:94

    Please let's use PSR-17 factories instead.
  2. Jochen Roth uploaded patch set 8 V +1 11/10/25, 21:42

  3. core-ci voted on patch set 8 V -1 11/10/25, 21:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88917

  4. Jochen Roth uploaded patch set 9 V -1 11/10/25, 21:53

  5. core-ci voted on patch set 9 V +1 11/10/25, 22:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88918

  6. Jochen Roth commented on patch set 9 11/11/25, 15:43

    QrCodeController.php:47 Reply

    Done

    QrCodeController.php:51 Reply

    Done

    QrCodeController.php:53 Reply

    Nope

    QrCodeController.php:55 Reply

    Done

    QrCodeController.php:60 Reply

    Done

    QrCodeController.php:68 Reply

    Nope

    QrCodeController.php:94 Reply

    Done
  7. Oli Bartsch commented on patch set 9 11/11/25, 17:45

    qrcode-element.ts:45

    Shouldn't this be `Number`?

    qrcode-element.ts:46

    `Number` for TemplateResult? And why is internal rendering state exposed as a property? This should be @state().

    qrcode-element.ts:51

    This call to `loadQrCode()` without checking if `this.content` might fail.

    qrcode-element.ts:110

    is this really necessary?

    QrCodeSize.php:28

    Should be `MEGA`, like used for the avatar component. I also think that defining the same in the JS component again is duplicated and might lead to "out of sync" issues in the future.

    QrCodeSize.php:34

    Why 192 and not 128? 😄

    QrCodeController.php:34

    I think backend should not depend on EXT:from ;)

    QrCodeController.php:59

    We are missing content-type header for svg. While this might work in most browsers, we should define it.

    QrCodeController.php:74

    I think dirname() should be removed here.

    QrCodeController.php:103

    might trigger array key error
  8. Jochen Roth uploaded patch set 10 V +1 11/12/25, 09:05

  9. Jochen Roth commented on patch set 10 CR +1 V +1 11/12/25, 09:07

    qrcode-element.ts:45 Reply

    Well, in the end it is a string. e.g. "large", "medium", "small".

    qrcode-element.ts:46 Reply

    Done

    qrcode-element.ts:51 Reply

    Now checking for an empty `this.content` and in case it is empty, render not-found icon.

    qrcode-element.ts:110 Reply

    Good catch. Not necessary.

    QrCodeSize.php:28 Reply

    Now using `MEGA` instead of `EXTRA_LARGE`

    QrCodeSize.php:34 Reply

    hm... now using 128

    QrCodeController.php:34 Reply

    Done

    QrCodeController.php:59 Reply

    Done

    QrCodeController.php:74 Reply

    Done

    QrCodeController.php:103 Reply

    Well, this should return at lease one result. But in case of cases, i added a fallback to 'image/svg+xml'
  10. Jochen Roth voted on patch set 10 CR 0 V 0 11/12/25, 09:10

  11. core-ci voted on patch set 10 V +1 11/12/25, 09:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89172

  12. Oli Bartsch uploaded patch set 11 V +1 11/12/25, 09:34

  13. Oli Bartsch voted on patch set 11 CR +1 V +1 11/12/25, 09:35

  14. Benni Mack commented on patch set 11 CR -1 11/12/25, 09:38

    We should use more TYPO3 Core APIs
  15. core-ci voted on patch set 11 V +1 11/12/25, 09:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89203

  16. Benni Mack uploaded patch set 12 CR +1 V +1 11/12/25, 09:45

  17. Benni Mack uploaded patch set 13 11/12/25, 09:46

  18. core-ci voted on patch set 12 V -1 11/12/25, 09:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89224

  19. core-ci voted on patch set 13 V -1 11/12/25, 09:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89225

  20. Jochen Roth uploaded patch set 14 V -1 11/12/25, 13:01

  21. Jochen Roth commented on patch set 14 11/12/25, 13:06

    QrCodeController.php:151

    FYI, intentionally not using `GeneralUtility::upload_copy_move($pngFile, $targetPath)`, coz it returns `false` when it copies a file to the destitation.
  22. core-ci voted on patch set 14 V +1 11/12/25, 13:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89315

  23. Oli Bartsch voted on patch set 14 CR +1 V +1 11/12/25, 14:42

  24. Benni Mack voted on patch set 14 CR +2 V +2 11/12/25, 20:17

  25. Benni Mack merged patch set 15 11/12/25, 20:17