-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Fabric] Add support for PlatformColor #7801
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asklar
reviewed
May 19, 2021
vnext/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/Color.cpp
Show resolved
Hide resolved
NickGerleman
approved these changes
May 20, 2021
Hello @acoates-ms! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
facebook-github-bot
pushed a commit
to facebook/react-native
that referenced
this pull request
May 23, 2021
Summary: `isColorMeaningful` is the only place in xplat code that currently uses `colorComponentsFromColor`, which assumes that a color is an RGBA value. When implementing `PlatformColor` for windows, where colors might be complex patterns or effects, I'd like to keep the details of `SharedColor` isolated within `SharedColor`. This change moves `isColorMeaningful` into `color.cpp`, where each platform can provide an implementation that takes into account its platform specific color capabilities. See microsoft/react-native-windows#7801 for an example of window's SharedColor which can be either an RGBA value, or a name of a native color/brush. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Internal] [Changed] - Move isColorMeaningful to platform specific code Pull Request resolved: #31557 Test Plan: This shouldn't change any of the code, its just moving the existing function - normal CI/automation should be plenty of validation. Reviewed By: JoshuaGross, sammy-SC Differential Revision: D28557698 Pulled By: mdvacca fbshipit-source-id: 2a94850fe9c5037598107e1307f4153cee6491fb
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: Fabric
Support Facebook Fabric
AutoMerge
Causes a PR to be automatically merged once all requirements are passed (label drives bot activity)
New Architecture
Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric
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.
This overrides the implementation of the native fabric Color object to add support for PlatformColor.
The Color object is already platform specific with a different implementation on ios than on android.
Microsoft Reviewers: Open in CodeFlow