trustedshops-public / etrusted-ios-trustbadge-library

Show TrustBadge on your iOS app
MIT License
2 stars 2 forks source link

Merge changes for dark mode support with develop branch #41

Closed prempratapsingh closed 1 year ago

prempratapsingh commented 1 year ago

Relates: https://tracker.trustedshops.com/browse/MAD-58

Description

Trustylib library now supports dark mode. It adapts to iOS system's color scheme by default and thus uses light or dark color scheme for the widgets based on the active color scheme.

To force light or dark color mode for the library so that it doesn't change based on iOS device color scheme, host applications need to have below key-value pair to your app's Info.plist file

<key>UIUserInterfaceStyle</key>
<string>Light/Dark</string> 

UIUserInterfaceStyle key is Apple's recommended way of sticking to either light or dark mode, thus Trustylib looks for this key in the app's Info.plist file and sets the widgets' color scheme mode based on it's value. If this key isn't found, Trustylib adapts to the iOS system provided dynamic color scheme.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 81.63% and project coverage change: -0.36 :warning:

Comparison is base (e723365) 87.71% compared to head (eeb37b4) 87.36%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #41 +/- ## =========================================== - Coverage 87.71% 87.36% -0.36% =========================================== Files 60 64 +4 Lines 2809 2983 +174 Branches 1003 1083 +80 =========================================== + Hits 2464 2606 +142 - Misses 115 134 +19 - Partials 230 243 +13 ``` | [Impacted Files](https://app.codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public) | Coverage Δ | | |---|---|---| | [Sources/Trustylib/Views/TrustbadgeView.swift](https://app.codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-U291cmNlcy9UcnVzdHlsaWIvVmlld3MvVHJ1c3RiYWRnZVZpZXcuc3dpZnQ=) | `74.25% <60.46%> (-5.75%)` | :arrow_down: | | [...ests/TrustylibTests/TrustbadgeViewModelTests.swift](https://app.codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-VGVzdHMvVHJ1c3R5bGliVGVzdHMvVHJ1c3RiYWRnZVZpZXdNb2RlbFRlc3RzLnN3aWZ0) | `89.44% <66.66%> (+0.05%)` | :arrow_up: | | [...ces/Trustylib/ViewModels/TrustbadgeViewModel.swift](https://app.codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-U291cmNlcy9UcnVzdHlsaWIvVmlld01vZGVscy9UcnVzdGJhZGdlVmlld01vZGVsLnN3aWZ0) | `88.81% <77.77%> (+0.58%)` | :arrow_up: | | [...ts/TrustylibTests/TrustbadgeColorSchemeTests.swift](https://app.codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-VGVzdHMvVHJ1c3R5bGliVGVzdHMvVHJ1c3RiYWRnZUNvbG9yU2NoZW1lVGVzdHMuc3dpZnQ=) | `81.25% <81.25%> (ø)` | | | [...stylibTests/TrustbadeColorSchemeManagerTests.swift](https://app.codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-VGVzdHMvVHJ1c3R5bGliVGVzdHMvVHJ1c3RiYWRlQ29sb3JTY2hlbWVNYW5hZ2VyVGVzdHMuc3dpZnQ=) | `81.57% <81.57%> (ø)` | | | [...stylib/Utilities/TrustbadeColorSchemeManager.swift](https://app.codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-U291cmNlcy9UcnVzdHlsaWIvVXRpbGl0aWVzL1RydXN0YmFkZUNvbG9yU2NoZW1lTWFuYWdlci5zd2lmdA==) | `91.42% <91.42%> (ø)` | | | [.../Trustylib/Views/Extensions/Color + TsColors.swift](https://app.codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-U291cmNlcy9UcnVzdHlsaWIvVmlld3MvRXh0ZW5zaW9ucy9Db2xvciArIFRzQ29sb3JzLnN3aWZ0) | `100.00% <100.00%> (ø)` | | | [...ources/Trustylib/Views/TrustbadgeColorScheme.swift](https://app.codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-U291cmNlcy9UcnVzdHlsaWIvVmlld3MvVHJ1c3RiYWRnZUNvbG9yU2NoZW1lLnN3aWZ0) | `100.00% <100.00%> (ø)` | | | [.../Trustylib/Views/Widgets/BuyerProtectionView.swift](https://app.codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-U291cmNlcy9UcnVzdHlsaWIvVmlld3MvV2lkZ2V0cy9CdXllclByb3RlY3Rpb25WaWV3LnN3aWZ0) | `91.04% <100.00%> (+0.13%)` | :arrow_up: | | [...s/Trustylib/Views/Widgets/GradeAndRatingView.swift](https://app.codecov.io/gh/trustedshops-public/etrusted-ios-trustbadge-library/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trustedshops-public#diff-U291cmNlcy9UcnVzdHlsaWIvVmlld3MvV2lkZ2V0cy9HcmFkZUFuZFJhdGluZ1ZpZXcuc3dpZnQ=) | `89.39% <100.00%> (+0.16%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

83.6% 83.6% Coverage
0.0% 0.0% Duplication