Review main Merged

86243[TASK] Make DebuggerUtility::var_dump output context aware

Benjamin Franzke CR +2 V +2 Hard +220 −37 updated 10/01/24, 15:16

Commit message

DebuggerUtility::var_dump now respects the backend color
scheme (light/dark) and the color palette, if defined.

In frontend mode (when typo3 backend CSS variables are not defined)
it will render with the previous, self-defined colors as before.

To make the CSS readable/reviewable it has been refactored into array
that is compiled into a string on the fly.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
    • Oli Bartsch +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 2232

Show 47 earlier messages
  1. Benjamin Franzke uploaded patch set 1 09/20/24, 12:59

  2. core-ci voted on patch set 1 V +1 09/20/24, 13:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66334

  3. Benjamin Franzke uploaded patch set 2 V +1 09/23/24, 10:08

  4. core-ci voted on patch set 2 V +1 09/23/24, 10:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66431

  5. Benjamin Franzke uploaded patch set 3 V +1 09/24/24, 07:24

  6. core-ci voted on patch set 3 V +1 09/24/24, 07:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66480

  7. Andreas Kienast commented on patch set 3 09/24/24, 07:45

    IMO the contrast of the lines is in dark mode too high.
  1. Benjamin Franzke uploaded patch set 4 V +1 09/27/24, 12:58

  2. Benjamin Franzke commented on patch set 4 09/27/24, 12:58

    Reply

    ack, done.
  3. Benjamin Franzke uploaded patch set 5 09/27/24, 12:59

  4. core-ci voted on patch set 4 V -1 09/27/24, 13:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66750

  5. core-ci voted on patch set 5 V -1 09/27/24, 13:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66751

  6. Benjamin Franzke uploaded patch set 6 V -1 09/27/24, 13:06

  7. core-ci voted on patch set 6 V +1 09/27/24, 13:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66752

  8. Andreas Kienast commented on patch set 6 09/27/24, 13:14

    _debugger-utility.scss:4

    I'd go with 3% here. OTOH, we may remove the "striping" completely?
  9. Simon Praetorius commented on patch set 6 09/27/24, 17:01

    DebuggerUtility.php:653

    Maybe I don't get the implementation details, but this looks over-engineered and hard to grasp to me. No -1, just wanted to leave this thought here.
  10. Benjamin Franzke uploaded patch set 7 V +1 09/30/24, 06:54

  11. Benjamin Franzke commented on patch set 7 09/30/24, 06:54

    _debugger-utility.scss:4 Reply

    3% is fine by me.

    DebuggerUtility.php:653 Reply

    I can't really understand why this looks over-engineered (it's rather under-engineered, as it's a plain simple array-to-string conversion implemented in a very blunt way – that basically the opposite of over-engineered). Anyway, I moved this code into a separate function with the hope to be easier to understand.
  12. core-ci voted on patch set 7 V -1 09/30/24, 07:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66831

  13. Benjamin Franzke uploaded patch set 8 V -1 09/30/24, 07:08

  14. Benjamin Franzke uploaded patch set 9 09/30/24, 07:10

  15. core-ci voted on patch set 8 V -1 09/30/24, 07:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66832

  16. core-ci voted on patch set 9 V -1 09/30/24, 07:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66833

  17. Benjamin Franzke uploaded patch set 10 V -1 09/30/24, 07:19

  18. core-ci voted on patch set 10 V +1 09/30/24, 07:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66834

  19. Oli Bartsch commented on patch set 10 09/30/24, 19:35

    DebuggerUtility.php:807

    Could we get a quick unit test for this utility method?
  20. Benjamin Franzke commented on patch set 10 10/01/24, 06:20

    DebuggerUtility.php:807 Reply

    no, I only added it for readability, because of https://review.typo3.org/c/Packages/TYPO3.CMS/+/86243/10#message-608529ed29f3161482242f031b6cae7b719d406b This is really not meant to be tested, sorry.
  21. Andreas Kienast voted on patch set 10 CR +1 V +1 10/01/24, 06:30

  22. Andreas Kienast commented on patch set 10 10/01/24, 06:32

    DebuggerUtility.php:807 Reply

    If this would break, I think existing tests that check the generated markup would also fail. Fine for me.
  23. Oli Bartsch commented on patch set 10 CR +1 V +1 10/01/24, 14:43

    DebuggerUtility.php:807 Reply

    ACK
  24. Andreas Kienast voted on patch set 10 CR +2 V +2 10/01/24, 15:16

  25. Andreas Kienast merged patch set 11 10/01/24, 15:16