Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
Ramanpreet Nara 0343e697fd Fix NVC for RCTTextInlineImage
Summary:
This diff fixes the Static/Native ViewConfigs for RCTTextInlineImage.

Changelog: [Internal]

Reviewed By: p-sun, sshic

Differential Revision: D33674127

fbshipit-source-id: 8cf5ffeaca635b4afd30c437dc0f87ea1fdc15a8
2022-01-20 13:52:03 -08:00
Andres Suarez 8bd3edec88 Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33367752

fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -08:00
Ramanpreet Nara 39a35feff7 Fix uiViewClassName for TextInlineImageNativeComponent
Summary:
See title.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D32811821

fbshipit-source-id: 2c6fad21cd1e094162a12a4056ddeab948231c57
2021-12-06 15:44:23 -08:00
Tim Yung 77ecc7ede1 JS: Format with Prettier v2.4.1 [3/n]
Summary:
Changelog:
[General][Internal]

Reviewed By: zertosh

Differential Revision: D31883447

fbshipit-source-id: cbbf85e4bf935096d242336f41bf0cc5d6f92359
2021-11-02 22:14:16 -07:00
David Vacca 34d3efe2ef TextInlineImage view configs
Summary:
Migrate RCTTextInlineImage to use NativeComponentRegistry

changelog: [internal] internal

Reviewed By: PeteTheHeat

Differential Revision: D26427141

fbshipit-source-id: 56c120f19493e17c9be4e467032e0a4f2244c0a9
2021-02-17 10:46:20 -08:00
Eli White 69c38e5a63 Introduce flow type to differentiate between HostComponent, NativeMethodsMixin, and NativeComponent
Summary:
In React Native there are three types of "Native" components.

```
createReactClass with NativeMethodsMixin
```
```
class MyComponent extends ReactNative.NativeComponent
```
```
requireNativeComponent('RCTView')
```

The implementation for how to handle all three of these exists in the React Native Renderer. Refs attached to components created via these methods provide a set of functions such as
```
.measure
.measureInWindow
.measureLayout
.setNativeProps
```

These methods have been used for our core components in the repo to provide a consistent API. Many of the APIs in React Native require a `reactTag` to a host component. This is acquired by calling `findNodeHandle` with any component. `findNodeHandle` works with the first two approaches.

For a lot of our new Fabric APIs, we will require passing a ref to a HostComponent directly instead of relying on `findNodeHandle` to tunnel through the component tree as that behavior isn't safe with React concurrent mode.

The goal of this change is to enable us to differentiate between components created with `requireNativeComponent` and the other types. This will be needed to be able to safely type the new APIs.

For existing components that should support being a host component but need to use some JS behavior in a wrapper, they should use `forwardRef`. The majority of React Native's core components were migrated to use `forwardRef` last year. Components that can't use forwardRef will need to have a method like `getNativeRef()` to get access to the underlying host component ref.

Note, we will need follow up changes as well as changes to the React Renderer in the React repo to fully utilize this new type.

Changelog:
[Internal] Flow type to differentiate between HostComponent and NativeMethodsMixin and NativeComponent

Reviewed By: jbrown215

Differential Revision: D17551089

fbshipit-source-id: 7a30b4bb4323156c0b2465ca41fcd05f4315becf
2019-09-25 10:12:38 -07:00
Logan Daniels 91f139b941 xplat/js/react-native-github
Reviewed By: panagosg7

Differential Revision: D16657770

fbshipit-source-id: 4e260842c838a35317515044c54ccf55a083da33
2019-08-09 10:11:15 -07:00
James Ide 0ee5f68929 Migrate "Libraries" from Haste to standard path-based requires (sans vendor & renderers) (#24749)
Summary:
This is the next step in moving RN towards standard path-based requires. All the requires in `Libraries` have been rewritten to use relative requires with a few exceptions, namely, `vendor` and `Renderer/oss` since those need to be changed upstream. This commit uses relative requires instead of `react-native/...` so that if Facebook were to stop syncing out certain folders and therefore remove code from the react-native package, internal code at Facebook would not need to change.

See the umbrella issue at https://github.com/facebook/react-native/issues/24316 for more detail.

[General] [Changed] - Migrate "Libraries" from Haste to standard path-based requires
Pull Request resolved: https://github.com/facebook/react-native/pull/24749

Differential Revision: D15258017

Pulled By: cpojer

fbshipit-source-id: a1f480ea36c05c659b6f37c8f02f6f9216d5a323
2019-05-08 08:48:59 -07:00
Héctor Ramos 1151c096da Update copyright headers to yearless format
Summary: This change drops the year from the copyright headers and the LICENSE file.

Reviewed By: yungsters

Differential Revision: D9727774

fbshipit-source-id: df4fc1e4390733fe774b1a160dd41b4a3d83302a
2018-09-11 15:33:07 -07:00
Eli White d2c27f5bff Remove view configs from JS
Summary: Apparently different apps have different implementations of view managers that support different props. This is a problem that we will need to address. Unfortunately, this means we can't have a static config defined in JS. We will need to find another approach to this problem.

Reviewed By: sahrens

Differential Revision: D9500178

fbshipit-source-id: b591559164fcf29f5fd43e13a0f2da15011491c6
2018-08-24 14:04:09 -07:00
Eli White daec505144 Put RCTTextInlineImage ViewConfig in JS
Summary: Moving this config to native for android so we skip the native lookup for the config.

Reviewed By: yungsters

Differential Revision: D9485645

fbshipit-source-id: cc0a6e9f12dad0c08aac32ca210373c388d307d6
2018-08-23 21:48:04 -07:00