Review main Merged

92083[FEATURE] Allow to configure "first day of week" datepicker setting

Garvin Hicking CR +2 V +2 Normal +135 −6 updated 12/17/25, 06:17

Commit message

Previously, the date-time picker used the selected locale of a
backend user.

However, certain locale configurations might rather be a user
preference. For example, users may prefer an english backend
but want to use a weekday start on "Monday" instead of
"Sunday" due to their cultural habits.

Thus, the "first day of a week" has been decoupled from the
locale selection and can be configured on a per-user setting.
By default, it still inherits the locale's default' setting,
if not changed (for example, english=sunday and german=monday).

Inside the user settings and tab panel `Backend appearance`,
a new dropdown `First day of week (Date picker)` appears.

The setting is stored in both the persisted `be_users.uc`
preference blob, as well as on the JavaScript-persistence side.

Sadly PHP's ICU does not allow locale-specific iteration
of all available week days, and we don't require a package like
symfony/intl, so an algorithm had to be implemented to create
timestamps for all 7 days to read their locale-specific names
and offer as a dropdown in the fake TCA user settings.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Georg Ringer +1
    • Guido Schmechel +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Josef Glatz +1
    • Georg Ringer +1
    • Guido Schmechel +1
    • core-ci +1 CI

Issues 1

Files 9

Review log 3747

