Review 10.4 Abandoned

65052[TASK] Avoid inline JavaScript generated by BackendUtility:viewOnClick

Oliver Hader CR 0 V 0 Expert +833 −194 updated 12/03/20, 19:19

Commit message

Inline JavaScript produced by BackendUtility:viewOnClick is substituted
with markup based instructions and static JavaScript event handlers.

// basically delivers window.open(generatedUri)
BackendUtility::viewOnClick($pageId, $backPath, $rootLine, $section,
    $viewUri, $getVars, $switchFocus);

can be substituted with e.g.

\TYPO3\CMS\Backend\Routing\PreviewUriBuilder::create($pageId, $viewUri)
    ->withRootLine($rootLine)
    ->withSection($section)
    ->withAdditionalQueryParameters($getVars)
    ->serializeDispatcherAttributes([
        PreviewUriBuilder::OPTION_SWITCH_FOCUS => $switchFocus,
    ]);

which results in the following HTML data attributes
(data can be retrieved as array of complete element as well)

data-dispatch-action="TYPO3.WindowManager.localOpen"
data-dispatch-args="["https://...",null,"previewWin"]"

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 36

Show 16 more files

Review log 914

  1. Oliver Hader uploaded patch set 1 07/17/20, 12:05

  2. TYPO3com voted on patch set 1 V +1 07/17/20, 12:19 Completed build in 14m 13s on Fri, 17 Jul, 12:19 PM Test Summary: 73896 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC104-91

  3. Oliver Klee commented on patch set 1 07/17/20, 13:35

    EditDocumentController.php:192

    string|null
  4. Oliver Hader voted on patch set 1 CR -1 07/17/20, 14:37

  5. Oliver Hader uploaded patch set 2 07/17/20, 14:39

  6. Oliver Hader commented on patch set 2 07/17/20, 14:42

    Looking forward to reviews & tests (with actual votes), thx!

    EditDocumentController.php:192 Reply

    Done
  7. TYPO3com voted on patch set 2 V -1 07/17/20, 14:52 Completed build in 13m 03s on Fri, 17 Jul, 02:52 PM Test Summary: 1 of 74380 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC104-94

  8. TYPO3com voted on patch set 2 V +1 07/17/20, 15:09 Completed build in 42m 43s on Fri, 17 Jul, 03:09 PM Test Summary: 73896 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC104-94

  9. Andreas Kienast uploaded patch set 3 08/06/20, 08:25

  10. TYPO3com voted on patch set 3 V +1 08/06/20, 08:36 Completed build in 11m 42s on Thu, 6 Aug, 08:36 AM Test Summary: 74001 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC104-169

  11. Andreas Kienast uploaded patch set 4 08/08/20, 13:49

  12. TYPO3com voted on patch set 4 V +1 08/08/20, 14:17 Completed build in 15m 28s on Sat, 8 Aug, 02:17 PM Test Summary: 74015 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC104-188

  13. Oliver Klee wrote 08/08/20, 15:27

    Removed reviewer Oliver Klee.
  14. Oliver Hader abandoned the change 12/03/20, 19:19

    Giving up for 10.4