Review main Abandoned

70596[FEATURE] Add renderAsButton option to BackendUtility::cshItem

Marcin Sągol CR 0 V 0 Normal +48 −12 updated 06/08/22, 06:26

Commit message

The new fifth argument "$renderAsButton" of BackendUtility::cshItem is
a bool flag. It allows to return the csh help link as a button by
applying bootstrap button classes to it.

This helps to solve another issue:

In the module doc header there is a button group, which, among other
buttons, renders a csh help link button.

The PageLayoutController used the HelpButton class to render this button
by wrapping the output returned by the BackendUtility::cshItem
method with an extra span element.

The problem was, that the button itself didn't trigger the csh link, but
only the "help-link" class of the question mark icon.

With this feature, the button class is applied directly to the event
listening element.

Review

  • Code review CR 0
  • Verified V 0

Issues 2

Files 5

Review log 2532

Show 57 earlier messages
  1. Marcin Sągol uploaded patch set 1 08/15/21, 00:29

  2. core-ci voted on patch set 1 V +1 08/15/21, 00:44 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15109

  3. Riccardo De Contardi commented on patch set 1 V +1 08/15/21, 08:35

    it works (tested with help in page module) I'm quite not a fan of the !important directive, though
  4. Nikita Hovratov uploaded patch set 2 08/16/21, 16:36

  5. Nikita Hovratov commented on patch set 2 08/16/21, 16:39

    @Marcin Sągol Hey, I turned your patch into a feature, to allow for cleaner implementation (instead of str_replace). I hope this is ok for you. Feedback is welcome.
  6. core-ci voted on patch set 2 V +1 08/16/21, 16:54 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15198

  7. Oli Bartsch commented on patch set 2 08/17/21, 11:40

    BackendUtility.php:1988

    Please also update the PHPDoc

    BackendUtility.php:2001

    This change seems unrelated to the patch. Furthermore, the parameter is not type hinted, so this might be change in behaviour - depending on the input value. Therefore either cast to string or - preferred - just skip this unrelated change here.

    BackendUtility.php:2039

    Please also update the PHPDoc
  1. Nikita Hovratov uploaded patch set 3 08/17/21, 12:19

  2. Nikita Hovratov commented on patch set 3 08/17/21, 12:20

    BackendUtility.php:1988 Reply

    Done

    BackendUtility.php:2001 Reply

    Done

    BackendUtility.php:2039 Reply

    Done
  3. core-ci voted on patch set 3 V +1 08/17/21, 12:43 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15233

  4. Nikita Hovratov uploaded patch set 4 08/20/21, 15:02

  5. core-ci voted on patch set 4 V +1 08/20/21, 15:23 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15330

  6. Simon Schaufelberger commented on patch set 4 08/24/21, 19:42

    HelpButton.php:151

    why not return directly?
  7. Nikita Hovratov uploaded patch set 5 09/01/21, 10:53

  8. Nikita Hovratov commented on patch set 5 09/01/21, 10:54

    HelpButton.php:151 Reply

    Some prefer it for debugging purposes. But ok, let's do it here.
  9. core-ci voted on patch set 5 V +1 09/01/21, 11:08 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16005

  10. Simon Schaufelberger wrote 10/04/21, 20:54

    Removed cc Simon Schaufelberger.
  11. Benni Mack wrote 11/29/21, 10:12

    Change destination moved from master to main
  12. Benni Mack updated the commit message in patch set 6 11/29/21, 13:37

  13. core-ci voted on patch set 6 V +1 11/29/21, 15:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20054

  14. Simon Schaufelberger uploaded patch set 7 03/29/22, 00:08

  15. core-ci voted on patch set 7 V +1 03/29/22, 00:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25239

  16. Simon Schaufelberger commented on patch set 7 V +1 CR +1 03/29/22, 00:33

    This is partially a bugfix and partially a feature. Maybe it can be backported to v11 as well?
  17. Oli Bartsch commented on patch set 7 03/29/22, 08:24

    _help.scss:17 Unresolved

    I wonder why this is no longer needed. Have you checked all corresponding places?

    HelpButton.php:151 Unresolved

    This seems like a perfect example for the use of named arguments.
  18. Michael Telgkamp commented on patch set 7 04/11/22, 06:18

    As the CSH was removed completely in https://review.typo3.org/c/Packages/TYPO3.CMS/+/74191, this patch probably can be abandoned.
  19. Simon Schaufelberger commented on patch set 7 04/11/22, 23:09

    Reply

    even though they are removed in main, the fix should still be applied on v11
  20. Michael Telgkamp commented on patch set 7 CR -1 04/12/22, 09:04

    Helpful patch for v11 (and maybe v10?), but not for main any longer as CSH was removed there.

    Reply Unresolved

    As the scope (Releases) was only main, I did not consider this. But yes, the scope might be changed to 11 and maybe also 10? In that case this patch will help.
  21. Simon Schaufelberger commented on patch set 7 04/12/22, 13:27

    Reply Unresolved

    or we just ignore it because nothing is really broken and code differes more in v12 and v11 in the end making packports more complicated.
  22. Simon Schaufelberger wrote 06/06/22, 18:29

    Removed Verified+1 by Simon Schaufelberger
  23. Simon Schaufelberger wrote 06/06/22, 18:29

    Removed Code-Review+1 by Simon Schaufelberger
  24. Simon Schaufelberger wrote 06/06/22, 18:29

    Removed reviewer Simon Schaufelberger.
  25. Nikita Hovratov abandoned the change 06/08/22, 06:26

    Not relevant in main anymore and no features for v11