[PR #5006] [CLOSED] Add system default option for first day of week #20065

Closed
opened 2026-04-14 21:26:26 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/5006
Author: @sonicdoe
Created: 5/16/2025
Status: Closed

Base: masterHead: first-day-of-the-week-system-default


📝 Commits (7)

📊 Changes

25 files changed (+98 additions, -97 deletions)

View changed files

📝 packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-2-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-3-chromium-linux.png (+0 -0)
📝 packages/desktop-client/src/components/reports/Header.tsx (+3 -2)
📝 packages/desktop-client/src/components/reports/Overview.tsx (+2 -3)
📝 packages/desktop-client/src/components/reports/ReportSidebar.tsx (+3 -4)
📝 packages/desktop-client/src/components/reports/getLiveRange.ts (+2 -3)
📝 packages/desktop-client/src/components/reports/graphs/CalendarGraph.tsx (+2 -9)
📝 packages/desktop-client/src/components/reports/reportRanges.ts (+6 -7)
📝 packages/desktop-client/src/components/reports/reports/Calendar.tsx (+3 -4)
📝 packages/desktop-client/src/components/reports/reports/CalendarCard.tsx (+3 -4)
📝 packages/desktop-client/src/components/reports/reports/CashFlow.tsx (+2 -3)
📝 packages/desktop-client/src/components/reports/reports/CustomReport.tsx (+4 -5)
📝 packages/desktop-client/src/components/reports/reports/CustomReportListCards.tsx (+2 -3)
📝 packages/desktop-client/src/components/reports/reports/GetCardData.tsx (+1 -2)
📝 packages/desktop-client/src/components/reports/reports/NetWorth.tsx (+2 -3)
📝 packages/desktop-client/src/components/reports/reports/Summary.tsx (+2 -3)
📝 packages/desktop-client/src/components/reports/spreadsheets/calendar-spreadsheet.ts (+3 -10)
📝 packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts (+2 -3)
📝 packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts (+1 -1)

...and 5 more files

📄 Description

Currently, the “First day of the week” setting defaults to Sunday. This leads to a subpar first-time user experience for users in regions where the first day of the week is not Sunday as they will have to manually change this setting.

This pull request introduces a new option, “System default”, similar to the default options in the Theme and Language settings, which automatically sets the first day of the week according to the set language (using getWeekInfo()).


  • The most significant change is in Format.tsx and the new useFirstDayOfWeek.ts hook. The rest of the changes are mainly updating existing usages to the new hook.
  • I have updated all types from a string to Day (0–6).
  • “System default” may not be the most accurate label as it’s actually using the language’s default—which the user may have changed from the system’s language.
  • When originally introducing this setting, it was even considered not to introduce this setting at all and rather default to the user’s locale. (Unfortunately, in the browser, it is difficult to reliably get the user’s locale as opposed to the user’s language. For example, if we were to remove this setting altogether, German users who prefer using the English language but also Monday as the first day of the week, won’t be able to configure Actual to do so.)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/5006 **Author:** [@sonicdoe](https://github.com/sonicdoe) **Created:** 5/16/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `first-day-of-the-week-system-default` --- ### 📝 Commits (7) - [`feda7d6`](https://github.com/actualbudget/actual/commit/feda7d68487d5dc75ece51158e37ebf862f81ae4) Add system default option for first day of week - [`60faa07`](https://github.com/actualbudget/actual/commit/60faa0732795854caa0e7dc572eced5658c58407) Fix lint - [`9ddfcf3`](https://github.com/actualbudget/actual/commit/9ddfcf3ff082667c59630fe67c586162203d4eca) Fix typecheck - [`88cc048`](https://github.com/actualbudget/actual/commit/88cc04845cb6cd945933733b1b13c5125419ef1a) Fix empty dropdown - [`601344a`](https://github.com/actualbudget/actual/commit/601344ad2b380a0a7e3094b58b48169692aae707) Update snapshots - [`4f64d7d`](https://github.com/actualbudget/actual/commit/4f64d7db04c52aa32ba8c84b013ad6b12871ec91) Merge branch 'master' into first-day-of-the-week-system-default - [`0369982`](https://github.com/actualbudget/actual/commit/0369982baa940c9559e77b794edd6b883ff88541) Fix typecheck ### 📊 Changes **25 files changed** (+98 additions, -97 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-2-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/settings.test.ts-snapshots/Settings-checks-the-page-visuals-3-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/src/components/reports/Header.tsx` (+3 -2) 📝 `packages/desktop-client/src/components/reports/Overview.tsx` (+2 -3) 📝 `packages/desktop-client/src/components/reports/ReportSidebar.tsx` (+3 -4) 📝 `packages/desktop-client/src/components/reports/getLiveRange.ts` (+2 -3) 📝 `packages/desktop-client/src/components/reports/graphs/CalendarGraph.tsx` (+2 -9) 📝 `packages/desktop-client/src/components/reports/reportRanges.ts` (+6 -7) 📝 `packages/desktop-client/src/components/reports/reports/Calendar.tsx` (+3 -4) 📝 `packages/desktop-client/src/components/reports/reports/CalendarCard.tsx` (+3 -4) 📝 `packages/desktop-client/src/components/reports/reports/CashFlow.tsx` (+2 -3) 📝 `packages/desktop-client/src/components/reports/reports/CustomReport.tsx` (+4 -5) 📝 `packages/desktop-client/src/components/reports/reports/CustomReportListCards.tsx` (+2 -3) 📝 `packages/desktop-client/src/components/reports/reports/GetCardData.tsx` (+1 -2) 📝 `packages/desktop-client/src/components/reports/reports/NetWorth.tsx` (+2 -3) 📝 `packages/desktop-client/src/components/reports/reports/Summary.tsx` (+2 -3) 📝 `packages/desktop-client/src/components/reports/spreadsheets/calendar-spreadsheet.ts` (+3 -10) 📝 `packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts` (+2 -3) 📝 `packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts` (+1 -1) _...and 5 more files_ </details> ### 📄 Description Currently, the “First day of the week” setting defaults to Sunday. This leads to a subpar first-time user experience for users in regions where the first day of the week is not Sunday as they will have to manually change this setting. This pull request introduces a new option, “System default”, similar to the default options in the Theme and Language settings, which automatically sets the first day of the week according to the set language (using [`getWeekInfo()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo)). --- - The most significant change is in `Format.tsx` and the new `useFirstDayOfWeek.ts` hook. The rest of the changes are mainly updating existing usages to the new hook. - I have updated all types from a string to `Day` (0–6). - “System default” may not be the most accurate label as it’s actually using the language’s default—which the user may have changed from the system’s language. - When originally introducing this setting, [it was even considered](https://github.com/actualbudget/actual/issues/844#issuecomment-1493421988) not to introduce this setting at all and rather default to the user’s locale. (Unfortunately, in the browser, it is difficult to reliably get the user’s locale as opposed to the user’s language. For example, if we were to remove this setting altogether, German users who prefer using the English language but also Monday as the first day of the week, won’t be able to configure Actual to do so.) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-14 21:26:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#20065