This repository was archived by the owner on Feb 5, 2025. It is now read-only.
Fix the prologue buttons background color when using a dynamic color #581
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


Part of: woocommerce/woocommerce-ios#3824
Description
In LoginPrologueViewController, we have the option to provide a background color for the prologue buttons and have that background color extend the full width of the screen (when
buttonsBackgroundColorandprologueViewBackgroundColorare the same color).However, setting that background color to a dynamic color breaks the behavior in the same way as in the original issue woocommerce/woocommerce-ios#3319.
Changes
In #539, the fix for woocommerce/woocommerce-ios#3319 includes a check to compare
prologueViewBackgroundColorandbuttonsBackgroundColor, to determine if the blur effect should be applied or if the view's background color should be set.However, that compares the UIColor objects, which may be different even if their color values are the same. This PR compares the CGColor value instead, to ensure we're doing a valid comparison of the color data.
Testing
Build and run the app from the branch in WooCommerce that uses these changes, to confirm the background looks as expected in light and dark mode: https://github.com/woocommerce/woocommerce-ios/tree/issue/3824-prologue-carousel