Review main Merged

64225[TASK] Reduce inline JavaScript in ext:setup

Oliver Hader CR +2 V +2 Hard +414 −68 updated 05/31/20, 07:58

Commit message

This change aims to reduce the amount of inline JavaScript by
removing `onchange` or `onclick` events and dynamically created
JavaScript code/settings.

* moves inline JavaScript for avatar handling to new SetupModule
* avoids using configuration options `onClick`, `onClickLabels`
  and `confirmData.jsCodeAfterOk` which contain inline JavaScript
* introduces configuration options `conformationData.eventName`
  and `clickData.eventName` to substitute mentioned deprecations
* adds PSR-14 `AddJavaScriptModulesEvent` which allows to apply
  custom RequireJS modules to handle mentioned new custom events

Review

  • Code review CR +2 Done
    • Oliver Hader +2
  • Verified V +2 Done
    • Oliver Hader +2
    • TYPO3com +1 CI

Issues 1

Files 9

Review log 3041

Show 1016 earlier messages
  1. Oliver Hader uploaded patch set 1 04/18/20, 09:26

  2. TYPO3com voted on patch set 1 V -1 04/18/20, 09:52 Completed build in 19m 38s on Sat, 18 Apr, 09:52 AM Test Summary: 3 of 74112 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2778

  3. Oliver Hader uploaded patch set 2 04/18/20, 13:12

  4. TYPO3com voted on patch set 2 V -1 04/18/20, 13:44 Completed build in 12m 30s on Sat, 18 Apr, 01:44 PM Test Summary: 522 of 64743 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2801

  5. Oliver Hader uploaded patch set 3 04/19/20, 21:13

  6. TYPO3com voted on patch set 3 V -1 04/19/20, 21:13 Completed build in 23s on Sun, 19 Apr, 09:13 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2860

  7. Oliver Hader uploaded patch set 4 04/19/20, 21:14

  8. Oliver Hader commented on patch set 4 04/19/20, 21:14

    This change is ready for review.
  9. Oliver Hader wrote 04/19/20, 21:15

    Topic set to inline-javascript
  10. TYPO3com voted on patch set 4 V -1 04/19/20, 21:26 Completed build in 11m 54s on Sun, 19 Apr, 09:26 PM Test Summary: 73306 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2861

  11. TYPO3com voted on patch set 4 V +1 04/19/20, 21:39 Completed build in 36m 36s on Sun, 19 Apr, 09:39 PM Test Summary: 73627 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2861

  12. Andreas Kienast uploaded patch set 5 04/20/20, 07:47

  13. Andreas Kienast voted on patch set 5 V +1 CR +1 04/20/20, 07:48

  14. TYPO3com voted on patch set 5 V +1 04/20/20, 08:00 Completed build in 12m 52s on Mon, 20 Apr, 08:00 AM Test Summary: 73627 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2872

  15. Benni Mack commented on patch set 5 CR -1 04/24/20, 08:56

    Either do not deprecate (which I would recommend strongly) or move the RST file to 10.4.x folder
  16. Oliver Hader commented on patch set 5 CR -1 04/24/20, 10:58

    Does not work anymore...
  1. Oliver Hader uploaded patch set 6 04/24/20, 11:42

  2. TYPO3com voted on patch set 6 V +1 04/24/20, 11:55 Completed build in 12m 48s on Fri, 24 Apr, 11:55 AM Test Summary: 73657 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3016

  3. Jonas Eberle commented on patch set 6 V +1 04/26/20, 11:13

    Didn't check custom event registration, just the functions within EXT:setup (Avatar and Reset User Settings).

    Important-91132-AvoidJavaScriptInUserSettingsConfigurationOptions.rst:43 Unresolved

    replaced
  4. Benni Mack commented on patch set 6 04/28/20, 10:24

    AddJavaScriptModulesEvent.php:23 Unresolved

    every new PSR-14 event should have a Feature.RST
  5. Oliver Hader uploaded patch set 7 04/28/20, 15:33

  6. TYPO3com voted on patch set 7 V +1 04/28/20, 15:45 Completed build in 11m 48s on Tue, 28 Apr, 03:45 PM Test Summary: 73661 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3096

  7. Jonas Eberle voted on patch set 7 V +1 04/28/20, 19:03

  8. Susi Moog commented on patch set 7 V -1 05/02/20, 12:18

    SetupModule.ts:29

    this part does not seem to work for me. The form does not submit when clicking the button / no reload is triggered.
  9. Oliver Hader commented on patch set 7 05/02/20, 12:21

    SetupModule.ts:29 Reply

    Please test again with having https://review.typo3.org/c/Packages/TYPO3.CMS/+/64311 applied...
  10. Susi Moog commented on patch set 7 V +1 CR +1 05/02/20, 12:24

    SetupModule.ts:29 Reply Unresolved

    👍
  11. Alexander Schnitzler commented on patch set 7 05/02/20, 12:39

    Services.yaml:11

    Please also check if this class should be shared or not. To me it seems that the controller isn't stateless and shouldn't be treated as such.
  12. Oliver Hader commented on patch set 7 05/02/20, 12:44

    Services.yaml:11 Reply

    > Please also check if this class should be shared or not. To me it seems that the controller isn't stateless and shouldn't be treated as such. Please go ahead and change it accordingly... I don't know the defaults for `shared`...
  13. Alexander Schnitzler commented on patch set 7 05/02/20, 12:48

    Services.yaml:11 Reply

    It depends a bit. All extbase controllers are marked as non shared e.g. because they are not stateless and it's likely a controller is instantiated multiple times per request. I am not sure about this controller in particular. My gut tells me we should set it to non shared but I will have a chat with Benjamin.
  14. Benjamin Franzke uploaded patch set 8 1 comment 05/02/20, 14:20

  15. TYPO3com voted on patch set 8 V +1 05/02/20, 14:31 Completed build in 11m 08s on Sat, 2 May, 02:31 PM Test Summary: 73663 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3167

  16. Oliver Hader commented on patch set 8 05/02/20, 15:44

    Services.yaml:11 Reply Unresolved

    Thanks for all the details and applying the change directly to this patch-set! :+1:
  17. Oliver Hader rebased onto patch set 9 05/19/20, 17:43

  18. TYPO3com voted on patch set 9 V +1 05/19/20, 17:55 Completed build in 11m 51s on Tue, 19 May, 05:55 PM Test Summary: 73799 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3463

  19. Susi Moog voted on patch set 9 V +1 CR +1 05/22/20, 20:09

  20. Benni Mack updated the commit message in patch set 10 05/25/20, 18:53

  21. Benni Mack voted on patch set 10 CR +1 05/26/20, 06:50

  22. Oliver Hader rebased onto patch set 11 05/27/20, 23:24

  23. TYPO3com voted on patch set 11 V +1 05/27/20, 23:53 Completed build in 29m 06s on Wed, 27 May, 11:53 PM Test Summary: 73709 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3597

  24. Oliver Hader commented on patch set 11 V +2 CR +2 05/31/20, 07:58

    Taking previous votes before commit message changes and rebasing to finally get it merged - the only functional change since then was in DI service configuration.
  25. Oliver Hader merged patch set 12 05/31/20, 07:58