Review main Merged

92124[BUGFIX] Properly place TCA colorpicker in HTML dialogs

Richard Krikler CR +2 V +2 Easy +4 −1 updated 01/30/26, 11:43

Commit message

With the introduction of HTML native dialog-modals in the backend,
the placement TCA-type "Color" broke, as the color-picker will be
placed outside the `<dialog>`-element. [1]

To solve this issue, the parent-option of the "Alwan"-color-picker
is now defined point to the nearest dialog element. This
option has been added with alwan 2.3.0. [2]

[1] https://github.com/sefianecho/alwan/issues/17
[2] https://github.com/sefianecho/alwan/releases/tag/v2.3.0

Review

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

Issues 2

Files 2

Review log 3647

Show 1522 earlier messages
  1. Richard Krikler uploaded patch set 1 12/15/25, 15:22

  2. Richard Krikler updated the commit message in patch set 2 12/15/25, 15:23

  3. core-ci voted on patch set 1 V +1 12/15/25, 15:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92238

  4. core-ci voted on patch set 2 V +1 12/15/25, 15:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92239

  5. Josef Glatz updated the commit message in patch set 3 V +1 12/15/25, 15:38

  6. Garvin Hicking commented on patch set 3 12/15/25, 15:41

    Thanks a lot for investigating this and providing a patch already! Some minor notes to the format of the patch, I have not yet checked out the code but I'd say this should work ;)
    The line length of the commit message must be <= 72 characters (in the whole body, not just the first line) - also no trailing whitespace.
    Please add: ``` Related: #107443 ```

    package-lock.json:1

    I think this file does not need to be part of the commit?
  7. Garvin Hicking commented on patch set 3 12/15/25, 15:42

    (I vaguely remember that alwan had some issues which prevented us from updating to a newer version, but that's not exactly my area, I'll ask around)
  8. Josef Glatz commented on patch set 3 12/15/25, 15:42

    pls add also the used commands to update the packages
  9. core-ci voted on patch set 3 V +1 12/15/25, 15:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92242

  10. Richard Krikler uploaded patch set 4 V +1 12/15/25, 16:25

  11. Richard Krikler updated the commit message in patch set 5 12/15/25, 16:31

  12. core-ci voted on patch set 4 V +1 12/15/25, 16:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92245

  13. core-ci voted on patch set 5 V +1 12/15/25, 16:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92246

  14. Richard Krikler commented on patch set 5 12/15/25, 19:30

    Reply

    Thank you!

    Reply

    Done

    Reply

    Done

    package-lock.json:1 Reply

    Done
  15. Garvin Hicking commented on patch set 5 12/15/25, 20:05

    Reply

    Great, thanks. Asked Andi and he's not aware of issues why we couldn't/shouldn't update. Will try this patch tomorrow :)
  16. Garvin Hicking updated the commit message in patch set 6 V +1 12/16/25, 07:30

  17. Garvin Hicking commented on patch set 6 V -1 12/16/25, 07:34

    Sadly I face two issues with this: - The regular TCA color picker is now broken, text overlays the picker - In the extension config it works for "login.loginHighlightcolor" in "backend > login". But it does not work in the "styleguide" section below. Screenshots added to the forge issue.
  18. core-ci voted on patch set 6 V +1 12/16/25, 07:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92275

  19. Richard Krikler uploaded patch set 7 V +1 12/16/25, 10:19

  20. Richard Krikler commented on patch set 7 12/16/25, 10:22

    Reply

    Should be fixed: * color-picker parent-option is now given the nearest `<dialog>` or `<body>` tag * Removed `z-index: 1` from the color-picker-preview to prevent it showing through the color-picker
  21. Richard Krikler commented on patch set 7 12/16/25, 10:26

    Reply

    Targeting the dialog/body is necessary, as otherwise the color-picker would not be able to position itself above other elements (e.g. following input-fields).
  22. core-ci voted on patch set 7 V +1 12/16/25, 10:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92286

  1. Garvin Hicking commented on patch set 7 V +1 12/16/25, 11:30

    Great, thanks for being so quick. This looks good to me, I tested all variants of color pickers I could find. As for code review: I believe instead of `as any` we might want to use `as HTMLElement`? I think a `body` context should always exist, so a `HTMLElement` should be returned here in every case?
  2. Richard Krikler commented on patch set 7 12/16/25, 12:04

    Reply

    Thank you for testing so thoroughly! I've tried to use the type `HTMLElement` or `Element` before, but sadly only `any` did not result in the TypeScript error "TS2589: Type instantiation is excessively deep and possibly infinite."
  3. Garvin Hicking commented on patch set 7 12/18/25, 09:20

    Reply

    Hhhm, I see. However `as any` basically disables type definitions totally and I think there must be a way to not short-circuit it like that. Sadly I'm not able to do that on my own :-/
  4. Richard Krikler commented on patch set 7 12/19/25, 09:51

    Reply

    Ok... I talked about that with wolfgang@wazum.com. He came up with a better solution: Using a local/custom `ColorPickerOptions`-type, based on the type from alwan color-picker, it is possible to double-assert with `as unknown as`. This makes it possible to still have the correct types while also preventing the TS2589 TypeScript error.
  5. Richard Krikler uploaded patch set 8 V +1 12/19/25, 09:51

  6. core-ci voted on patch set 8 V +1 12/19/25, 10:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92467

  7. Garvin Hicking commented on patch set 8 12/19/25, 10:58

    Reply

    Hey cool, this sounds very promising. We talked this over today with a few core team members. Ideally we should upgrade to alwan also in v13 and adress the shortcomings there (which are just hidden because we do not use native dialogs there yet), and also benefit from better maintanenance on v13. There we also need to cover the picker properly displaying in all contexts (formengine, settings). That'll take a bit of time, and likely @ben@bnf.dev would like to have a look. I hope you can understand if during the christmas/new year time this might stay on the backburner until we can give feedback. But we'll definitely pick this up 😊 Thanks!
  8. Josef Glatz updated the commit message in patch set 9 V +1 12/19/25, 11:03

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

  10. Josef Glatz commented on patch set 9 CR +1 V +1 12/19/25, 11:16

    Reply

    I've adopted the git commit message: mention also the form engine field type color. @garvin@hick.ing what do you think of preparing v13 completely in another forge issue since v13 has no dialog element.
  11. Garvin Hicking commented on patch set 9 12/19/25, 11:47

    Reply

    Let's leave it at that. We can decide that internally when/if backporting. If you'd like to beforehand test the patch on v13 too you could create a cherry-pick of this issue and work with that. (But I think we can do that internally then)
  12. Richard Krikler commented on patch set 9 12/19/25, 13:20

    Reply

    Thank you @garvin@hick.ing, @typo3@josefglatz.at, @wolfgang@wazum.com ! 🎄
  13. Garvin Hicking commented on patch set 9 01/24/26, 23:09

    I've just rebased https://review.typo3.org/c/Packages/TYPO3.CMS/+/90936 - let's try to get this in for the alwan raise, and then this one? Fixing the merge conflict will only make sense then.
  14. Garvin Hicking commented on patch set 9 01/28/26, 16:33

    https://review.typo3.org/c/Packages/TYPO3.CMS/+/90936 this is merged now - can you rebase this, then alwan will already be available and the scope of the patch could allow us to merge this more easily
  15. Richard Krikler uploaded patch set 10 CR +1 V +1 01/29/26, 20:46

  16. Richard Krikler commented on patch set 10 01/29/26, 20:50

    Reply

    It is now rebased... but I'm not entirely sure but the `tsconfig.json` change necessary to make the build work. Due to TypeScript 7 changes it was necessary to add the path for alwan's types into tsconfig.json. Maybe an upstream patch to alwan `package.json` is required.
  17. core-ci voted on patch set 10 V +1 01/29/26, 20:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94600

  18. Garvin Hicking voted on patch set 10 CR +1 V +1 01/30/26, 09:31

  19. Benjamin Franzke uploaded patch set 11 CR +1 V +1 01/30/26, 10:58

  20. Benjamin Franzke commented on patch set 11 01/30/26, 10:58

    color-picker.ts:21

    This could have used `typeof Alwan.config`, but we can avoid picking the type by casting only the `parent` property to unknown. Adapted to do so.
  21. Garvin Hicking commented on patch set 11 CR +1 V +1 01/30/26, 11:19

    Works for me in all cases. @typo3@richardkrikler.at are you okay with the recent changes, then I'd go ahead and merge.
  22. Richard Krikler commented on patch set 11 01/30/26, 11:33

    Reply

    Sure, works well for me 👍
  23. core-ci voted on patch set 11 V +1 01/30/26, 11:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94645

  24. Garvin Hicking commented on patch set 11 CR +2 V +2 01/30/26, 11:42

    Thanks! :-)
  25. Garvin Hicking merged patch set 12 01/30/26, 11:43