Review main Merged

74748[BUGFIX] Late bind drag uploader

Andreas Kienast CR +2 V +2 Easy +7 −1 updated 06/03/22, 09:44

Commit message

If TCA with a file upload is used within IRRE (e.g. as done by
EXT:news), creating a new record or opening an existing record now sets
up the drag uploader.

As the DragUploader module is loaded independently from the FormEngine
main module, loading order may vary, rendering an event-based solution
unstable. To solve this issue without any major refactorings, a
MutationObserver is installed by the DragUploader module.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Oli Bartsch +1
    • Nikita Hovratov +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Oli Bartsch +1
    • Nikita Hovratov +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1518

  1. Andreas Kienast uploaded patch set 1 05/26/22, 15:24

  2. Andreas Kienast uploaded patch set 2 05/26/22, 15:26

  3. core-ci voted on patch set 1 V +1 05/26/22, 15:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27479

  4. core-ci voted on patch set 2 V +1 05/26/22, 15:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27480

  5. Georg Ringer voted on patch set 2 V +1 CR +1 05/26/22, 18:10

  6. Oli Bartsch commented on patch set 2 05/27/22, 09:24

    drag-uploader.ts:859

    This seem to now initialize the drag uploader multiple times. Did a quick test in filelist and got this line called around three to four times. Additionally, the initialization in 854 would be superfluous with this change, right?
  7. Andreas Kienast commented on patch set 2 05/27/22, 09:28

    drag-uploader.ts:859 Reply

    Not quite, the MutationObserver just kicks in for stuff that's added afterwards. This is unaffected by the document.ready handling above.
  8. Oli Bartsch updated the commit message in patch set 3 05/27/22, 10:16

  9. Oli Bartsch commented on patch set 3 V +1 CR +1 05/27/22, 10:16

    drag-uploader.ts:859 Reply

    Done
  10. core-ci voted on patch set 3 V +1 05/27/22, 10:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27490

  11. Nikita Hovratov voted on patch set 3 V +1 CR +1 05/27/22, 14:04

  12. Stefan Bürk commented on patch set 3 05/27/22, 16:05

    drag-uploader.ts:857

    Just questioning/nitpicking, as I could not find any "rule" for it. Should we not better use "@todo" to mark a todo in TypeScript/JavaScript ? This would more comply to the more often usage in php files as todo or deprecation commants ( @todo / @deprecated ) ? Or is "TODO" the way for JS/TS ? Not as blocker, just curious to know the definition here.
  13. Georg Ringer voted on patch set 3 V +2 CR +2 06/03/22, 03:23

  14. Georg Ringer merged patch set 4 06/03/22, 03:24

  15. Stefan Bürk commented on patch set 4 06/03/22, 06:54

    drag-uploader.ts:857 Reply

    Done
  16. Christian Kuhn commented on patch set 4 06/03/22, 08:54

    drag-uploader.ts:857 Reply

    please use "@todo" and "@deprecated" only. it's always a hassle to find TODO and similar, especially important when grepping for deprecated things. we should actually make this a hard rule and it would be great to CI test for this somehow. we've had a couple of places where we found a deprecated code section only years later again, just because it wasn't annotated correctly. for todo, it's not that bad, but we should still stick to *one* annotation.
  17. Andreas Kienast commented on patch set 4 06/03/22, 09:42

    drag-uploader.ts:857 Reply

    I'm sorry, that I couldn't react to this in a timely manner. Will push a patch asap.
  18. Andreas Kienast commented on patch set 4 06/03/22, 09:44