Show 1522 earlier messages
  1. Garvin Hicking uploaded patch set 1 12/10/25, 13:42

  2. Garvin Hicking updated the commit message in patch set 2 12/10/25, 13:43

  3. Garvin Hicking uploaded patch set 3 12/10/25, 13:45

  4. core-ci voted on patch set 1 V -1 12/10/25, 13:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91983

  5. core-ci voted on patch set 2 V -1 12/10/25, 13:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91984

  6. core-ci voted on patch set 3 V -1 12/10/25, 13:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91985

  7. Garvin Hicking uploaded patch set 4 V -1 12/10/25, 14:02

  8. core-ci voted on patch set 4 V +1 12/10/25, 14:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91987

  9. Simon Schaufelberger commented on patch set 4 12/11/25, 13:46

    Typo? Son algorith?

    SetupModuleController.php:757

    Can we use the new domain based language key here?

    SetupModuleController.php:767

    Only selected is enough without a value
  10. Garvin Hicking uploaded patch set 5 V +1 12/11/25, 14:07

  11. Garvin Hicking commented on patch set 5 12/11/25, 14:08

    Reply

    fixed

    SetupModuleController.php:757 Reply

    Yes, for new code we should use that, thanks for pointing it out, fixed.

    SetupModuleController.php:767 Reply

    I know, but the module uses selected="selected" five more times and I'd rather keep it identical. And changing this would IMO be beyond the scope of this and can be a seperate cleanup to make reviewing this more reduced.
  12. core-ci voted on patch set 5 V +1 12/11/25, 14:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92072

  13. Georg Ringer commented on patch set 5 CR +1 V +1 12/11/25, 18:37

    love it so much
  14. Guido Schmechel commented on patch set 5 12/11/25, 21:03

    Feature-108463-User-specificconfigurationofdate-timepickerstartofweek.rst:28

    be_users?

    locallang.xlf:166

    Is it clear to a non-technician what is meant by "locale"? Would "Default" or "Automatic" be better?
  15. Christian Kuhn commented on patch set 5 12/11/25, 21:20

    SetupModuleController.php:761

    maybe rephrase/remove? i think we won't add symfony/intl just for this single case. i think we need a more important and broader use cases to justify addition of the dependency. we also have own api for various things symfony/intl provides as well. switching to symfony/intl and deprecating own API is thus a bigger task which is currently afaik not on the horizon? i'd be in favor of not suggesting that we'll do that right now here. note we *do* have php-intl for a while already.
  16. Jasmina Ließmann commented on patch set 5 12/11/25, 21:25

    locallang.xlf:162

    Recently, "Snake Case" was used for newly introduced keys. Perhaps the naming should be adjusted here?

    ext_tables.php:104

    I'm unsure whether the addendum "(Datepicker)" in the label is sufficient, or whether a description should be added. Datepickers are somewhat more hidden.
  17. Garvin Hicking uploaded patch set 6 CR +1 V +1 12/12/25, 07:43

  18. Garvin Hicking commented on patch set 6 12/12/25, 07:45

    y

    Feature-108463-User-specificconfigurationofdate-timepickerstartofweek.rst:28 Reply

    Done

    SetupModuleController.php:761 Reply

    Agreed, I removed that reference. Sadly php-intl doesn't help in this case (well, it does, the weekday is retrieved from it, but with this "ugly" method to which there's no alternative I could find)

    locallang.xlf:162 Reply

    Indeed, thanks for noticing, I forgot!

    locallang.xlf:166 Reply

    You're right, I rephrased this, hope that's fine :)

    ext_tables.php:104 Reply

    I rephrased that, hope that's better?
  19. core-ci voted on patch set 6 V +1 12/12/25, 07:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92112

  20. Garvin Hicking commented on patch set 7 V +1 12/12/25, 10:36

    Published edit on patch set 6.
  21. Josef Glatz voted on patch set 7 CR +1 V +1 12/12/25, 10:41

  22. core-ci voted on patch set 7 V +1 12/12/25, 10:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92128

  1. Josef Glatz commented on patch set 7 12/12/25, 10:50

    locallang.xlf:166

    Thank you! That is more clear now
  2. Georg Ringer voted on patch set 7 CR +1 V +1 12/12/25, 11:02

  3. Christian Kuhn commented on patch set 7 12/12/25, 11:20

    SetupModuleController.php:140

    this means the setting will vanish when uc is cleared. should we maybe turn this field into a true db field instead?
  4. Garvin Hicking commented on patch set 7 12/12/25, 12:01

    SetupModuleController.php:140 Reply

    I would argue this is expected behaviour for the personal preferences and applies to many fields. I'd like to keep this in sync with the other settings there, which also affects their JS logic. (talked this over more in detail via DM, resolving)
  5. Christian Kuhn commented on patch set 7 CR +1 12/12/25, 12:02

    SetupModuleController.php:140 Reply

    ack.
  6. Christian Kuhn voted on patch set 7 V -1 12/12/25, 12:04

  7. Christian Kuhn commented on patch set 7 12/12/25, 12:09

    my language: default en. i select 'monday' and save. monday is selected. i re-call 'user settings' -> back to 'default from'.
  8. Garvin Hicking commented on patch set 7 CR -1 12/12/25, 12:46

    Reply

    There is a problem with the persistence for ("" / "1") values it seems. Will try to understand what happens there.
  9. Garvin Hicking uploaded patch set 8 CR +1 V +1 12/12/25, 13:45

  10. Garvin Hicking commented on patch set 8 12/12/25, 13:50

    Reply

    I "fixed" it by using the name "format" to the JS event propagation. I don't yet understand why it is called like that and I could not use "dow" as the argument name. So...works now, but I'm a bit lost why :-(
  11. core-ci voted on patch set 8 V +1 12/12/25, 13:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92147

  12. Garvin Hicking commented on patch set 8 CR -1 12/12/25, 13:58

    Andi solved it, will do it proper
  13. Garvin Hicking uploaded patch set 9 CR -1 V +1 12/12/25, 14:26

    Now with proper naming
  14. Garvin Hicking commented on patch set 9 12/12/25, 14:26

    Reply

    Done
  15. core-ci voted on patch set 9 V +1 12/12/25, 14:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92150

  16. Georg Ringer voted on patch set 9 CR +1 V +1 12/12/25, 15:48

  17. Guido Schmechel commented on patch set 9 CR -1 12/12/25, 18:25

    Feature-108463-User-specificconfigurationofdate-timepickerstartofweek.rst:26

    "First day of week in calendar popups" Sooooorrryyyy :-)
  18. Garvin Hicking commented on patch set 10 CR +1 V +1 12/12/25, 18:56

    Published edit on patch set 9.
  19. core-ci voted on patch set 10 V +1 12/12/25, 19:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92164

  20. Guido Schmechel voted on patch set 10 CR +1 V +1 12/12/25, 19:18

  21. Garvin Hicking commented on patch set 10 12/14/25, 18:32

    Feature-108463-User-specificconfigurationofdate-timepickerstartofweek.rst:26 Reply

    Done
  22. Josef Glatz voted on patch set 10 V +1 12/14/25, 19:54

  23. Georg Ringer voted on patch set 10 CR +1 V +1 12/15/25, 06:49

  24. Garvin Hicking voted on patch set 10 CR +2 V +2 12/17/25, 06:17

  25. Garvin Hicking merged patch set 11 12/17/25, 06:17