Review main Merged

61706[BUGFIX] Generate notification action on rendering

Andreas Kienast CR +2 V +2 Normal +161 −86 updated 09/24/19, 10:35

Commit message

Due to scoping issues if a notification is generated in an iframe, the
actions are now generated when the notification is rendered.

This requires a change how the payload is passed to the notification,
instead of the action instance it now contains the action type and the
callback. The action instance is generated by a factory class.

To bypass issues with browser's garbage collection that kicks in when an
iframe changes, the callback methods are stringified and immediately
recovered by eval().

Review

  • Code review CR +2 Done
    • Frank Nägler +2
    • Tobi Kretschmann +1
    • Steffen Frese +1
  • Verified V +2 Done
    • Frank Nägler +2
    • Tobi Kretschmann +1
    • TYPO3com +1 CI

Issues 1

Files 11

Review log 1925

  1. Andreas Kienast uploaded patch set 1 09/14/19, 08:11

  2. TYPO3com voted on patch set 1 V -1 09/14/19, 08:20 Completed build in 08m 33s on Sat, 14 Sep, 08:20 AM Test Summary: 2 of 47916 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36449

  3. Andreas Kienast uploaded patch set 2 09/14/19, 14:12

  4. TYPO3com voted on patch set 2 V +1 09/14/19, 14:21 Completed build in 08m 54s on Sat, 14 Sep, 02:21 PM Test Summary: 47556 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36453

  5. Andreas Kienast uploaded patch set 3 09/16/19, 07:25

  6. TYPO3com voted on patch set 3 V +1 09/16/19, 07:38 Completed build in 10m 54s on Mon, 16 Sep, 07:38 AM Test Summary: 47556 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36464

  7. Andreas Kienast commented on patch set 3 CR -2 09/16/19, 09:57

    Still broken.
  8. Andreas Kienast uploaded patch set 4 09/16/19, 10:32

  9. TYPO3com commented on patch set 4 09/16/19, 10:44 Completed build in 11m 23s on Mon, 16 Sep, 10:44 AM Test Summary: 47556 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36466

  10. Andreas Kienast uploaded patch set 5 09/17/19, 09:29

  11. TYPO3com voted on patch set 5 V -1 09/17/19, 09:39 Completed build in 10m 03s on Tue, 17 Sep, 09:39 AM Test Summary: 2 of 47916 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36492

  12. Andreas Kienast uploaded patch set 6 09/17/19, 09:56

  13. TYPO3com voted on patch set 6 V +1 09/17/19, 10:06 Completed build in 09m 52s on Tue, 17 Sep, 10:06 AM Test Summary: 47555 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36496

  14. Frank Nägler voted on patch set 6 V +1 CR +1 09/17/19, 10:25

  15. Andreas Kienast voted on patch set 6 CR 0 09/17/19, 10:50

  16. Tobi Kretschmann voted on patch set 6 V +1 CR +1 09/17/19, 12:47

  17. Steffen Frese voted on patch set 6 CR +1 09/17/19, 12:49

  18. Frank Nägler voted on patch set 6 V +2 CR +2 09/17/19, 12:58

  19. Frank Nägler merged patch set 7 09/17/19, 12:59

  20. Oliver Hader commented on patch set 7 09/17/19, 13:03

    post -1 since it introduces eval()
  21. Andreas Kienast commented on patch set 7 09/17/19, 13:09

    > Patch Set 7: > > post -1 since it introduces eval() After fiddling three days with this scoping issue, we didn't find another solution, since browser's GC removes any reference to callbacks that were defined in an iframe once the src of the iframe changes. Binding to window.top and similar hacks didn't work.
  22. Frank Nägler commented on patch set 7 09/17/19, 13:21

    > post -1 since it introduces eval() Let's talk about it, we introduced this by intention and talked about the impact. From our point of view, there is no difference between the callback function and the eval call. both are defined in the scope of the user who implements the notification. I guess it makes more sense to discuss this in a call with Andy and me.
  23. Oliver Hader commented on patch set 7 09/17/19, 16:38

    How can the behaviour this change aims to fix be reproduced? I could not find description in the forge ticket...
  24. Andreas Kienast commented on patch set 7 09/17/19, 17:58

    > Patch Set 7: > > How can the behaviour this change aims to fix be reproduced? I could not find description in the forge ticket... I've updated the ticket and added a code sample that fails prior this patch.
  25. Andreas Kienast wrote 09/24/19, 10:35

    Created a revert of this change as I6f6f1b7040dc9ed6b93c115983a2124752ae0327