Review main Merged

91388[TASK] Support "attributes" for all kind of buttons

Oli Bartsch CR +2 V +2 Normal +44 −8 updated 10/31/25, 13:22

Commit message

Currently there are a couple of misuses of the
`GenericButton`, just because it is the only
Button implementation, which allows to set
attributes. The other Button implementations
only support "data" attributes by extending
`AbstractControl`.

To be able to resolve those misuses,
the `AbstractButton` class now implements
setAttributes() and getAttributes().

Implementing core classes are adjusted to render them.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Garvin Hicking +1
    • Christian Kuhn +1
    • Josua Vogel +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Garvin Hicking +1
    • Christian Kuhn +1
    • Josua Vogel +1
    • core-ci +1 CI

Issues 1

Files 6

Review log 2329

Show 34 earlier messages
  1. Oli Bartsch uploaded patch set 1 10/31/25, 10:47

  2. core-ci voted on patch set 1 V +1 10/31/25, 10:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88244

  3. Josua Vogel voted on patch set 1 CR +1 V +1 10/31/25, 11:04

  4. Garvin Hicking commented on patch set 1 10/31/25, 11:19

    notes I submitted to Oli also via DM: - We should enhance the componentnfactory ReST file to note these enhancements for the API (so they can be documented) - should DropDownButton also receive these attributes? It's also lacking dataAttributes atm
  1. Christian Kuhn voted on patch set 1 CR +1 V +1 10/31/25, 11:21

  2. Oli Bartsch uploaded patch set 2 CR +1 V +1 10/31/25, 12:20

  3. Oli Bartsch uploaded patch set 3 10/31/25, 12:21

  4. Oli Bartsch commented on patch set 3 10/31/25, 12:22

    Reply

    I've added this to the RST. `DropDownButton` is dedicated to be the button to toggle the dropdown and does not provide any further API. Therefore it does not extend any Abstract class.
  5. core-ci voted on patch set 2 V +1 10/31/25, 12:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88250

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

  7. Garvin Hicking voted on patch set 3 CR +1 V +1 10/31/25, 12:30

  8. Josua Vogel voted on patch set 3 CR +1 V +1 10/31/25, 12:33

  9. Christian Kuhn voted on patch set 3 CR +1 V +1 10/31/25, 12:34

  10. Ayke Halder commented on patch set 3 CR -1 10/31/25, 12:42

    SplitButton.php:200

    Is there a reason for not using `GeneralUtility::implodeAttributes($attributes, true)` here? This is usually always done so - see `LinkButton`, `GenericButton::getAttributesString()` etc.
  11. Oli Bartsch uploaded patch set 4 CR +1 V +1 10/31/25, 12:47

  12. Oli Bartsch commented on patch set 4 10/31/25, 12:48

    SplitButton.php:200 Reply

    While this is irrelevant to this patch, I have changed this anyways.
  13. Josua Vogel voted on patch set 4 CR +1 V +1 10/31/25, 12:49

  14. Ayke Halder commented on patch set 4 CR -1 10/31/25, 12:53

    SplitButton.php:208

    Now this needs a proper blank space here: ```suggestion $primaryButtonHTML = '<button ' . $attributesString . ' type="submit"> ```
  15. Oli Bartsch commented on patch set 5 CR +1 V +1 10/31/25, 12:55

    Published edit on patch set 4.
  16. Oli Bartsch commented on patch set 5 10/31/25, 12:55

    SplitButton.php:208 Reply

    Fix applied.
  17. core-ci voted on patch set 4 V -1 10/31/25, 12:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88254

  18. Oli Bartsch uploaded patch set 6 10/31/25, 12:58

  19. core-ci voted on patch set 5 V -1 10/31/25, 13:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88255

  20. Christian Kuhn voted on patch set 6 CR +1 V +1 10/31/25, 13:00

  21. core-ci voted on patch set 6 V +1 10/31/25, 13:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88256

  22. Josua Vogel voted on patch set 6 CR +1 V +1 10/31/25, 13:10

  23. Garvin Hicking voted on patch set 6 CR +1 V +1 10/31/25, 13:13

  24. Oli Bartsch voted on patch set 6 CR +2 V +2 10/31/25, 13:22

  25. Oli Bartsch merged patch set 7 10/31/25, 13:22