86819[WIP][TASK] React on FormEngine mutations after initalization
Commit message
Review
-
Code review CR -2
- Andreas Kienast -2
-
Verified V -1
- core-ci -1 CI
Issues 1
Files 12
- Build/Sources/TypeScript/backend/form-engine/container/files-control-container.ts2+0 −10
- Build/Sources/TypeScript/backend/form-engine/container/flex-form-section-container.ts+0 −7
- Build/Sources/TypeScript/backend/form-engine/container/inline-control-container.ts+0 −10
- Build/Sources/TypeScript/backend/form-engine/container/site-language-container.ts+0 −10
- Build/Sources/TypeScript/backend/form-engine-validation.ts2+9 −2
- Build/Sources/TypeScript/backend/form-engine.ts3+41 −8
- typo3/sysext/backend/Resources/Public/JavaScript/form-engine/container/files-control-container.js+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/form-engine/container/flex-form-section-container.js+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/form-engine/container/inline-control-container.js+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/form-engine/container/site-language-container.js+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/form-engine-validation.js+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/form-engine.js+3 −3
Review log 5175
Show 3350 earlier messages
-
Andreas Kienast uploaded patch set 1 10/29/24, 09:23
-
Andreas Kienast uploaded patch set 2 10/29/24, 09:24
-
Andreas Kienast uploaded patch set 3 10/29/24, 09:25
-
core-ci voted on patch set 3 V +1 10/29/24, 09:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68772
-
Andreas Kienast uploaded patch set 4
V +110/29/24, 09:54 -
core-ci voted on patch set 4 V +1 10/29/24, 10:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68774
-
Andreas Kienast uploaded patch set 5
V +110/29/24, 10:00 -
core-ci voted on patch set 5 V +1 10/29/24, 10:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68775
-
Garvin Hicking voted on patch set 5 CR +1 V +1 10/29/24, 10:37
-
Andreas Kienast commented on patch set 5 CR -1 10/29/24, 10:43
-
Andreas Kienast uploaded patch set 6
CR +1V +110/29/24, 10:44 -
Andreas Kienast commented on patch set 6 10/29/24, 10:44
form-engine-validation.ts:92ReplyDone -
Andreas Kienast uploaded patch set 7 10/29/24, 10:49
-
core-ci voted on patch set 6 V -1 10/29/24, 10:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68776
-
core-ci voted on patch set 7 V +1 10/29/24, 10:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68777
-
Garvin Hicking voted on patch set 7 CR +1 V +1 10/29/24, 11:16
-
Andreas Kienast uploaded patch set 8
CR +1V +110/30/24, 09:01 -
core-ci voted on patch set 8 V +1 10/30/24, 09:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68833
-
Garvin Hicking voted on patch set 8 CR +1 V +1 10/30/24, 09:22
-
Benjamin Franzke commented on patch set 8 CR -1 10/30/24, 10:19
I think we should fix the issue in our CKEditor5 itself first (and backport to 12.4), then this `MutationObserver` refactoring (which I'm not against for *real* dynamic cases) is only needed for v14 (maybe v13 if you like). Please see: > https://review.typo3.org/c/Packages/TYPO3.CMS/+/86834 [BUGFIX] Prevent RTE CKEditor5 initialization race condition -
Andreas Kienast updated the commit message in patch set 9
CR +1V +110/30/24, 11:33 -
Andreas Kienast commented on patch set 9 CR -2 10/30/24, 11:33
-
core-ci voted on patch set 9 V +1 10/30/24, 11:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68846
-
Andreas Kienast uploaded patch set 10
V +110/31/24, 11:27Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
Andreas Kienast voted on patch set 10 CR 0 10/31/24, 11:27
-
core-ci voted on patch set 10 V +1 10/31/24, 11:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68911
-
Benjamin Franzke commented on patch set 10 11/04/24, 15:28
files-control-container.ts:381Hm, can the same mutation observer actually be moved into `FormEngine` (or at least used for `FormEngineValidation.initializeInputFields`) as well? -
Andreas Kienast uploaded patch set 11
V +111/06/24, 08:53 -
Andreas Kienast commented on patch set 10 11/06/24, 08:53
files-control-container.ts:381ReplyDone -
Andreas Kienast uploaded patch set 12 11/06/24, 08:54
-
core-ci voted on patch set 12 V -1 11/06/24, 09:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69139
-
core-ci voted on patch set 11 V -1 11/06/24, 09:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69138
-
Andreas Kienast uploaded patch set 13
V -111/06/24, 09:54 -
core-ci voted on patch set 13 V +1 11/06/24, 10:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69141
-
Andreas Kienast uploaded patch set 14
V +112/05/24, 15:13 -
core-ci voted on patch set 14 V +1 12/05/24, 15:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70664
-
Andreas Kienast commented on patch set 14 CR -1 12/05/24, 15:33
I want to check some performance matters regarding the consecutive call to `.validate()`. -
Andreas Kienast uploaded patch set 15
CR -1V +112/06/24, 08:51 -
core-ci voted on patch set 15 V +1 12/06/24, 08:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70695
-
Andreas Kienast commented on patch set 15 12/06/24, 09:30
Reply
Done -
Garvin Hicking uploaded patch set 16
V +112/11/24, 09:03Fix merge conflict -
core-ci voted on patch set 16 V +1 12/11/24, 09:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70902
-
Garvin Hicking commented on patch set 16 CR +1 V +1 12/11/24, 10:11
Tested this and tried to break it for an hour (in several formengine contexts, with large and small datasets, with and without irre, dynamically injecting DOM); works quite well dynamically for me. Tested on macOS, Chromium 131.0.6778.108 and Firefox 132.0.2 -
Andreas Kienast uploaded patch set 17
CR +1V +112/11/24, 10:14 -
core-ci voted on patch set 17 V +1 12/11/24, 10:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70910
-
Andreas Kienast uploaded patch set 18
V +112/11/24, 10:34 -
core-ci voted on patch set 18 V +1 12/11/24, 10:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70912
-
Garvin Hicking voted on patch set 18 CR +1 V +1 12/11/24, 10:56
-
Andreas Kienast uploaded patch set 19
CR +1V +112/20/24, 10:14 -
core-ci voted on patch set 19 V +1 12/20/24, 10:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71502
-
Garvin Hicking voted on patch set 19 CR +1 V +1 12/20/24, 10:33
-
Garvin Hicking wrote 01/13/25, 09:24
Topic set to FormEngine -
Andreas Kienast uploaded patch set 20
CR +1V +101/15/25, 08:17 -
core-ci voted on patch set 20 V +1 01/15/25, 08:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72506
-
Garvin Hicking voted on patch set 20 CR +1 V +1 01/15/25, 10:06
-
Garvin Hicking commented on patch set 20 01/15/25, 12:04
Note: I tested this again like this: 1. Pick a EXT:styleguide "Form Engine - required" element 2. Go to tab "Inline", "inline_2" for example 3. Create a new inline child 4. Use DOM inspector to figure out the wrapping ID of the child 5. Use Browser console to manipulate DOM and manually attaching a new child, insert the ID above as selector: ``` // IRRE selector = 'data-3308-tx_styleguide_required-8-inline_2-tx_styleguide_required_inline_2_child-NEW67879be37c556519338462_fields'; oldElement = document.getElementById(selector); newElement = oldElement.cloneNode(true); newElement.id = selector + (BigInt(Date.now()) * 1000n + BigInt(Math.floor(performance.now() * 1000))).toString(); oldElement.parentNode.insertBefore(newElement, oldElement.nextSibling); ``` 6. Verify the duplicated element reacts to validation / review engine Then did the same for a flatpickr field, and an RTE field: ``` // flatpickr // Cloning is painful, do it fresh. selector = 'formengine-input-67879f45cfdb8334220372'; newSelector = selector + (BigInt(Date.now()) * 1000n + BigInt(Math.floor(performance.now() * 1000))).toString(); oldElement = document.querySelector('[recordfieldid="' + selector + '"]'); newElement = oldElement.cloneNode(true); newElement.setAttribute('recordfieldid', newSelector); newElement.innerHTML = ` <div class="form-control-wrap" style="max-width: 204px"> <div class="form-wizards-wrap"> <div class="form-wizards-item-element"> <div class="input-group"> <input type="text" id="${newSelector}" class="form-control form-control-clearable t3js-clearable" data-input-type="datetimepicker" data-date-type="date" data-formengine-validation-rules="[{"type":"required"}]" data-formengine-input-params="{"field":"data[tx_styleguide_required][8][input_2]","evalList":"date"}" data-formengine-input-name="data[tx_styleguide_required][8][input_2]"/> <input type="hidden" name="data[tx_styleguide_required][8][input_2]" value="2024-12-31T00:00:00+00:00"/> <button class="btn btn-default" aria-label="Open date picker" type="button" data-global-event="click" data-action-focus="#${newSelector}"> <span class="t3js-icon icon icon-size-small icon-state-default icon-actions-edit-pick-date" data-identifier="actions-edit-pick-date" aria-hidden="true"> <span class="icon-markup"> <svg class="icon-color"><use xlink:href="/_assets/1ee1d3e909b58d32e30dcea666dd3224/Icons/T3Icons/sprites/actions.svg#actions-calendar-alternative"/></svg> </span> </span> </button> </div> </div> </div> </div>`; oldElement.parentNode.insertBefore(newElement, oldElement.nextSibling); ``` ``` // RTE selector = 'data_tx_styleguide_required__8__rte_1_ckeditor5'; oldElement = document.getElementById(selector); newElement = oldElement.cloneNode(true); newElement.id = selector + (BigInt(Date.now()) * 1000n + BigInt(Math.floor(performance.now() * 1000))).toString(); oldElement.parentNode.insertBefore(newElement, oldElement.nextSibling); ``` In all cases the mutation event took care to propagate the new DOM elements to the validation and its review block. -
Garvin Hicking rebased onto patch set 21
CR +1V +101/15/25, 12:29 -
Garvin Hicking commented on patch set 21 CR +1 V +1 01/15/25, 12:31
sorry, inadvertant creation of a relation chain due to cherry-picking messup on my side -
core-ci voted on patch set 21 V +1 01/15/25, 12:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72516
-
Andreas Kienast uploaded patch set 22
CR +1V +101/16/25, 09:09 -
core-ci voted on patch set 22 V +1 01/16/25, 09:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72551
-
Garvin Hicking voted on patch set 22 CR +1 V +1 01/16/25, 10:08
-
Andreas Kienast uploaded patch set 23
CR +1V +102/20/25, 15:55 -
core-ci voted on patch set 23 V +1 02/20/25, 16:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74471
-
Garvin Hicking voted on patch set 23 CR +1 V +1 02/20/25, 16:10
-
Oliver Hader commented on patch set 23 02/21/25, 11:05
form-engine.ts:681I guess there might be scenarios, when handling these DOM mutations, would cause new DOM mutations - and thus, probably unexpected loops. For instance, `FormEngine.reinitialize()` might invoke `HTMLInputElement.prototype.clearable` (in `@typo3/backend/input/clearable`), which seems to modify the DOM that is observed. -
Andreas Kienast uploaded patch set 24
CR +1V +104/01/25, 12:26 -
Andreas Kienast commented on patch set 24 04/01/25, 12:27
form-engine.ts:681Reply UnresolvedI agree. Do you have an idea how this may be circumvented? -
core-ci voted on patch set 24 V +1 04/01/25, 12:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76778
-
Andreas Kienast uploaded patch set 25
V +107/15/25, 10:31 -
core-ci voted on patch set 25 V +1 07/15/25, 10:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81735
-
Andreas Kienast commented on patch set 25 CR -2 07/15/25, 10:53
form-engine.ts:664UnresolvedThis will still cause issues as mentioned by Olly. -
Andreas Kienast uploaded patch set 26
V +107/17/25, 08:10Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 26 V -1 07/17/25, 08:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81817
-
Andreas Kienast abandoned the change 03/11/26, 16:25
Not planning to work on this soon.
form-engine-validation.ts:92