Review main Merged

89620[BUGFIX] Cleanup focusArea boxes when switching aspect ratio

Benjamin Franzke CR +2 V +2 Normal +26 −34 updated 06/23/25, 12:46

Commit message

Make sure to clean up focus area boxes from markup instead
of relying on possibly stale references. Also avoid race
conditions when updating focus areas by avoiding asynchronous
initialization, to avoid having to synchronize cleanups of
two consecutive state updates.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Oli Bartsch +1
    • Garvin Hicking +1
    • Benni Mack +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Oli Bartsch +1
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 2

Files 8

Review log 1317

  1. Benjamin Franzke uploaded patch set 1 06/04/25, 05:51

  2. core-ci voted on patch set 1 V +1 06/04/25, 05:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79829

  3. Garvin Hicking commented on patch set 1 V -1 06/04/25, 07:46

    THanks for addressing this! When I first open the crop window, the focus area is not movable for me. Once I change to another definition (from "Desktop wide" to "Desktop" for example) and back, it gets movable. Sometimes it also directly works - so this feels like a race condition to me? Another thing changes with this patch: The right-hand preview does not show the focus areas properly sized. The box sizes are differing much in size from the real image.
  4. Benjamin Franzke uploaded patch set 2 V +1 06/04/25, 09:53

  5. Benjamin Franzke commented on patch set 2 06/04/25, 09:53

    Reply

    Thanks for noticing. Indeed a race condition that happened because I removed the await for the module load of the web component implemenetation. That caused the properties that were set by image-manipulation.ts (especially pointEventNames) to be overwritten by the web component itself. I've now moved to using attributes in order to ensure the web component picks up the correct state.
  6. core-ci voted on patch set 2 V +1 06/04/25, 10:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79845

  7. Garvin Hicking commented on patch set 2 V -1 06/04/25, 13:14

    The race condition I could no longer reproduce now, thx. However two issues persist: * The thumb preview on the right side shows wrong focus area sizes (unchanged to PS1) * Picking EXT:styleguide tca_10 and "Tablet/Smartphone", the focus area cannot be moved, seems to have an invisible bounding box? Funnily, when you use the lower left(!) resize handle, it moves past this bounding box. I do notice my tca_10 kind-of random values for the focus area were not that great, some boxes are just too large to fit into the croparea, and some are too small (for the "Portrait (Tall)" variant. Maybe we could fix this as a drive-by, else I can do a distinct follow-up patch.
  8. Benjamin Franzke uploaded patch set 3 V +1 06/05/25, 03:31

  9. core-ci voted on patch set 3 V +1 06/05/25, 03:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79896

  10. Garvin Hicking updated the commit message in patch set 4 V +1 06/05/25, 05:04

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

  12. Benjamin Franzke commented on patch set 4 06/05/25, 06:02

    Reply

    Thanks, the CSS changes did not work because of specificity, causing the focus area to appear in wrong size, the thumb was actually correct, but the main focus are was drawn incorrectly. I guess this also fixed the issue with focus area's not movable with the example (at least I couldn't see it anymore), ohterwise let's fix that as a drive-by, if still needed.
  13. Benni Mack voted on patch set 4 CR +1 06/05/25, 07:17

  14. Garvin Hicking commented on patch set 4 CR +1 V +1 06/05/25, 07:21

    Great! Works for me and I could not break it :-) I've decided to create another follow-up for changes in the EXT:styleguide example to not mix this with this specific patch: https://review.typo3.org/c/Packages/TYPO3.CMS/+/89638 [TASK] Add EXT:styleguide imagemanipulation example group_db_4
  15. Oli Bartsch voted on patch set 4 CR +1 V +1 06/23/25, 10:50

  16. Benjamin Franzke voted on patch set 4 CR +2 V +2 06/23/25, 12:46

  17. Benjamin Franzke merged patch set 5 06/23/25, 12:46