Review main Merged

85935[FEATURE] Add color scheme switching

Andreas Nedbal CR +2 V +2 Hard +416 −4 updated 09/11/24, 14:15

Commit message

This patch adds the ability to switch the active color scheme
using multiple different methods in the Backend User Interface.
The two main methods are a selection of buttons in the user
dropdown at the top right of the Backend, the other one being
a setting present in User Settings.

Additionally, if the "auto" setting (default) is selected, the backend
is automatically using the systems preferred color scheme.

Considering the dark color scheme is still regarded as experimental,
the switching capabilities are currently disabled using a UserTS setting
'setup.fields.colorScheme.disabled'.

Review

  • Code review CR +2 Done
    • Andreas Nedbal +2
    • Benjamin Franzke +1
    • Benjamin Kott +1
    • Benni Mack +1
  • Verified V +2 Done
    • Andreas Nedbal +2
    • Benjamin Franzke +1
    • Benjamin Kott +1
    • core-ci +1 CI

Issues 1

Files 20

Review log 64102

Show 4677 earlier messages
  1. Andreas Nedbal uploaded patch set 1 09/09/24, 19:18

  2. core-ci voted on patch set 1 V -1 09/09/24, 19:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65140

  3. Benjamin Franzke commented on patch set 1 09/09/24, 19:34

    ColorSchemeController.php:48

    arrow function please.

    ModuleTemplate.php:91

    Why on body, can we set this on `<html>`? That means it is applied as soon as CSS is loaded, even before `<body>` is loaded.
  4. Andreas Nedbal uploaded patch set 2 V -1 09/09/24, 19:35

  5. core-ci voted on patch set 2 V -1 09/09/24, 19:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65142

  6. Andreas Nedbal uploaded patch set 3 V -1 09/09/24, 19:41

  7. Andreas Nedbal uploaded patch set 4 09/09/24, 19:46

  8. Andreas Nedbal commented on patch set 4 09/09/24, 19:50

    ColorSchemeController.php:48 Reply

    Done
  9. core-ci voted on patch set 3 V -1 09/09/24, 19:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65143

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

  11. Andreas Nedbal uploaded patch set 5 V +1 09/09/24, 20:22

  12. core-ci voted on patch set 5 V +1 09/09/24, 20:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65150

  13. Andreas Nedbal uploaded patch set 6 V +1 09/09/24, 20:44

  14. core-ci voted on patch set 6 V +1 09/09/24, 20:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65154

  15. Andreas Nedbal uploaded patch set 7 V +1 09/09/24, 20:55

  16. core-ci voted on patch set 7 V +1 09/09/24, 21:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65155

  17. Andreas Kienast commented on patch set 7 09/10/24, 06:24

    ColorScheme.php:36

    Why do we need dedicated methods that return a WeakMap? Can't we simply use `match()`?
  18. Andreas Nedbal uploaded patch set 8 V +1 09/10/24, 07:24

  19. Andreas Nedbal commented on patch set 8 09/10/24, 07:26

    ColorScheme.php:36 Reply

    Done
  20. Benni Mack commented on patch set 8 09/10/24, 07:28

    I recommend doing this in the Enum
  21. Benni Mack commented on patch set 8 09/10/24, 07:30

    I personally do not see the use case for the global feature toggle. If this is a User TS Config option, we can ensure that only some editors have this feature as option, or even "enforce" to have a certain setting, or remove the setting completely...
  22. core-ci voted on patch set 8 V +1 09/10/24, 07:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65182

  23. Benni Mack commented on patch set 8 09/10/24, 07:31

    ColorSchemeController.php:35

    Can't we have the Enum handle such things? you know... tryFrom...

    ColorSchemeController.php:48

    Can't we have the Enum handle such things?

    UserToolbarItemDropDown.html:63

    please move to XLF

    ext_tables.php:112

    Can't we have the Enum handle such things? getAvailableItemsForSelection()
  24. Andreas Nedbal uploaded patch set 9 V +1 09/10/24, 07:52

  25. core-ci voted on patch set 9 V -1 09/10/24, 08:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65189

  26. Andreas Nedbal uploaded patch set 10 V -1 09/10/24, 08:18

  27. Andreas Nedbal uploaded patch set 11 09/10/24, 08:27

  28. core-ci voted on patch set 10 V -1 09/10/24, 08:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65191

  29. Andreas Nedbal commented on patch set 11 09/10/24, 08:31

    ColorSchemeController.php:35 Reply

    Done

    ColorSchemeController.php:48 Reply

    Done

    UserToolbarItemDropDown.html:63 Reply

    Done

    ext_tables.php:112 Reply

    Done
  30. core-ci voted on patch set 11 V -1 09/10/24, 08:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65192

  31. Andreas Nedbal uploaded patch set 12 V -1 09/10/24, 09:10

  32. core-ci voted on patch set 12 V -1 09/10/24, 09:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65195

  33. Andreas Nedbal uploaded patch set 13 V -1 09/10/24, 09:34

  34. core-ci voted on patch set 13 V +1 09/10/24, 09:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65200

  35. Andreas Nedbal commented on patch set 13 09/10/24, 10:23

    ModuleTemplate.php:91 Reply

    Done
  36. Andreas Kienast commented on patch set 13 09/10/24, 10:39

    ColorSchemeController.php:33

    Should we bail out early if this is no POST request at all?

    PageRenderer.php:288

    ===
  37. Benni Mack commented on patch set 13 CR -1 09/10/24, 11:07

    Instead of a global (new) feature switch, one could easily use this on a per-user, per-group or instance-wide setting: # disable the field (thus, also the weird three-way-dropdown) setup.fields.colorScheme.disabled = 1 # enforce light mode setup.override.colorScheme = light # set a default value setup.default.colorScheme = auto See https://docs.typo3.org/m/typo3/reference-tsconfig/12.4/en-us/UserTsconfig/Setup.html#setup
  38. Benjamin Franzke commented on patch set 13 CR 0 09/10/24, 11:28

    UserToolbarItemDropDown.html:67 Reply

    nvm
  39. Andreas Nedbal uploaded patch set 14 CR -1 V +1 09/10/24, 11:37

  40. Andreas Nedbal uploaded patch set 15 09/10/24, 11:42

  41. core-ci voted on patch set 14 V +1 09/10/24, 11:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65220

  42. Andreas Nedbal commented on patch set 15 09/10/24, 11:44

    ColorSchemeController.php:33 Reply

    Done

    PageRenderer.php:288 Reply

    Done
  43. core-ci voted on patch set 15 V +1 09/10/24, 11:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65221

  44. Andreas Nedbal uploaded patch set 16 V +1 09/10/24, 13:54

  45. core-ci voted on patch set 16 V +1 09/10/24, 13:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65256

  46. Andreas Nedbal uploaded patch set 17 V +1 09/10/24, 14:14

  47. Andreas Nedbal uploaded patch set 18 09/10/24, 14:16

  48. core-ci voted on patch set 17 V +1 09/10/24, 14:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65258

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

  50. Andreas Nedbal uploaded patch set 19 V +1 09/10/24, 15:02

  51. core-ci voted on patch set 19 V -1 09/10/24, 15:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65268

  52. Andreas Nedbal uploaded patch set 20 V -1 09/10/24, 15:24

  53. core-ci voted on patch set 20 V +1 09/10/24, 15:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65273

  54. Andreas Nedbal rebased onto patch set 21 V +1 09/10/24, 15:35

  55. core-ci voted on patch set 21 V +1 09/10/24, 15:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65275

  56. Andreas Nedbal updated the commit message in patch set 22 V +1 09/10/24, 15:53

  57. core-ci voted on patch set 22 V +1 09/10/24, 16:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65277

  58. Andreas Nedbal updated the commit message in patch set 23 V +1 09/10/24, 16:20

  59. core-ci voted on patch set 23 V -1 09/10/24, 16:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65282

  60. Andreas Nedbal uploaded patch set 24 V -1 09/10/24, 16:35

  61. core-ci voted on patch set 24 V +1 09/10/24, 16:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65286

  62. Andreas Nedbal uploaded patch set 25 V +1 09/10/24, 17:25

  63. Andreas Nedbal uploaded patch set 26 09/10/24, 17:32

  64. core-ci voted on patch set 25 V -1 09/10/24, 17:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65299

  65. core-ci voted on patch set 26 V -1 09/10/24, 17:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65301

  66. Andreas Nedbal uploaded patch set 27 V -1 09/10/24, 18:24

  67. Andreas Nedbal uploaded patch set 28 09/10/24, 18:25

  68. core-ci voted on patch set 27 V -1 09/10/24, 18:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65317

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

  70. Benni Mack commented on patch set 28 09/10/24, 19:15

    ColorScheme.php:30

    EXT:backend is referencing EXT:setup LLLs is probably not a good idea.
  71. Andreas Nedbal uploaded patch set 29 V +1 09/10/24, 19:23

  72. Andreas Nedbal commented on patch set 29 09/10/24, 19:23

    ColorScheme.php:30 Reply

    Done
  73. core-ci voted on patch set 29 V -1 09/10/24, 19:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65323

  74. core-ci commented on patch set 29 09/10/24, 19:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65323

  75. Andreas Nedbal rebased onto patch set 30 V -1 09/10/24, 19:34

  76. core-ci voted on patch set 30 V -1 09/10/24, 19:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65326

  1. Andreas Nedbal uploaded patch set 31 V -1 09/10/24, 19:51

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

  3. Andreas Nedbal uploaded patch set 32 V +1 09/10/24, 21:24

  4. Benni Mack commented on patch set 32 CR -1 09/10/24, 21:27

    UserToolbarItem.php:177

    does not work... LocalizationUtility is Extbase, and static. calling in a non-static way. I recommend using $GLOBALS['LANG'] a.k.a. LanguageService.
  5. core-ci voted on patch set 32 V +1 09/10/24, 21:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65357

  6. Andreas Nedbal uploaded patch set 33 CR -1 V +1 09/11/24, 06:45

  7. core-ci voted on patch set 33 V +1 09/11/24, 06:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65378

  8. Andreas Nedbal commented on patch set 33 09/11/24, 06:54

    UserToolbarItem.php:177 Reply

    Done
  9. Andreas Nedbal uploaded patch set 34 V +1 09/11/24, 07:05

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

  11. Benjamin Kott voted on patch set 34 CR +1 V +1 09/11/24, 13:11

  12. Andreas Nedbal uploaded patch set 35 CR +1 V +1 09/11/24, 13:37

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

  14. Benjamin Franzke commented on patch set 35 09/11/24, 13:51

    color-scheme-manager.ts:24

  15. Andreas Nedbal uploaded patch set 36 V +1 09/11/24, 13:55

  16. Benjamin Franzke commented on patch set 35 09/11/24, 13:55

    color-scheme-switch.ts:49

    no space here

    color-scheme-switch.ts:55

    no space here
  17. core-ci voted on patch set 36 V +1 09/11/24, 14:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65457

  18. Benjamin Franzke uploaded patch set 37 V +1 09/11/24, 14:05

  19. Benjamin Franzke commented on patch set 37 09/11/24, 14:05

    color-scheme-manager.ts:24 Reply

    later.

    color-scheme-switch.ts:49 Reply

    Done

    color-scheme-switch.ts:55 Reply

    Done
  20. Benjamin Franzke voted on patch set 37 CR +1 V +1 09/11/24, 14:06

  21. Benni Mack voted on patch set 37 CR +1 09/11/24, 14:08

  22. Benjamin Kott voted on patch set 37 CR +1 V +1 09/11/24, 14:08

  23. core-ci voted on patch set 37 V +1 09/11/24, 14:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65460

  24. Andreas Nedbal voted on patch set 37 CR +2 V +2 09/11/24, 14:15

  25. Andreas Nedbal merged patch set 38 09/11/24, 14:15