83643[TASK] Deprecate `@typo3/backend/document-save-actions`
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Garvin Hicking +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Stefan Bürk +2
- Garvin Hicking +1
- core-ci +1 CI
Issues 1
Files 9
- Build/Sources/TypeScript/backend/form/submit-interceptor.ts8new+66 −0
- Build/Sources/TypeScript/backend/document-save-actions.ts+2 −0
- Build/Sources/TypeScript/backend/form-engine-validation.ts+3 −2
- Build/Sources/TypeScript/scheduler/scheduler.ts+33 −4
- typo3/sysext/backend/Resources/Public/JavaScript/form/submit-interceptor.jsnew+13 −0
- typo3/sysext/backend/Resources/Public/JavaScript/document-save-actions.js+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/form-engine-validation.js+1 −1
- typo3/sysext/core/Documentation/Changelog/13.1/Deprecation-103528-DeprecatedDocumentSaveActionsModule.rst2new+69 −0
- typo3/sysext/scheduler/Resources/Public/JavaScript/scheduler.js+1 −1
Review log 1924
-
Andreas Kienast uploaded patch set 1 04/03/24, 14:02
-
core-ci voted on patch set 1 V -1 04/03/24, 14:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55266
-
Andreas Kienast uploaded patch set 2
V -104/03/24, 14:19 -
Andreas Kienast uploaded patch set 3 04/03/24, 14:20
-
core-ci voted on patch set 2 V +1 04/03/24, 14:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55268
-
core-ci voted on patch set 3 V +1 04/03/24, 14:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55269
-
Garvin Hicking uploaded patch set 4
V +104/03/24, 16:15docs -
core-ci voted on patch set 4 V +1 04/03/24, 16:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55274
-
Garvin Hicking commented on patch set 4 CR +1 V +1 04/03/24, 16:20
The scheduler doesn't yet feature the "Cmd+S" save action and I wonder if it should (maybe outside the scope of this PR of course)? Rest seems to work well also in conjunction with 83642 for me, tested a few variants (saving with/without keyboard, having validation kick in on empty fields) in macOS Chromium+FF. -
Andreas Kienast commented on patch set 4 04/03/24, 16:44
Reply
Absolutely, scheduler (and EXT:form) should make use of shortcuts as well. -
Simon Schaufelberger commented on patch set 4 04/03/24, 23:06
submit-interceptor.ts:54I would prefer early return here as there is no code after that and it would make the code more readable without deep nesting.Deprecation-103528-DeprecatedDocumentSaveActionsModule.rst:292 empty lines should be enough -
Andreas Kienast commented on patch set 4 04/04/24, 05:46
submit-interceptor.ts:54ReplyI don't see how this improves readability. Also, guard-clauses should be used to avoid the execution of methods as a whole.Deprecation-103528-DeprecatedDocumentSaveActionsModule.rst:29ReplyAcknowledged -
Andreas Kienast commented on patch set 5
CR +1V +104/04/24, 05:46Published edit on patch set 4. -
core-ci voted on patch set 5 V +1 04/04/24, 05:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55311
-
Garvin Hicking voted on patch set 5 CR +1 V +1 04/04/24, 05:58
-
Simon Schaufelberger voted on patch set 5 CR +1 04/05/24, 08:59
-
Simon Schaufelberger commented on patch set 5 CR 0 04/05/24, 09:02
submit-interceptor.ts:54how about: ``` if (e.submitter === null) { return; } if (e.submitter instanceof HTMLInputElement || e.submitter instanceof HTMLButtonElement) { e.submitter.disabled = true; } Icons.getIcon('spinner-circle', Icons.sizes.small).then((markup: string): void => { e.submitter.replaceChild(document.createRange().createContextualFragment(markup), e.submitter.querySelector('.t3js-icon')); }).catch(() => { // Catch error in case the promise was not resolved // e.g. loading a new page }); ``` -
Andreas Kienast commented on patch set 5 04/05/24, 09:43
submit-interceptor.ts:54ReplySorry, IMO this clutters the code even more. -
Simon Schaufelberger commented on patch set 5 04/05/24, 11:55
submit-interceptor.ts:54Replyimo it's much more readable as the main logic is not nested but on first level. -
Simon Schaufelberger commented on patch set 5 04/05/24, 11:56
submit-interceptor.ts:54Replythis is also how we write our rector rules. -
Garvin Hicking commented on patch set 5 04/05/24, 13:16
submit-interceptor.ts:54ReplyCode style discussions can often be a matter of taste, maybe we can break the cycle here. Since this affects JavaScript code that mostly Andreas and colleagues maintain, please let them pick their way of best readibility. Those who do the main work in that domain should IMO get that freedom to pick best formatting/logic sections for their work. (I understand in rector and for your work early returns work better for you, and that's your authoritative domain!) -
Simon Schaufelberger commented on patch set 5 CR +1 04/05/24, 14:22
submit-interceptor.ts:54ReplyThis shouldn't be a blocker or something, I just wanted to ask if he would agree to write it differently. My intention was not to tell him: Please do it like this but more like: What do you think about this way? -
Stefan Bürk voted on patch set 5 CR +2 V +2 04/05/24, 14:26
-
Stefan Bürk merged patch set 6 04/05/24, 14:26