Review main Abandoned

59069[WIP][BUGFIX] Avoid deprecated synchronous AJAX requests

Andreas Kienast CR 0 V 0 Normal +110 −71 updated 05/02/19, 14:14

Commit message

jQuery's AJAX API allows a developer to use synchronous AJAX requests.
However, this setting is deprecated as this feature blocks UI rendering.

The PersistentStorage API now uses Promises instead, if explicitly
required requested to provide a backward-compatible layer.

TODO:
- Check for other occurrences
- Write ReST

Review

  • Code review CR 0
  • Verified V 0

Files 8

Review log 79

  1. Andreas Kienast uploaded patch set 1 12/09/18, 17:17

  2. Andreas Kienast uploaded patch set 2 12/09/18, 17:19

  3. TYPO3com voted on patch set 1 V +1 12/09/18, 17:28 Completed build in 11m 09s on Sun, 9 Dec, 06:28 PM Test Summary: 48716 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-30556

  4. Oliver Hader commented on patch set 2 12/09/18, 17:29

    Persistent.ts:32

    btw: Why isn't this defined as real function, but as a property pointing to a closure?
  5. TYPO3com voted on patch set 2 V +1 12/09/18, 17:32 Completed build in 12m 53s on Sun, 9 Dec, 06:32 PM Test Summary: 48716 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-30557

  6. Oliver Hader commented on patch set 2 12/09/18, 17:37

    Persistent.ts:177

    This assignment won't work anymore when being invoked asynchronous... last resolve wins...

    Persistent.ts:178

    I did not look into jQuery API - does return implicit trigger resolve?

    Persistent.ts:183

    Is it possible to use the $.ajax promise already? The `resolve(me.data)`part won't work asynchronously
  7. Andreas Kienast commented on patch set 2 12/09/18, 17:37

    Persistent.ts:32 Reply

    This code was one of my first TS experience and I didn't know better back then.
  8. Oliver Hader commented on patch set 2 12/09/18, 17:39

    Persistent.ts:33

    Why? We should use proper scoping instead...
  9. Andreas Kienast abandoned the change 05/02/19, 14:14