Skip to content
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

[APP-83] The first day of week in the Calendar based on the User Localisation #2110

Merged
merged 5 commits into from
Nov 21, 2024

Conversation

novinfard
Copy link
Contributor

@novinfard novinfard commented Nov 17, 2024

[APP-83]
This PR is to make the first day of the week based on the User Localisation

How user can change the first day of the week?

Users can change the first day of the week via:

  • Settings > General > Language & Region > Region:
    This setting influences the first day of the week.

  • Settings > Calendar > Start Week On:
    If this option is available, the user can override the regional setting for their preferred first day of the week.

Demo

Monday as the first day of the week Sunday as the first day of the week
calendar-monday-as-first-day calendar-sunday-as-first-day

Remember to include the following changes:

If you are curious about how we review, please read through the code review guidelines

@novinfard novinfard added swiftui minor Non breaking change labels Nov 17, 2024
Copy link
Contributor

Snapshots were updated. Please verify the changes match the expected layout.

' D Backpack-SwiftUI/Tests/BannerAlert/Snapshots/BPKBannerAlertTests/test_multilineBannerAlert.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/BannerAlert/Snapshots/BPKBannerAlertTests/test_multilineBannerAlert.light-mode.png'%0A' D Backpack-SwiftUI/Tests/BannerAlert/Snapshots/BPKBannerAlertTests/test_multilineBannerAlert.rtl.png'%0A' M Backpack-SwiftUI/Tests/Calendar/Snapshots/BPKCalendarTests/test_rangeSelectionCalendar_differentMonth.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/Calendar/Snapshots/BPKCalendarTests/test_rangeSelectionCalendar_differentMonth.light-mode.png'%0A' M Backpack-SwiftUI/Tests/Calendar/Snapshots/BPKCalendarTests/test_rangeSelectionCalendar_differentMonth.rtl.png'%0A' M Backpack-SwiftUI/Tests/Calendar/Snapshots/BPKCalendarTests/test_rangeSelectionCalendar_sameDay.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/Calendar/Snapshots/BPKCalendarTests/test_rangeSelectionCalendar_sameDay.light-mode.png'%0A' M Backpack-SwiftUI/Tests/Calendar/Snapshots/BPKCalendarTests/test_rangeSelectionCalendar_sameDay.rtl.png'%0A' M Backpack-SwiftUI/Tests/Calendar/Snapshots/BPKCalendarTests/test_rangeSelectionCalendar_sameMonth.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/Calendar/Snapshots/BPKCalendarTests/test_rangeSelectionCalendar_sameMonth.light-mode.png'%0A' M Backpack-SwiftUI/Tests/Calendar/Snapshots/BPKCalendarTests/test_rangeSelectionCalendar_sameMonth.rtl.png'%0A' M Backpack-SwiftUI/Tests/Calendar/Snapshots/BPKCalendarTests/test_rangeSelectionCalendar_withAccessoryView.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/Calendar/Snapshots/BPKCalendarTests/test_rangeSelectionCalendar_withAccessoryView.light-mode.png'%0A' M Backpack-SwiftUI/Tests/Calendar/Snapshots/BPKCalendarTests/test_rangeSelectionCalendar_withAccessoryView.rtl.png'%0A' M Backpack-SwiftUI/Tests/Calendar/Snapshots/BPKCalendarTests/test_singleSelectionCalendar.dark-mode.png'%0A' M Backpack-SwiftUI/Tests/Calendar/Snapshots/BPKCalendarTests/test_singleSelectionCalendar.light-mode.png'%0A' M Backpack-SwiftUI/Tests/Calendar/Snapshots/BPKCalendarTests/test_singleSelectionCalendar.rtl.png'%0A' D Backpack-SwiftUI/Tests/NavigationTabGroup/Snapshots/BPKNavigationTabGroupTests/test_dark.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/NavigationTabGroup/Snapshots/BPKNavigationTabGroupTests/test_dark.light-mode.png'%0A' D Backpack-SwiftUI/Tests/NavigationTabGroup/Snapshots/BPKNavigationTabGroupTests/test_dark.rtl.png'%0A' D Backpack-SwiftUI/Tests/NavigationTabGroup/Snapshots/BPKNavigationTabGroupTests/test_default.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/NavigationTabGroup/Snapshots/BPKNavigationTabGroupTests/test_default.light-mode.png'%0A' D Backpack-SwiftUI/Tests/NavigationTabGroup/Snapshots/BPKNavigationTabGroupTests/test_default.rtl.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_clearableField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_clearableField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_clearableField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_disabledField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_disabledField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_disabledField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_disabledField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_disabledField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_disabledField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_errorField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_errorField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_errorField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_errorField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_errorField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_errorField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_validField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_validField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_validField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_validField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_validField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_validField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withPrefixIcon.rtl.png'

@novinfard novinfard marked this pull request as ready for review November 21, 2024 07:48
@novinfard novinfard changed the title [APP-5] The first day of week in the Calendar based on the User Localisation [APP-83] The first day of week in the Calendar based on the User Localisation Nov 21, 2024
@brunomdac brunomdac merged commit 678e7c8 into main Nov 21, 2024
14 checks passed
@brunomdac brunomdac deleted the donburi/APP-5-first-day-of-week branch November 21, 2024 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Non breaking change swiftui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants