Task #88182

Refactor JavaScript-side of IRRE

Added by Andreas Fernandez 9 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Should have
Category:
-
Start date:
2019-04-22
Due date:
% Done:

100%

TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

The current code base of IRRE isn't state of the art anymore and has some major flaws:

  • Interaction depends on method calls rendered via PHP (and executed via eval)
  • Only one action is allowed since there is a very pessimistic locking
  • Usage of JavaScript for fading animations
  • Permanent on-the-fly calculations of identifiers

Related issues

Related to TYPO3 Core - Bug #88658: Left over functions in TBE_EDITOR Closed 2019-06-30
Related to TYPO3 Core - Bug #89634: Setting avatar for backend users not possible anymore Closed 2019-11-11

Associated revisions

Revision 0842cea9 (diff)
Added by Andreas Fernandez 8 months ago

[!!!][TASK] Refactor client-side IRRE

This patch refactors the IRRE handling on client side, the JavaScript
land has been rewritten to have a better structure and do less repeating
on-the-fly calculations. Each IRRE container is represented by a
independent instance of InlineControlContainer.

Most of the internally used `scriptCall` directives have been removed.
Currently, `scriptCall` can't get removed completely, as further
refactorings in different areas are required.

All of the "external" communication via `inline.foobar()` has been
replaced by a event-driven approach. This also affects ElementBrowser
windows, those use a minimalistic API based on postMessage.

Some code that was never evaluated in ElementBrowser is considered dead
and has been removed regarding inserting multiple items.

A new sorting library has been added in order to replace jqueryui piece
by piece.

Executed command:

yarn add --dev sortablejs

On PHP side, some code has been removed as well since the rewritten client
code is event-based and doesn't depend on external calls anymore.

Resolves: #88182
Releases: master
Change-Id: I4176483d2882cef49fbaddb5e2e1914c1f76c908
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/59324
Tested-by: TYPO3com <>
Tested-by: Georg Ringer <>
Tested-by: Frank Naegler <>
Reviewed-by: Georg Ringer <>
Reviewed-by: Frank Naegler <>

Revision 16bfda49 (diff)
Added by Andreas Fernandez 7 months ago

[BUGFIX] Remove obsolete IRRE-related functions

With the refactoring of client-side IRRE, some functions in TBE_EDITOR
became obsolete. Those are removed now.

Resolves: #88658
Related: #88182
Releases: master
Change-Id: I3e667b70b9108befd88f1a7ee067d73cfffafeb2
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61196
Tested-by: TYPO3com <>
Tested-by: Daniel Goerz <>
Tested-by: Oliver Hader <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Björn Jacob <>
Reviewed-by: Daniel Goerz <>
Reviewed-by: Oliver Hader <>
Reviewed-by: Andreas Fernandez <>

Revision 1fd86304 (diff)
Added by Andreas Fernandez 3 months ago

[BUGFIX] Listen to message when setting an avatar

Due to the IRRE rewrite done in #88182 the avatar selection for backend
users broke, since the Setup module doesn't use FormEngine, yet.

The controller now adds dedicated JavaScript to listen to the
`typo3:elementBrowser:elementInserted` message sent by the Element
Browser to set the file reference uid correctly.

Resolves: #89634
Related: #88182
Releases: master
Change-Id: I5e6a56b35891ab380634540e9ed5ef0b3a96f082
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62292
Tested-by: TYPO3com <>
Tested-by: Oliver Bartsch <>
Tested-by: Georg Ringer <>
Reviewed-by: Oliver Bartsch <>
Reviewed-by: Georg Ringer <>

History

#1 Updated by Gerrit Code Review 9 months ago

  • Status changed from New to Under Review

Patch set 35 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59324

#2 Updated by Gerrit Code Review 9 months ago

Patch set 36 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59324

#3 Updated by Gerrit Code Review 9 months ago

Patch set 37 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59324

#4 Updated by Gerrit Code Review 9 months ago

Patch set 38 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59324

#5 Updated by Gerrit Code Review 9 months ago

Patch set 39 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59324

#6 Updated by Gerrit Code Review 9 months ago

Patch set 40 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59324

#7 Updated by Gerrit Code Review 9 months ago

Patch set 41 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59324

#8 Updated by Andreas Fernandez 8 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#9 Updated by Andreas Fernandez 7 months ago

  • Related to Bug #88658: Left over functions in TBE_EDITOR added

#10 Updated by Benni Mack 6 months ago

  • Status changed from Resolved to Closed

#11 Updated by Andreas Fernandez 3 months ago

  • Related to Bug #89634: Setting avatar for backend users not possible anymore added

Also available in: Atom PDF