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

Fix ColorWithSystemEffect not returning the correct base color #1845

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

chiuam
Copy link

@chiuam chiuam commented Jun 8, 2023

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

Summary

When the colorWithSystemEffect object gets normalized, we should be calling @react-native/normalize-colors not processColor. This is a regression from 68 because in 68 we return the unprocessed color, not the noralized color object https://github.com/microsoft/react-native-macos/blob/0.68-stable/Libraries/StyleSheet/normalizeColor.js#L25

Changelog

Test Plan

Before:
image

After:

image

@chiuam chiuam requested a review from a team as a code owner June 8, 2023 21:59
@Saadnajmi
Copy link
Collaborator

Saadnajmi commented Jun 8, 2023

Filed this for the long term "refactor this to share more code with iOS so we don't break unintentionally in the future again"
#1846

@chiuam chiuam merged commit 54940e4 into microsoft:main Jun 8, 2023
@chiuam chiuam deleted the fix-colorWithSystemEffect branch June 8, 2023 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants