Review main Merged

93778[BUGFIX] Allow adding entries to an empty settings stringlist

Wolfgang Klinger CR +2 V +2 Normal +98 −1 updated 06/23/26, 17:38

Commit message

The Site Settings editor renders the add (+) and remove (-)
buttons as part of each stringlist row. When the value list
is empty, because no default is declared or all entries were
removed, the editor exposes no control to add a first entry
and the user is stuck. The outer <label for="..."> also loses
its target input, breaking click-to-focus and accessibility.

Exposes a +-button when an empty list is provided, to
allow adding entries in this case.

Review

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

Issues 1

Files 3

Review log 1521

  1. Wolfgang Klinger uploaded patch set 1 04/21/26, 11:40

  2. core-ci voted on patch set 1 V +1 04/21/26, 11:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100636

  3. Benni Mack updated the commit message in patch set 2 V +1 04/22/26, 06:50

  4. core-ci voted on patch set 2 V -1 04/22/26, 12:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100810

  5. core-ci voted on patch set 2 V +1 04/22/26, 19:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100810

  6. Garvin Hicking commented on patch set 2 04/22/26, 22:08

    This is pretty nice, thanks for catching it and contributing a fix! Much appreciated! There's one small problem: The `<label>` has a `for=...` attribute that points to the first input field, but in the case the button is shown, no input element can be focussed. Honestly UX wise I would prefer to make the stringlist always emit one (empty) line, no matter if it's a yaml entries with an empty setting or `[]`. So `[]` and `['']` should IMO both result in that one first input line. What do you think? Would you like to try to modify the patch towards that @wolfgang@wazum.com?
  7. Garvin Hicking commented on patch set 2 04/22/26, 22:14

    Reply

    Something like: ``` - const value = this.value || []; + const value = (this.value && this.value.length > 0) ? this.value : ['']; ```
  8. Wolfgang Klinger uploaded patch set 3 V +1 04/23/26, 06:39

  9. core-ci voted on patch set 3 V +1 04/23/26, 06:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100989

  10. Garvin Hicking updated the commit message in patch set 4 V +1 04/23/26, 07:51

  11. Garvin Hicking commented on patch set 4 04/23/26, 07:54

    Reply

    Thanks for the update. I still see an issue sadly: If you enter 3 values and then want to remove all three values, the last input box no longer has a "delete" icon but instead contains a value still. Maybe the solution could be to always have the trash icon, and in case it's the last entry only its contents are removed. This would also prevent "jumping" of buttons. What do you think?
  12. core-ci voted on patch set 4 V +1 04/23/26, 08:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100998

  13. Benjamin Franzke uploaded patch set 5 V +1 04/23/26, 08:05

  14. Benjamin Franzke commented on patch set 5 CR +1 V +1 04/23/26, 08:06

    Reply

    Done, I've added a "+" button in case there are 0 elements, and allowed to last element again.
  15. Benjamin Franzke commented on patch set 5 04/23/26, 08:06

    Reply

    *allowed to remove the last element
  16. core-ci voted on patch set 5 V +1 04/23/26, 08:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101001

  17. Garvin Hicking commented on patch set 5 CR +1 V +1 04/23/26, 11:10

    Ah, nice idea to put the id on that button so that the label stays active. Works for me!
  18. Garvin Hicking commented on patch set 5 04/23/26, 15:25

    @wolfgang@wazum.com If this solution feels good for you to, I'd like to merge it.
  19. Simon Schaufelberger voted on patch set 5 CR +1 V +1 06/23/26, 14:05

  20. Garvin Hicking voted on patch set 5 CR +2 V +2 06/23/26, 15:11

  21. Garvin Hicking merged patch set 6 06/23/26, 17:38