Review main Merged

92448[FEATURE] Add QR code button for frontend preview URIs

Oli Bartsch CR +2 V +2 Hard +500 −44 updated 01/23/26, 16:13

Commit message

A QR code button is now displayed next to the
"View" button in the Page, List, Preview, and
Workspaces modules. The button opens a modal with
a scannable QR code for the frontend preview URI.

In workspace context, the generated URL includes
the ADMCMD_prev parameter, allowing previews without
backend authentication.

The `qrcode-modal-button` component has been moved from
EXT:redirects to EXT:backend for shared usage.

ComponentFactory provides new methods `createQrCodeButton()`
and `getPreviewUrlForQrCode()` for consistent button
creation and workspace-aware URI generation.

Additioanlly, the qrcode component now features
the possibility to display the actual url and
allows the editor to easily copy it to clipboard.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Garvin Hicking +1
    • Stefan Bürk +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Garvin Hicking +1
    • Stefan Bürk +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 29

Show 9 more files

Review log 2837

Show 812 earlier messages
  1. Oli Bartsch uploaded patch set 1 01/21/26, 22:45

  2. core-ci voted on patch set 1 V +1 01/21/26, 22:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93983

  3. Simon Schaufelberger commented on patch set 1 01/21/26, 23:11

    Great feature! One thing I noticed is an inconsistency between the Layout and the Records view. In the Layout view the button is a combined button while on the Records view it is a standalone button. Can we make this consistent?
  4. Oli Bartsch uploaded patch set 2 V +1 01/22/26, 07:34

  5. Oli Bartsch commented on patch set 2 01/22/26, 07:35

    Reply

    Sure. Thanks for the pointer.
  6. core-ci voted on patch set 2 V +1 01/22/26, 07:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94012

  7. Oli Bartsch uploaded patch set 3 V +1 01/22/26, 15:10

  8. core-ci voted on patch set 3 V +1 01/22/26, 15:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94047

  9. Oli Bartsch uploaded patch set 4 V +1 01/22/26, 16:35

  10. core-ci voted on patch set 4 V -1 01/22/26, 16:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94064

  11. Stefan Bürk commented on patch set 4 01/22/26, 16:56

    ModifyPreviewUrlForQrCodeListener.php:50

    ```suggestion if ($previewUrl !== '') { ```

    ModifyPreviewUrlForQrCodeListener.php:53

    Do we really want to catch exception so broad without logging it ? I'd suggest that we should only catch `UnableToLinkToPageException` and leave other errors/exceptions to end in a stack trace. What do you think ?
  12. Georg Ringer voted on patch set 4 CR +1 V +1 01/22/26, 20:16

  1. Simon Schaufelberger uploaded patch set 5 CR +1 V +1 01/22/26, 21:25

  2. Simon Schaufelberger commented on patch set 4 01/22/26, 21:25

    ModifyPreviewUrlForQrCodeListener.php:50 Reply

    Done
  3. core-ci voted on patch set 5 V +1 01/22/26, 21:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94100

  4. Simon Schaufelberger uploaded patch set 6 V +1 01/22/26, 21:35

  5. Simon Schaufelberger voted on patch set 6 CR +1 V +1 01/22/26, 21:36

  6. Simon Schaufelberger uploaded patch set 7 CR +1 V +1 01/22/26, 21:37

  7. Simon Schaufelberger voted on patch set 7 CR +1 V +1 01/22/26, 21:39

  8. core-ci voted on patch set 7 V +1 01/22/26, 21:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94102

  9. Oli Bartsch uploaded patch set 8 CR +1 V +1 01/22/26, 21:50

  10. Oli Bartsch commented on patch set 8 01/22/26, 21:50

    ModifyPreviewUrlForQrCodeListener.php:53 Reply

    Done
  11. Simon Schaufelberger commented on patch set 8 01/22/26, 21:56

    qrcode-modal-button.ts:90

    no console.log please in production code

    ModifyPreviewUrlForQrCodeListener.php:41

    I just moved this line on the class level to be "best practice"
  12. core-ci voted on patch set 8 V -1 01/22/26, 21:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94104

  13. Stefan Bürk commented on patch set 8 01/23/26, 00:15

    ModifyPreviewUrlForQrCodeListener.php:41 Reply

    Not getting this. Best practice defined by whom ? It's absolutly valid to have AsEventListener on the method or on the class level (if only one method exists. (And we have no rule for that).
  14. Simon Schaufelberger commented on patch set 8 01/23/26, 00:47

    ModifyPreviewUrlForQrCodeListener.php:41 Reply

    https://docs.typo3.org/permalink/t3coreapi:eventdispatchereventlistenerclass -> when using __invoke it is used on the class level while it should be only used on a method level when a "real method" is used. We should be a good example and don't always do things different ways (because we can) but be consistent! Inconsistent ways are way harder to migrate in the long term (a general rule).
  15. Oli Bartsch commented on patch set 8 01/23/26, 07:37

    ModifyPreviewUrlForQrCodeListener.php:41 Reply

    I cant find your quote in the docs. It actually says > The PHP attribute can also be used on a method level. The above example can also be written as: and shows an example of exactly this scenario with `__invoke()`. We currently use the attribute 80% on method level. I'm not willing to change this now across the code base for no reason.
  16. Simon Schaufelberger commented on patch set 8 01/23/26, 10:59

    ModifyPreviewUrlForQrCodeListener.php:41 Reply

    you are right, most of the times the annotation is actually on the method level. The docs first say: put it on the class level and then later on, that you can also put it on the method level.
  17. Oli Bartsch uploaded patch set 9 V -1 01/23/26, 11:38

  18. Oli Bartsch uploaded patch set 10 01/23/26, 11:46

  19. core-ci voted on patch set 9 V -1 01/23/26, 11:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94156

  20. core-ci voted on patch set 10 V +1 01/23/26, 12:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94159

  21. Simon Schaufelberger commented on patch set 10 CR +1 V +1 01/23/26, 12:38

    qrcode-modal-button.ts:90 Reply

    Done
  22. Garvin Hicking voted on patch set 10 CR +1 V +1 01/23/26, 15:45

  23. Stefan Bürk voted on patch set 10 CR +1 V +1 01/23/26, 16:12

  24. Oli Bartsch commented on patch set 10 CR +2 V +2 01/23/26, 16:13

    qrcode-modal-button.ts:90 Reply

    Done
  25. Oli Bartsch merged patch set 11 01/23/26, 16:13