-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Abstract underlying Color implementation #38668
Conversation
This pull request was exported from Phabricator. Differential Revision: D47873465 |
Base commit: 8bcfc49 |
This pull request was exported from Phabricator. Differential Revision: D47873465 |
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Reviewed By: mdvacca Differential Revision: D47873465 fbshipit-source-id: 8ad1170cd92f678826681ba9b0b068f6d41a978d
This pull request was exported from Phabricator. Differential Revision: D47873465 |
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Differential Revision: D47873465 fbshipit-source-id: 283ef5d44f512fbd228e68aff88f11957388a68d
This pull request was exported from Phabricator. Differential Revision: D47873465 |
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Differential Revision: D47873465 fbshipit-source-id: b117186689af80d469d3b63563831c4e25bc7f06
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Reviewed By: NickGerleman Differential Revision: D47873465 fbshipit-source-id: 90c20bfafaa0e3ef40cafadcfc7a440d9c7c1250
This pull request was exported from Phabricator. Differential Revision: D47873465 |
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Reviewed By: NickGerleman Differential Revision: D47873465 fbshipit-source-id: cd19cfd8ddfccbc71c7dbce7ad6bb88d6fa168b0
This pull request was exported from Phabricator. Differential Revision: D47873465 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D47873465 |
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Reviewed By: NickGerleman Differential Revision: D47873465 fbshipit-source-id: 901fcee352fa891f4a33764980c780ad7408bd6d
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Reviewed By: NickGerleman Differential Revision: D47873465 fbshipit-source-id: e30ccf4e1692f2625b6d0f225f59a471cf44ee06
This pull request was exported from Phabricator. Differential Revision: D47873465 |
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Reviewed By: NickGerleman Differential Revision: D47873465 fbshipit-source-id: ba13f4f3d3e50996a6a3e291102313261c2f2eb8
This pull request was exported from Phabricator. Differential Revision: D47873465 |
This pull request was exported from Phabricator. Differential Revision: D47873465 |
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Differential Revision: https://internalfb.com/D47873465 fbshipit-source-id: 6eb3051b2772802ddc9dabd05a39f6a304be4c9b
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Differential Revision: https://internalfb.com/D47873465 fbshipit-source-id: 4302c35f1c82b64b694b1bc1c5cf4e802ccb0ee2
This pull request was exported from Phabricator. Differential Revision: D47873465 |
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Reviewed By: NickGerleman Differential Revision: D47873465 fbshipit-source-id: 8a8a5db432d8d85303d96b566efeae5dfbd3a526
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Differential Revision: https://internalfb.com/D47873465 fbshipit-source-id: aa3cfac27c7bc577b6a5e1b41eaf3faf8be4371e
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Reviewed By: NickGerleman Differential Revision: D47873465 fbshipit-source-id: 02052787d822a737468029256e273de2724a09cf
This pull request was exported from Phabricator. Differential Revision: D47873465 |
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Differential Revision: https://internalfb.com/D47873465 fbshipit-source-id: 425dfd1b4031953e099f96ca96be6c58fc4dac36
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Differential Revision: https://internalfb.com/D47873465 fbshipit-source-id: c51d3fdd793ae5883790de046c3c82ab4688a8c3
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Differential Revision: https://internalfb.com/D47873465 fbshipit-source-id: ff07660cba0545fd44a21aee7598322a91c1f550
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Differential Revision: https://internalfb.com/D47873465 fbshipit-source-id: 9e7974612555a284116a578664af622802e87afb
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Reviewed By: NickGerleman Differential Revision: D47873465 fbshipit-source-id: dce26de7a1fbbf01f67f9794a63896588b61aaa9
This pull request was exported from Phabricator. Differential Revision: D47873465 |
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Differential Revision: https://internalfb.com/D47873465 fbshipit-source-id: 607572631891725b637cf73976e56486ff62e38a
Summary: Pull Request resolved: facebook#38549 Out of tree platforms may need different implementations of ViewProps. In fact, Android does already with props like `needsOffscreenAlphaCompositing` and `focusable`. This diff is not opinionated on whether these props should actually be shared on all platforms. Props like `focusable` may be a good candidate for generalizing to all platforms. However, there will always be a need for one platform to experiment with a new prop while it's not available yet on another, especially when considering out of tree platforms. This diff moves the existing ViewProps class to BaseViewProps, aliases ViewProps as BaseViewProps for iOS for now, and moves Android-specific view props to it's own header and implementation. ## Changelog: [General] [Added] - Support additional View props in out of tree platform Fabric implementations Differential Revision: https://internalfb.com/D47492635 fbshipit-source-id: 47b3f616a342195b5fc408a0075b07db2221aa03
…ebook#38580) Summary: Pull Request resolved: facebook#38580 We already have a differential between Android and iOS View props that force view flattening (or unflattening) behaviors. Other out-of-tree platforms may have a need to customize view flattening behaviors. This change adds a ViewTraitsInitializer header that out of tree platforms can inject to include platform-specific ViewProps fields when considering view flattening behaviors. ## Changelog: [General] [Added] - Support customization of View traits for flattening in out of tree platform Fabric implementations Differential Revision: https://internalfb.com/D47721377 fbshipit-source-id: 39dab5c7d66617ad5fc922b7f8504dced18ebe4a
…facebook#38582) Summary: Pull Request resolved: facebook#38582 Some out of tree platforms may have extra events (e.g., events for different input modalities) that don't exist on other platforms. For example, react-native-windows and react-native-macos have `onKeyUp` and `onKeyDown` that can be emitted from any native component. This change provides a hook for out of platforms to customize which events can be emitted from all native components. ## Changelog: [General] [Added] - Support additional View events in out of tree platform Fabric implementations Differential Revision: https://internalfb.com/D47721603 fbshipit-source-id: 52e16e3b36ce0051ae174d4deede9c229ad16eef
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Reviewed By: NickGerleman Differential Revision: D47873465 fbshipit-source-id: 6ee8acb05e6bd7a5c797f2e5bb40387bcbbd2e2d
This pull request was exported from Phabricator. Differential Revision: D47873465 |
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Differential Revision: https://internalfb.com/D47873465 fbshipit-source-id: 817e43df1042db5fcf84e9f30965972b7f250d8a
Summary: Pull Request resolved: facebook#38668 On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors. This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used. ## Changelog: [General] [Added] - Support customization of underlying Color representation in out-of-tree platforms Differential Revision: https://internalfb.com/D47873465 fbshipit-source-id: f544cf085153f689dd9fcf3fa8d0e78b985333ce
This pull request has been merged in 2b688f6. |
Summary:
On other platforms (e.g., react-native-windows), it's possible that platform colors may not be efficiently represented as int32_t values. In the case of react-native-windows, Color can either be an ARGB value or a list of fallback strings for platform colors.
This change should decouple how platforms represent color values, allowing them to manage how they are used at the point they are used.
Changelog:
[General] [Added] - Support customization of underlying Color representation in out-of-tree platforms
Differential Revision: D47873465