-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: let users configure their first day of week #46592
Conversation
1cabe94
to
7d4d200
Compare
7d4d200
to
4674699
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smooth 😎
I think we only need Sunday+Monday as options. Are the other days used in any culture?
case self::USER_FIELD_FIRST_DAY_OF_WEEK: | ||
$intValue = (int)$value; | ||
if ($intValue < -1 || $intValue > 6) { | ||
throw new OCSException($this->l10n->t('Invalid first day of week'), 102); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
magic number 102?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just like the other properties. For some reason they all return 102 in case of invalid values 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we keep the "Week starts on ..." below the "Locale" setting?
I imagine this is also useful to people that do not have usual weekend days, so I would keep the full list of days. |
The start day is also used in the date picker. I'm not sure it can even cope with Wednesday as start day. Something to test? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
76ff158
to
b37fb43
Compare
There's also Friday and Saturday : https://en.wikipedia.org/wiki/Week |
Summary
The property will be propagated to the whole ecosystem via
window.firstDay
and our l10n library respectively.Automatic
Overwritten
Popover open
TODO
Checklist