Review main Merged

88511[BUGFIX] Avoid layout shifts when dragging content blocks in Page module

Benjamin Kott CR +2 V +2 Normal +141 −69 updated 03/10/25, 12:25

Commit message

We now use appropriate move icons to indicate the desired actions and
visualize this in the tooltip. Previously, information about pressing
"Control" to copy an element instead of moving it caused layout shifts.
This issue arose because the information was not migrated correctly and
was previously attached to the drag preview.

With the adoption of the new DragTooltip API, we ensure a more natural
behavior. Instead of displaying the help text, we update the cursor and
status icon in the tooltip to reflect the desired action. This approach
aligns with the standard behavior on operating systems.

Additionally, the detection of whether a copy action is requested has
been adjusted to work with the Option key on macOS. This is now also
properly forwarded to the modal to actually perform the requested action.

Review

  • Code review CR +2 Done
    • Benjamin Kott +2
    • Benjamin Franzke +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Benjamin Kott +2
    • Benjamin Franzke +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 2

Files 17

Review log 3545

Show 1420 earlier messages
  1. Benjamin Kott uploaded patch set 1 03/06/25, 13:21

  2. core-ci voted on patch set 1 V +1 03/06/25, 13:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75223

  3. Benjamin Kott uploaded patch set 2 V +1 03/06/25, 14:28

  4. core-ci voted on patch set 2 V +1 03/06/25, 14:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75224

  5. Georg Ringer voted on patch set 2 CR +1 V +1 03/06/25, 20:15

  6. Andreas Kienast commented on patch set 2 V -1 03/07/25, 07:21

    Funny bug in Safari – I get trapped in copy mode by doing the following: 1. Press Option key to start a copy action 2. Drag a content element 3. Decide to abort the action 4. Do not press Option key anymore 5. Drop element somewhere but in a drop area After this I'm trapped, the next drag automatically starts in copy mode. If I swap (4) and (5), this does not occur.
  7. Benjamin Kott uploaded patch set 3 CR +1 V +1 03/07/25, 11:22

  8. core-ci voted on patch set 3 V +1 03/07/25, 11:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75293

  9. Benjamin Kott uploaded patch set 4 V +1 03/07/25, 11:34

  10. core-ci voted on patch set 4 V +1 03/07/25, 11:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75294

  11. Benjamin Kott uploaded patch set 5 V +1 03/07/25, 12:46

  12. Benjamin Kott commented on patch set 5 03/07/25, 12:51

    Reply

    resolved
  13. core-ci voted on patch set 5 V +1 03/07/25, 12:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75299

  14. Benjamin Franzke voted on patch set 5 CR +1 V +1 03/07/25, 12:56

  15. Andreas Kienast voted on patch set 5 CR +1 V +1 03/07/25, 13:55

  16. Oli Bartsch voted on patch set 5 CR +1 V +1 03/07/25, 15:36

  17. Oli Bartsch commented on patch set 5 CR 0 V -1 03/07/25, 18:34

    Copy actually does still not work for me. Only moving is possible. I think we are currently miss to set "makeCopy" as queryParam on the move element ajax call in page-tree.ts Therefore, the move modal is not "executed" in copy mode, leading to always moving the element.
  18. Oli Bartsch uploaded patch set 6 CR +1 V +1 03/07/25, 20:49

  19. Oli Bartsch commented on patch set 6 CR +1 V +1 03/07/25, 20:52

    Reply

    The requested action is now fetched in page-tree and forwarded to the move element controller. Additionally, I updated the move element component to properly display the requested action also in the headline. I'm not quite sure about the public isCopyModifierFromEvent() method in drag-drop but don't wanted to duplicate the code. However, please adjust as youn like.
  20. core-ci voted on patch set 6 V +1 03/07/25, 20:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75326

  1. Benjamin Kott commented on patch set 6 CR -1 03/10/25, 07:29

    we now have a dependency between the pagetree and the page layout js this needs to be broken up
  2. Benjamin Kott commented on patch set 6 03/10/25, 07:34

    Reply

    also the copy modifier is not catched on windows and linux when hovering the pagetree
  3. Oli Bartsch commented on patch set 6 03/10/25, 08:09

    Reply

    The dependency to drag-drop actually has been there before by importing "ContentElementDragDropData"
  4. Benjamin Franzke commented on patch set 6 03/10/25, 08:25

    Reply

    No, `ContentElementDragDropData` is a type import, that's a build-time dependency, not a runtime dependency. This became more clear with the following patch: https://review.typo3.org/c/Packages/TYPO3.CMS/+/88248/10/Build/Sources/TypeScript/backend/tree/page-tree.ts
  5. Benjamin Kott uploaded patch set 7 CR +1 V +1 03/10/25, 08:53

  6. Benjamin Kott commented on patch set 7 03/10/25, 08:56

    Reply

    Done
  7. core-ci voted on patch set 7 V +1 03/10/25, 08:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75395

  8. Benjamin Franzke voted on patch set 7 CR +1 V +1 03/10/25, 09:01

  9. Andreas Kienast voted on patch set 7 CR +1 V +1 03/10/25, 10:25

  10. Benjamin Kott voted on patch set 7 CR +2 V +2 03/10/25, 10:38

  11. Benjamin Franzke voted on patch set 7 CR 0 V -1 03/10/25, 10:55

  12. Benjamin Kott uploaded patch set 8 CR +1 V +1 03/10/25, 11:15

  13. core-ci voted on patch set 8 V +1 03/10/25, 11:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75406

  14. Benjamin Kott uploaded patch set 9 V +1 03/10/25, 11:23

  15. core-ci voted on patch set 9 V +1 03/10/25, 11:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75407

  16. Benjamin Franzke voted on patch set 9 CR +1 V +1 03/10/25, 11:45

  17. Andreas Kienast commented on patch set 9 03/10/25, 11:56

    move-page.ts:54

    message If this is fixed, this patch obsoletes https://review.typo3.org/c/Packages/TYPO3.CMS/+/88535.
  18. Andreas Kienast commented on patch set 9 03/10/25, 11:58

    move-content-element.ts:87

    message
  19. Benjamin Kott uploaded patch set 10 CR +1 V +1 03/10/25, 12:12

  20. Benjamin Kott commented on patch set 10 03/10/25, 12:12

    move-content-element.ts:87 Reply

    Done

    move-page.ts:54 Reply

    Done
  21. Benjamin Franzke voted on patch set 10 CR +1 V +1 03/10/25, 12:14

  22. Andreas Kienast voted on patch set 10 CR +1 V +1 03/10/25, 12:15

  23. Benjamin Kott voted on patch set 10 CR +2 V +2 03/10/25, 12:18

  24. core-ci voted on patch set 10 V +1 03/10/25, 12:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75413

  25. Benjamin Kott merged patch set 11 03/10/25, 12:25