Task #87324

Split FormEngine.js into smaller chunks

Added by Andreas Fernandez 6 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Should have
Category:
FormEngine aka TCEforms
Start date:
2019-01-03
Due date:
% Done:

100%

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

Description

FormEngine.js is a very large file that contains most of the logic for any field rendered by FormEngine. The JavaScript should be split into smaller chunks to be able to load only the parts that are necessary in an FormEngine instance.


Related issues

Related to TYPO3 Core - Bug #87908: Outdated TS build with #87324 Closed 2019-03-14
Related to TYPO3 Core - Bug #87925: Delete item from group field broken Closed 2019-03-15
Related to TYPO3 Core - Bug #88314: "Revert selection" in master broken for e.g. permissions Closed 2019-05-09

Associated revisions

Revision 2f99b84b (diff)
Added by Andreas Fernandez 3 months ago

[TASK] Split FormEngine.js

This patch splits the FormEngine.js into smaller, logically separated
parts. This increases readability and maintainability and has a positive
effect on the client's performance as only the required code is loaded.

Not every aspect of the FormEngine JavaScript is handled here yet, since
other areas, e.g. IRRE, need refactoring as well.

Resolves: #87324
Releases: master
Change-Id: I6704445254a524f8ed3152ab6b0b7105fb97d65a
Reviewed-on: https://review.typo3.org/c/58608
Tested-by: TYPO3com <>
Tested-by: André Schließer <>
Tested-by: Susanne Moog <>
Tested-by: Frank Naegler <>
Reviewed-by: André Schließer <>
Reviewed-by: Susanne Moog <>
Reviewed-by: Frank Naegler <>

Revision fe6e678d (diff)
Added by Andreas Fernandez 3 months ago

[BUGFIX] Fix broken TS build due to outdated patch

The patch for issue #87324 was based on outdated tslint configuration,
which causes all TypeScript builds to fail. The build is now fixed
by executing

cd Build
./node_modules/tslint/bin/tslint -c tslint.json --fix --project .

Resolves: #87908
Related: #87324
Releases: master
Change-Id: I1447dd98aba693756f64308c048a5da199a505df
Reviewed-on: https://review.typo3.org/c/60245
Tested-by: Andreas Fernandez <>
Reviewed-by: Andreas Fernandez <>

Revision eb85fcf8 (diff)
Added by Andreas Fernandez 3 months ago

[BUGFIX] Check if field exists when deleting items from `group` field

Fields of type `group` don't have a visible counterpart as opposed to
`selectMultipleSideBySide`. Thus, we have to check whether such field
exists before trying to interact with that field.

Resolves: #87925
Related: #87324
Releases: master
Change-Id: Ic8608e065b155949d15ab8d576e30f8d7f8d86db
Reviewed-on: https://review.typo3.org/c/60259
Reviewed-by: Frank Naegler <>
Reviewed-by: Susanne Moog <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Frank Naegler <>
Tested-by: TYPO3com <>
Tested-by: Andreas Fernandez <>

Revision 7c328484 (diff)
Added by Andreas Fernandez about 2 months ago

[BUGFIX] Migrate "Revert selection" of SelectCheckboxElement

With #87324 parts of the FormEngine have been split into smaller,
maintainable parts. However, `SelectCheckboxElement` brings it's own
"Revert selection" implementation that has nothing in common with the
"Reset selection" field control used for select boxes.

The code is now rewritten to handle the revert on its own. Additionally,
another inline `onclick` handler was removed.

Resolves: #88314
Related: #87324
Releases: master
Change-Id: Ifca1b67a960a8caab8145f2a7d5c8301918819fa
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60728
Tested-by: Frank Naegler <>
Tested-by: TYPO3com <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Frank Naegler <>
Reviewed-by: Andreas Fernandez <>

History

#1 Updated by Gerrit Code Review 6 months ago

  • Status changed from In Progress to Under Review

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

#2 Updated by Gerrit Code Review 6 months ago

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

#3 Updated by Gerrit Code Review 5 months ago

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

#4 Updated by Andreas Fernandez 3 months ago

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

#5 Updated by Andreas Fernandez 3 months ago

  • Related to Bug #87908: Outdated TS build with #87324 added

#6 Updated by Andreas Fernandez 3 months ago

  • Related to Bug #87925: Delete item from group field broken added

#7 Updated by Benni Mack about 2 months ago

  • Status changed from Resolved to Closed

#8 Updated by Andreas Fernandez about 2 months ago

  • Related to Bug #88314: "Revert selection" in master broken for e.g. permissions added

Also available in: Atom PDF