-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Add NativeColorType opaque type to normalizeColor() ahead of PlatformColor PR. #28040
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TheSavior has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
…as it does in the larger PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TheSavior has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
This pull request was successfully merged by @tom-un in dbe0d7d. When will my fix make it into a release? | Upcoming Releases |
…Color PR. (facebook#28040) Summary: The [PlatformColor PR](facebook#27908) is currently open to implement the [PlatformColor proposal](react-native-community/discussions-and-proposals#126). When that PR was imported into Facebooks internal builds it was found that the change to the `processColor()` function to return an opaque type or `number` instead of just `number` breaks internal components. This PR is a simplification of the PlatformColor PR only changing the return type of `processColor()` from `?number` to `?number | NativeColorType` where `NativeColorType` is just an empty but opaque type. This will allow changes to be made to these internal components but with less risk than the larger PR. ## Changelog [General] [Changed] - Add NativeColorType opaque type to normalizeColor() ahead of PlatformColor PR Pull Request resolved: facebook#28040 Test Plan: Flow checks, Jest test, iOS unit tests, iOS integration tests, and manual testing performed on RNTester for iOS and Android. Differential Revision: D19860205 Pulled By: TheSavior fbshipit-source-id: 799662c6621d3974158b375ccccfa136982c43b4
Summary
The PlatformColor PR is currently open to implement the PlatformColor proposal. When that PR was imported into Facebooks internal builds it was found that the change to the
processColor()
function to return an opaque type ornumber
instead of justnumber
breaks internal components.This PR is a simplification of the PlatformColor PR only changing the return type of
processColor()
from?number
to?number | NativeColorType
whereNativeColorType
is just an empty but opaque type. This will allow changes to be made to these internal components but with less risk than the larger PR.Changelog
[General] [Changed] - Add NativeColorType opaque type to normalizeColor() ahead of PlatformColor PR
Test Plan
Flow checks, Jest test, iOS unit tests, iOS integration tests, and manual testing performed on RNTester for iOS and Android.