Review main Merged

70827[TASK] Extract default inline frontend JavaScript

Oliver Hader CR +2 V +2 Hard +355 −134 updated 09/08/21, 12:35

Commit message

This change extracts dynamically added frontend JavaScript `openPic`
and `linkTo_UnCryptMailto` which are extracted to static file
`EXT:frontend/Resources/Public/JavaScript/default_frontend.js`.
Mentioned file is loaded automatically as async script element.

As a result, view-helper `<f:uri.email>` became obsolete, which
is deprecated and considered to be removed with TYPO3 v12.0.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Markus Klein +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Markus Klein +1
    • core-ci +1 CI

Issues 1

Files 18

Review log 4162

Show 2237 earlier messages
  1. Oliver Hader uploaded patch set 1 08/30/21, 20:13

  2. Oliver Hader uploaded patch set 2 08/30/21, 20:14

  3. core-ci voted on patch set 1 V -1 08/30/21, 20:17 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15894

  4. core-ci voted on patch set 2 V -1 08/30/21, 20:34 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15895

  5. Benjamin Franzke commented on patch set 2 CR -1 08/31/21, 08:57

    AbstractMenuContentObject.php:1353

    Good to change this in general, but this change breaks config.removeDefaultJS = 1 https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/Setup/Config/Index.html#removedefaultjs Therefore that change would be a breaking change. Usecase: As site owner I've included the linkTo_UnCryptMailto into the main JavaScript bundle and therefore instructed TYPO3 to remove the inline JS via config.removeDefaultJS = 1. We should check if TSFE->config['config']['removeDefaultJS'] !== '1'
  6. Benjamin Franzke commented on patch set 2 08/31/21, 08:59

    AbstractMenuContentObject.php:1353 Reply

    To clarify "break": "breaking" in a way that the javascript is added as file, although the configurations intent was to remove the javascript.
  7. Oliver Hader uploaded patch set 3 08/31/21, 09:20

  8. Oliver Hader commented on patch set 3 08/31/21, 09:26

    AbstractMenuContentObject.php:1353 Reply

    I don't understand that... with this change, there is no inline JavaScript anymore... feel free to apply your changes directly. Thx
  9. core-ci voted on patch set 3 V -1 08/31/21, 09:47 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15918

  10. Benjamin Franzke uploaded patch set 4 08/31/21, 10:43

  11. Benjamin Franzke commented on patch set 4 08/31/21, 10:43

    AbstractMenuContentObject.php:1353 Reply

    With config.removeDefaultJS = 1 behaviour.js must not be added to the page output, as that is "default js", and users that set config.removeDefaultJS to 1 do this to avoid any javascript (no matter if inline or external) from being added by EXT:frontend to the output. That means, given the following config: config { spamProtectEmailAddresses = -3 removeDefaultJS = 1 } The following code must not be added to the page output: <script async="async" src="/typo3/sysext/frontend/Resources/Public/JavaScript/behavior.js?1630404271"></script> > feel free to apply your changes directly. Thx Yes, sure, adapted in patchset 3.
  12. core-ci voted on patch set 4 V -1 08/31/21, 11:01 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15921

  13. Oliver Hader uploaded patch set 5 09/01/21, 18:22

  14. Oliver Hader commented on patch set 5 09/01/21, 18:23

    AbstractMenuContentObject.php:1353 Reply

    @bfr: Thanks for adjusting the code and the explanation!
  15. core-ci voted on patch set 5 V -1 09/01/21, 18:37 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16023

  16. core-ci commented on patch set 5 09/01/21, 18:42 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16023

  17. core-ci commented on patch set 5 09/01/21, 19:03 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16023

  18. Oliver Hader uploaded patch set 6 09/02/21, 08:04

  19. core-ci voted on patch set 6 V +1 09/02/21, 08:24 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16054

  20. Benni Mack commented on patch set 6 09/02/21, 08:25

    behavior.js:47

    should we stick to "var" instead of "let" and "const" for the time being?
  21. Markus Klein commented on patch set 6 09/02/21, 09:29

    obsolete
  22. Markus Klein commented on patch set 6 09/02/21, 09:31

    Deprecation-95041-DeprecateFuriemailView-helper.rst:18

    allowing more
  23. Oliver Hader uploaded patch set 7 09/02/21, 10:59

  24. Oliver Hader commented on patch set 6 09/02/21, 10:59

    Deprecation-95041-DeprecateFuriemailView-helper.rst:18 Reply

    Ack

    behavior.js:47 Reply Unresolved

    const and let are supported in IE11, not in IE10. But fine to change that..
  25. Oliver Hader commented on patch set 7 09/02/21, 10:59

    Reply

    Ack
  26. core-ci voted on patch set 7 V -1 09/02/21, 11:19 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16067

  27. core-ci voted on patch set 7 V +1 09/02/21, 11:43 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16067

  28. Oliver Hader uploaded patch set 8 09/02/21, 19:59

  29. core-ci voted on patch set 8 V +1 09/02/21, 20:14 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16126

  30. Oliver Hader uploaded patch set 9 09/02/21, 20:29

  31. Oliver Hader uploaded patch set 10 09/02/21, 20:45

  32. core-ci voted on patch set 9 V -1 09/02/21, 21:00 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16132

  33. core-ci voted on patch set 10 V -1 09/02/21, 21:03 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16134

  34. Oliver Hader uploaded patch set 11 09/02/21, 21:53

  35. Oliver Hader uploaded patch set 12 09/02/21, 22:06

  36. core-ci voted on patch set 11 V -1 09/02/21, 22:07 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16142

  37. core-ci voted on patch set 12 V +1 09/02/21, 22:21 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16144

  1. Benni Mack uploaded patch set 13 09/03/21, 09:39

  2. Benni Mack voted on patch set 13 V +1 CR +1 09/03/21, 09:39

  3. Benni Mack uploaded patch set 14 09/03/21, 09:50

  4. Benni Mack voted on patch set 14 V +1 CR +1 09/03/21, 09:50

  5. Markus Klein commented on patch set 14 CR +1 09/03/21, 09:55

    will try to give this a test soonish
  6. core-ci voted on patch set 13 V +1 09/03/21, 10:00 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16162

  7. core-ci voted on patch set 14 V +1 09/03/21, 10:05 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16163

  8. Benni Mack uploaded patch set 15 09/03/21, 13:34

  9. core-ci voted on patch set 15 V +1 09/03/21, 13:50 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16182

  10. Benni Mack uploaded patch set 16 09/03/21, 14:08

  11. Benni Mack voted on patch set 16 V +1 CR +1 09/03/21, 14:08

  12. core-ci voted on patch set 16 V +1 09/03/21, 14:28 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16190

  13. Oliver Hader rebased onto patch set 17 09/03/21, 14:43

  14. core-ci voted on patch set 17 V +1 09/03/21, 14:57 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16196

  15. Markus Klein uploaded patch set 18 09/05/21, 20:05

  16. Markus Klein voted on patch set 18 CR +1 09/05/21, 20:05

  17. Markus Klein voted on patch set 18 V +1 09/05/21, 20:12

  18. core-ci voted on patch set 18 V +1 09/05/21, 20:23 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16294

  19. Georg Ringer commented on patch set 18 09/06/21, 06:45

    to give this important change more emphasis I would suggest a feature/important rst. also because it changes a bit the frontend output
  20. Georg Ringer voted on patch set 18 V +1 CR +1 09/06/21, 06:45

  21. Oliver Hader voted on patch set 18 V +2 CR +2 09/06/21, 08:45

  22. Oliver Hader voted on patch set 18 V 0 CR 0 09/06/21, 08:45

  23. Benni Mack voted on patch set 18 V +2 CR +2 09/08/21, 05:50

  24. Benni Mack merged patch set 19 09/08/21, 05:50

  25. Oliver Hader wrote 09/08/21, 12:35

    Topic set to inline-javascript