Commit Graph

5519 Commits

Author SHA1 Message Date
Zhiyao Zhou e625616118 Revert D42014650: Remove legacy-support-core-ui
Differential Revision:
D42014650 (https://github.com/facebook/react-native/commit/6fe6d084b0cf362908ad4265bef4640f3775002a)

Original commit changeset: 4a4cf263fbd8

Original Phabricator Diff: D42014650 (https://github.com/facebook/react-native/commit/6fe6d084b0cf362908ad4265bef4640f3775002a)

fbshipit-source-id: 4eb8b6636b4c1672867ba66865c4bcda5421e6a1
2023-01-05 01:22:11 -08:00
Joshua Selbo 6fe6d084b0 Remove legacy-support-core-ui
Summary: Changelog: [Internal]

Reviewed By: hick209

Differential Revision: D42014650

fbshipit-source-id: 4a4cf263fbd8471dd905e53ea8ee6acacae68010
2023-01-04 22:29:53 -08:00
Jakub Piasecki 805b88c7a4 Fix possible ConcurrentModificationException when accessing the list of view managers (#35770)
Summary:
With the current implementation, it's possible to get a reference to the list of view managers while it's being populated, which in some cases results in `ConcurrentModificationException` thrown [here](https://github.com/facebook/react-native/blob/9c57a7f20925765da69590256ca8755b71735cdb/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java#L80). This PR updates the logic, so the reference to the list is updated (and returned) only when it's ready.

## Changelog

[ANDROID] [FIXED] - Fix possible `ConcurrentModificationException` in `UIManagerModuleConstantsHelper::createConstants`

Pull Request resolved: https://github.com/facebook/react-native/pull/35770

Reviewed By: cortinico

Differential Revision: D42342107

Pulled By: rshest

fbshipit-source-id: 8d799535c811edeefa1903fbf7a46bff22691e59
2023-01-04 04:38:38 -08:00
Xin Chen aacf28778e Reset the contentDescription when accessibility text is empty to revoke stale state
Summary:
This diff fixes accessibility value setter in BaseViewManager.java when the accessibility value is null. This is needed when we reset the value and would like to make sure the content description reflects the expected state, instead of the stale state when the value is set last time.

Changelog:
[Android][Fixed] - Reset accessibility value when it gets a null value

Reviewed By: NickGerleman

Differential Revision: D42160904

fbshipit-source-id: a8115a268461c8340d38350ab6fd3f21e4b14959
2023-01-03 13:48:58 -08:00
Sharon Zheng 14330b56c2 track previous contentOffset to avoid duplicate calls
Summary:
- there was a bug when `contentOffset` was set to {x:0, y:0} and there were items lazy loaded in with prop changes- the View would consistently scroll back to the top after loading in new items
- to avoid this, we store the offset value when it's first set, and only run the `scrollTo` logic then

Changelog:
[Internal][Fixed] - Fix contentOffset forcing scroll to top behavior

Reviewed By: fkgozali, mdvacca

Differential Revision: D42089871

fbshipit-source-id: 3968d98341728a45bec28e8783c9977e91dd4d2c
2023-01-03 11:23:44 -08:00
jonathancaley daeee2a661 Correct logging (#35708)
Summary:
Fixes incorrect logging that I found whilst debugging

## Changelog

[Android] [FIXED] - Fixed incorrect logging of `isCatalystInstanceAlive` in exception handler

Pull Request resolved: https://github.com/facebook/react-native/pull/35708

Test Plan: N/A as change is related to logging

Reviewed By: christophpurrer

Differential Revision: D42233178

Pulled By: robhogan

fbshipit-source-id: f48e5abc036393a40f836cf0bf8c1d69f03ca848
2023-01-03 04:24:57 -08:00
Arushi Kesarwani 4923a0997b Adding show/hide Native Implementation of Dev Loading Module (#35746)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35746

Changelog:
[Android][Added] -  For supporting Dev Loading View across multiple platforms, adding native implementation for showMessage() & hide() of Dev Loading Module

Reviewed By: rshest

Differential Revision: D42286425

fbshipit-source-id: b2aa160583bc86965501f3ed3027152bb0b47af0
2022-12-30 14:39:20 -08:00
Arushi Kesarwani 068a20842d Adding native implementation for Dev Loading View for Android (#35743)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35743

Changelog:
[Android][Added] - For supporting Dev Loading View across multiple platforms, altering the javascript implementation of Loading view of android to also rely on native implementation as iOS instead of Toast, thereby unifying both platforms

Reviewed By: rshest

Differential Revision: D42258041

fbshipit-source-id: 1be56c1e5696b1024ba09a0aa11da96e0a08f210
2022-12-29 15:06:13 -08:00
Ruslan Shestopalyuk ad953f6f4b Unify native performanceNow implementation across platforms
Summary:
[Changelog][Internal]

Both iOS and Android platforms are at this point using the same native implementation of `performanceNow`, based on `std::chrono` (it used to be different some time ago).

This diff unifies the implementations, so it comes from one place in C++ code for all platforms.

The context is that I am developing event timing instrumentation and need a consistent way to get current timestamp from either JS or native (C++) side. The latter is now possible via calling `JSExecutor::performanceNow()`, which is guaranteed to be the same as called from JS.

Reviewed By: christophpurrer

Differential Revision: D42267898

fbshipit-source-id: dcb592f37d6567340ea59faddbf3b6d2b8507d50
2022-12-28 11:03:14 -08:00
Samuel Susla 874881e73e Bring setNativeProps to Fabric
Summary:
changelog: [internal]

This is experimental implementation of `setNativeProps` in Fabric.

This diff brings `setNativeProps` to Fabric to make migration easier. I tried to stay as close as possible to Paper's behaviour, with all of its flaws (ready CAUTION section on https://reactnative.dev/docs/direct-manipulation)

State can't be stored in views because on iOS, eventually on Android, views are not the source of truth, shadow tree is. Fabric's implementation keeps state from setNativeProps in shadow node family in very inefficient data structure folly::dynamic. It is always reconciled with new prop updates. The performance cost is only paid in case node has used `setNativeProps` before.

Reviewed By: mdvacca

Differential Revision: D41875413

fbshipit-source-id: 453a5f7612a6f86a4cece269b13bd2ffd0c0e2d1
2022-12-24 06:40:42 -08:00
Lulu Wu 9f78517d64 Venice][Android] Migrate ReactModalHostView to use BridgelessReactContext
Summary:
- Use ThemedReactContext explicitly to reduce confusion, "addLifecycleEventListener()" and "removeLifecycleEventListener" should be forced to call on ThemedReactContext
- Migrate "getNativeModule" and "handleException" calls from ThemedReactContext to ThemedReactContext.getReactApplicationContext

Changelog:
[Android][Changed] - Use ThemedReactContext explicitly to reduce confusion

Reviewed By: mdvacca

Differential Revision: D42101979

fbshipit-source-id: be34b7397ccf4f58477bab6cfa8c58eedd99e225
2022-12-19 12:45:09 -08:00
David Vacca b71b43abbf Refactor CXX Component classes
Summary:
This diff is moving all relevant cxx component classes out of react-native-github, this is necessary to make it easy to iterate on their APIs
We will move them back again to OSS once we make the API stable

changelog: [internal] internal

Reviewed By: arhelmus

Differential Revision: D42018363

fbshipit-source-id: bacf0c667e2e8df57b4b57e257bf937586b8e6f7
2022-12-19 01:35:40 -08:00
David Vacca e193d1c08c Delete CppViewMutationsWrapper
Summary:
Delete CppViewMutationsWrapper as it's not used anymore

changelog: [internal] internal

Differential Revision: D42018361

fbshipit-source-id: a0c6d4acc7704a37fb6de902e92de461db94775c
2022-12-19 01:35:40 -08:00
David Vacca 14b77938bc Remove unused dependencies in fabric
Summary:
Remove unused dependencies in fabric

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D42018360

fbshipit-source-id: 877355e6915db44681eaf59e08cdd842b27fc144
2022-12-19 01:35:40 -08:00
David Vacca 32af566694 Add logs to analyze IllegalStateException on creation of views
Summary:
Add logs to analyze IllegalStateException on creation of views

changelog: [internal] internal

Reviewed By: philIip

Differential Revision: D42111336

fbshipit-source-id: bcf6495203cd6440a0ebc52ce8f962c459c38c43
2022-12-16 16:11:19 -08:00
David Vacca 88da8d99ed Fix NullPointerException occurring when using Placeholder in TextInput
Summary:
This diff is fixing a NullPointerException occuring when using Placeholder in TextInput. In some particular scenarios Placeholder is being updated before the TextInput is even layed out.

In this diff I'm setting a defult LayoutParams to avoid NullPointerException to be thrown by android EditTextView. This change should not affect layout for TextInput components because layout will be overriden on the next Fabric commit.

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D42078080

fbshipit-source-id: 294376e7f78d6ed58fc9f893553356553accba6c
2022-12-16 09:42:28 -08:00
Nicola Corti 3487640512 Fix prefab prefix for fabricjni (#35648)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35648

The `fabricjni` prefab module was missing the `react/fabric` prefix.
I'm adding it here.
Ref: https://github.com/reactwg/react-native-releases/discussions/41#discussioncomment-4402506

Changelog:
[Internal] [Changed] - Fix prefab prefix for fabricjni

Reviewed By: cipolleschi

Differential Revision: D42047434

fbshipit-source-id: 202db49cd1ada2462652dbd7e56bad6779c263ac
2022-12-15 04:54:14 -08:00
Xin Chen cf9c7d51ef Fix edge case when delete is queued with conflict layout animation
Summary:
This is a two step (1/2) fix to a race that could caused a `DELETE`...`CREATE` mutations being sent over to the fabric mounting layer. Such combination was assumed not possible from the differ, yet it happened at least in the existence of layout animation and when certain commits happen while animation is active.

This race condition could cause a view to get deleted at the end of one UI frame, yet the mount instructions generated from animation in the next frame still need to access the deleted view and caused crashes like T112157805. Note that even though such crash is recorded as `RetryableMountingLayerException` and is a soft crash (which only gets logged but not crash in production), the out-of-order mount instructions could lead to illegal view state and make the surface unusable, like what's shown here:

{F820669000}

The diff fixes this issue by removing the `DELETE` [conflict animation](https://fburl.com/code/5ctckvz3) keyframe, as well as the `CREATE` [immediate mutations](https://fburl.com/code/txyomytd) from the layout animation. The Fabric mounting layer assumes no combination of `DELETE...CREATE` in the same frame from differ + [layout animation overrides](https://fburl.com/code/zn17uqch).

Reviewed By: sammy-SC

Differential Revision: D41895427

fbshipit-source-id: d6df02663ba707af6db4a63a325ac776ca54d18e
2022-12-13 01:17:37 -08:00
David Vacca a120679619 Add support for String props on C++ Components
Summary:
This diff adds support for String props on C++ Components

changelog: [internal] internal

Reviewed By: genkikondo

Differential Revision: D41784029

fbshipit-source-id: 3065186074e1feca3dd0dd724105f1596146ee1d
2022-12-12 20:05:23 -08:00
Xin Chen a3c47d3baa Replace RN Dev Tool perf logger usage of API 24 method in java.util.Comparator.naturalOrder
Summary:
Previous diff D41486648 is causing crashes and a sev S311353, which is due to usages of an old Android API that only work after level 24 (D36500518 (https://github.com/facebook/react-native/commit/0fc42fd35c577c71825f020b0fa09bee6d9ad105)). ~~This diff updates the implementation to use a compatible API, but with worse runtime complexity.~~

~~https://fburl.com/txd0r89e is a good explanation on the two algorithm to calculate a streaming median value. This diff uses the approach described in https://stackoverflow.com/a/4903642.~~

## Update
Following suggestion from sshic, I preserved the existing algorithm but with a custom comparator approach.

Changelog: [Internal]

Reviewed By: makovkastar

Differential Revision: D41505143

fbshipit-source-id: 494e07fa627b5cf8bad7971fa5de86d270a7412c
2022-12-12 13:50:44 -08:00
generatedunixname89002005325672 0f089ea2db Daily arc lint --take KTFMT
Reviewed By: adamjernst

Differential Revision: D41833756

fbshipit-source-id: 0ecc95aff3bdadadb0769dec55d27fb84fe50e95
2022-12-12 07:51:03 -08:00
David Vacca 57ffa12a08 Delete references of CppComponentRegistry from FabricJSIModuleProvider
Summary:
Delete references of CppComponentRegistry from FabricJSIModuleProvider since it's not necessary anymore

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D41638893

fbshipit-source-id: 8a7b032ead5972609dd4d3c1e40d9d60299c6480
2022-12-10 15:42:08 -08:00
David Vacca 4ab125961b Delete references of CppComponentRegistry from the internals of React Native Android renderer
Summary:
Delete references of CppComponentRegistry from the internals of React Native Android renderer, since it's not necessary anymore

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D41638890

fbshipit-source-id: c4b08853722874dbb21891817836862225469dd9
2022-12-10 15:42:08 -08:00
Lulu Wu 11b53908a7 Remove atomic fix
Summary:
Changelog:
[Android][Changed] - Remove testing code for atomic fix

Reviewed By: fkgozali

Differential Revision: D41730846

fbshipit-source-id: e73e3b9530969683d4247759f3923f105d79cd34
2022-12-10 14:45:22 -08:00
David Vacca ee437bf904 Delete isRootComponent method
Summary:
Delete isRootComponent method, since it's not necessary anymore

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D41638887

fbshipit-source-id: d1d58e07684cb8fd0fc48cfa1f3f92434c1d14c4
2022-12-10 10:30:47 -08:00
David Vacca d9e7be76cd Delete ComponentDeprecatedAPI
Summary:
Deletes references to ComponentDeprecatedAPI in favour of Component API

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D41638892

fbshipit-source-id: c83b2303650475aa59b438e46e96f976db586a27
2022-12-10 10:30:47 -08:00
David Vacca 30d50430a9 Delete C++ ViewManagers
Summary:
This diff deletes the first implementation of C++ ViewManagers integrated into the internals of Fabric

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D41638894

fbshipit-source-id: 2e7aebff587e2e57b7f3fbf37a24b04943c74573
2022-12-10 10:30:47 -08:00
fabriziobertoglio1987 006527fea7 Fix onAccessibilityAction on Fabric (#35507)
Summary:
fixes https://github.com/facebook/react-native/issues/30841#issuecomment-1228128357. onAccessibilityAction does not work on Fabric and logs:

```
E/unknown:ReactEventEmitter( 3845): com.facebook.react.bridge.ReactNoCrashSoftException:
Cannot find EventEmitter for receiveEvent: SurfaceId[1] ReactTag[104] UIManagerType[2]
```

## Changelog

[Android] [Fixed] - Fix onAccessibilityAction on Fabric

Pull Request resolved: https://github.com/facebook/react-native/pull/35507

Test Plan: https://github.com/facebook/react-native/pull/35507#issuecomment-1330876598

Reviewed By: javache

Differential Revision: D41707777

Pulled By: philIip

fbshipit-source-id: 0f4550a17f4b8bfc1aefa404059b367907f8f60d
2022-12-09 03:47:28 -08:00
Fredia Huya-Kouadio 4f142bf803 Update the logic to check for the source of a MotionEvent
Summary: Changelog: [Internal] Update logic to check for source of MotionEvent for PointerEvents

Reviewed By: lunaleaps

Differential Revision: D41851881

fbshipit-source-id: af3a49d75fc3d58e70d210e7f93d3a6dba90d1c3
2022-12-09 02:38:26 -08:00
David Vacca 0df2530c9e Fix lint warning in ReactChoreographer
Summary: changelog: [internal] internal

Reviewed By: javache

Differential Revision: D41621588

fbshipit-source-id: b85e001589f4b0eb7bc5b82329b2fcd9473a0dd2
2022-12-07 11:30:21 -08:00
David Vacca a98861f836 Extend Component to integrate layout and hierarchy of components
Summary:
In this diff I'm extending component to integrate layout and hierarchy of components

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D41621587

fbshipit-source-id: e31c87676ec3068036fb6e9444bce85934b18b7b
2022-12-07 11:30:21 -08:00
Alexander Oprisnik 605a52fe3e Added possibility to mark Fresco image pipeline as already initialized for RN apps
Summary:
Changelog:
[Android][Added] - Added possibility to mark Fresco image pipeline as already initialized

Reviewed By: defHLT

Differential Revision: D41741638

fbshipit-source-id: 46f059297f3af8c1f9cb4b93ce4add895bce85df
2022-12-07 10:35:01 -08:00
Pieter De Baets c2a4654d37 Switch TurboModules over to generated getName method
Summary:
Apply the codegen improvements from D41615387

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D41687534

fbshipit-source-id: 1d56f8fcb8d8b546291350785172a3b02abb0873
2022-12-07 06:35:01 -08:00
Pieter De Baets 90538909f9 Emit name constant as part of Java codegen
Summary:
We have the expected module name available as part of the codegen schema, so we can remove the need for developers to implement the `getName` method as part of their module implementation.

Note that this method is not actually used when the TurboModules infra is used, as the moduleName from the turbo module manager is passed through to the TurboModule base class instead. Moving the method to codegen will make it easier to remove this method altogether once the old architecture is fully removed.

Changelog: [Android][Added] Support generating `getName` in react-native-codegen for Java TurboModules

Reviewed By: mdvacca

Differential Revision: D41615387

fbshipit-source-id: 6b117645fa39e5e9ab014b21198496a52f6f2ae2
2022-12-07 06:35:01 -08:00
Samuel Susla 1d3fa40c59 Add setNativeProps to Fabric
Summary:
changelog: Introduce setNativeProps to Fabric

Add support for `setNativeProps` in Fabric for backwards compatibility. It is still recommended to move away from `setNativeProps` because the API will not work with future features.

We can make step [Migrating off setNativeProps](https://reactnative.dev/docs/new-architecture-library-intro#migrating-off-setnativeprops) in migration guide optional.

Reviewed By: yungsters, mdvacca

Differential Revision: D41521523

fbshipit-source-id: 4d9bbd6304b8c5ee24a36b33039ed33ae1fc21f8
2022-12-06 04:47:51 -08:00
Robert Balicki 96d6680e00 Add iOS + Android support for getting/setting reload-and-profile-related settings
Summary:
@public
* Add support for getting/setting reload-and-profile-related settings in iOS + Android

## Changelog:
[General][Added] - Add support for getting/setting reload-and-profile-related settings in iOS + Android

Reviewed By: NickGerleman

Differential Revision: D41040611

fbshipit-source-id: df99fb0101dfdfc6808708a5a6ecd9cb96a357d5
2022-12-05 22:07:30 -08:00
Neil Mitchell bdb2fd6979 Add support for Buck oncall annotations (#35562)
Summary:
Newer versions of Buck (not released open source) support an `oncall` annotation to denote who owns a particular BUCK file. These annotations are useful to support so that if BUCK files are updated with such annotations they don't break.

## Changelog

[Internal] [Changed] - support oncall annotation in BUCK files

Pull Request resolved: https://github.com/facebook/react-native/pull/35562

Test Plan: The `test_buck` CI job validates that the file can be evaluated by open-source Buck. I ran this on a CircleCI fork, and it passed.

Reviewed By: motiz88

Differential Revision: D41731925

Pulled By: cortinico

fbshipit-source-id: 7d0ae164c3e6289d4aa76892658d46bbe4faf99c
2022-12-05 06:12:46 -08:00
fabriziobertoglio1987 759056b499 Override default Talkback automatic content grouping and generate a custom contentDescription (#33690)
Summary:
The Implementation of the functionality consists of:

1) Checking that an element has no contentDescription and no text and has other content to announce (role, state, etc.) which causes this issue (for ex. the accessibilityRole is announced before the contentDescription for ex. "Button, My text children component")
2) If Talkback finds no content to announce on the current node, a custom contentDescription is generated from the child elements that respect the following conditions:

>If an AccessibilityNodeInfo is considered "actionable" (which Talkback defines as having clickable=true, longClickable=true, or focusable=true, or having AccessibilityActions for any of those), AND it has some content to read like a contentDescription or text, it will be considered focusable.
>If an AccessibilityNodeInfo is considered "actionable" AND it does not have content to read like a contentDescription or text Talkback will parse descendant elements looking for non-focusable descendants to use as content.

3) implementation of a method getTalkbackDescription to generate the above contentDescription from child elements
4) over-ride parent contentDescription (accessibilityLabel) with the value returned from getTalkbackDescription

Related [notes on Android: Role description is announced before the components text, rather than after https://github.com/facebook/react-native/issues/31042][51]. This issue fixes [https://github.com/facebook/react-native/issues/31042][50].

## Changelog

[Android] [Added] - Override default Talkback automatic content grouping and generate a custom contentDescription

Pull Request resolved: https://github.com/facebook/react-native/pull/33690

Test Plan:
**PR Branch**
[1]. Screenreader correctly announcing accessible/non-accessible items ([link][1])
[2]. Screenreader announces Pressability items ([link][2])
[3]. Button role is announced after child contentDescription with TouchableNativeFeedback ([link][3])
[4]. Testing for regressions in Accessibility Actions ([link][4])
[5]. Screenreader focuses on ScrollView Items ([link][5])
[6]. Recordings of complete test cases in rn-tester app main and pr branch ([link][6])
[9]. TouchableOpacity with TextInput child announces contentDescription before the Role ([link][9])
[10]. One of the child has accessibilityState (hasStateDescription triggers the announcement) ([link][10])
[11]. One of the child has accessibilityHint (hasText triggers the announcement) ([link][11])

**Main**
[15]. The View does not announce the child component Text when accessibilityLabel is missing (automatic content grouping) ([link][15])
[8]. TouchableOpacity with child EditText annouces placeholder text before and after the role ([link][8])

[1]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/14#issuecomment-1106375974 "Screenreader correctly announcing accessible/non-accessible items"
[2]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/14#issuecomment-1106213313 "Screenreader announces Pressability items"
[3]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/14#issuecomment-1109935139 "Button role is announced after child contentDescription"
[4]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/14#issuecomment-1110541392 "Testing for regressions in Accessibility Actions"
[5]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/14#issuecomment-1106012823 "Screenreader focuses on ScrollView Items"
[6]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/14#issuecomment-1111942775 "Recordings of complete test cases in rn-tester app main and pr branch"
[7]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/14#issuecomment-1139511589 "TouchableOpacity with child EditText annouces Button role before the child contentDescription"
[8]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/14#issuecomment-1140967225 "TouchableOpacity with child EditText annouces placholder text before and after the role"
[9]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/14#issuecomment-1140999648 "TouchableOpacity with TextInput child announces contentDescription before the Role"
[10]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/14#issuecomment-1149479950 "One of the child has accessibilityState (hasStateDescription triggers the announcement)"
[11]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/14#issuecomment-1149535215 "One of the child has accessibilityHint (hasText triggers the announcement)"

[15]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/14#issuecomment-1088680339 "The View does not announce the child component Text when accessibilityLabel is missing (automatic content grouping)"

[50]: https://github.com/facebook/react-native/issues/31042 "Android: Role description is announced before the components text, rather than after https://github.com/facebook/react-native/issues/31042"
[51]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/14 "notes on Android: Role description is announced before the components text, rather than after https://github.com/facebook/react-native/issues/31042"

Reviewed By: cipolleschi

Differential Revision: D39177512

Pulled By: blavalla

fbshipit-source-id: 6bd0fba9c347bc14b3839e903184c86d2bcab3d2
2022-12-01 21:32:04 -08:00
David Vacca fb84e092cf unique -> shared pointer in Component
Summary:
Refactor unique -> shared pointer in Component. This will be necessary in the next diffs of the stack

changelog: [intenal] internal

Differential Revision: D41629759

fbshipit-source-id: 335161c350692e25ac3443bd19675a89f9df60c4
2022-12-01 19:29:59 -08:00
Genki Kondo 07c8854a1c Consolidate OkHttpClient creation
Summary:
Consolidates creation of OkHttpClients used by RN panel apps into PanelAppOkHttpClientProvider. This diff adds no functional changes; however, a followup diff will leverage this to add an Interceptor for overriding the network tier.

Changelog:
[Internal] - Enable passing in custom OkHttpClient to NetworkingModule

Reviewed By: rshest

Differential Revision: D41621244

fbshipit-source-id: 8954f9adc6a0cfdf6312678e2dbd6be8ef9aa5ca
2022-12-01 10:24:55 -08:00
Xin Chen 0569f6500e Clean up unnecessary lambda function for preallocate after D40403682
Summary: `dispatchPreallocationInBackground_` is removed and we don't need to use the lambda function anymore.

Reviewed By: javache

Differential Revision: D41574447

fbshipit-source-id: 9c2b8a067fb86b75320b338e3f8c7989315f9b8b
2022-11-30 14:24:34 -08:00
Pieter De Baets e7dbfb2dbd Support colors in AnimatedInterpolation on Android
Summary:
Color support for AnimatedInterpolation was incomplete with native drivers, as only rgba type strings were supported. There was also an issue where color props instead a StyleAnimatedNode would never get applied. We were also potentially duplicating color parsing support, which is already centralized in `normalizeColor` / `processColor`.

Changelog: [Android][Added] Enable AnimatedInterpolation to interpolate arbitrary color types.

Reviewed By: mdvacca

Differential Revision: D40571873

fbshipit-source-id: 41857ab0391279c5307bc31b855ea8fbcb4cccd8
2022-11-30 10:19:12 -08:00
Nicola Corti ca9ef9f769 Rename hermes-* target to don't use dashes (#35506)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35506

In our build we had a mixture of `_` and `-` to separate targets.
Dashes don't play well with Gradle + as we expose them now via Prefab,
let's stick to use only underscores

Changelog:
[Internal] [Changed] - Rename target to don't use dashes

Reviewed By: cipolleschi

Differential Revision: D41578938

fbshipit-source-id: 8aa44aa2dc7bf4822b45e5044532837b989817d2
2022-11-29 10:43:54 -08:00
Pieter De Baets 229a1ded15 Remove ObjCTurboModule experiments with retaining JS callbacks in custom scopes
Summary: Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D41551086

fbshipit-source-id: b70965bcf2af6ebac921cc627c196ec108f73944
2022-11-29 08:29:05 -08:00
Pieter De Baets cadf850ac1 Remove JavaTurboModule experiments with retaining JS callbacks in custom scopes
Summary: Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D41551087

fbshipit-source-id: 5bdcd5f8c9bac99603f6187a9bc387827f5321c7
2022-11-29 08:29:05 -08:00
Pieter De Baets 1b994732e4 Fix pointer event dispatch to nested text nodes
Summary:
Noticed that we weren't receiving pointer events for nested Text spans when the new pointer events implementation was enabled.

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D41496672

fbshipit-source-id: 9d0ed83d1bb5f42211ec655328035651f25fa471
2022-11-29 07:00:13 -08:00
Pieter De Baets 9c88dad7a2 Remove references to deleted experiments
Summary:
These experiments have been removed already, but we still have references to them in C++.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D41549465

fbshipit-source-id: 1158fb391b4279ef4eb6ad7123cb8113d7ecccef
2022-11-29 05:22:13 -08:00
Luna Wei 8b00b4f286 Text measurement, Math.ceil calculatedWidth
Summary: Changelog: [Internal] - Fix incorrect text container measurement for Android 11+

Reviewed By: mdvacca

Differential Revision: D41559873

fbshipit-source-id: 76c200693cd10b9b7fe883dd81b0c3c1dbdecf27
2022-11-28 15:57:37 -08:00
Luna Wei 4e668167f9 PointerEvents: Delete unused method
Summary: Changelog: [Internal] - Clean up unused function for PointerEvents

Reviewed By: vincentriemer, mdvacca

Differential Revision: D41089897

fbshipit-source-id: 8c44b88d919f771fdafb2402ec71366dad6c6ed6
2022-11-28 11:01:32 -08:00
Luna Wei 75a8847a42 Fix detection supportsHover
Summary: Changelog: [Internal] - Internal usage broke existing behavior, reverting to check if a flag is set.

Reviewed By: javache

Differential Revision: D41502122

fbshipit-source-id: 296bb1578cd63f935e4111bfec8d58f965149640
2022-11-28 10:28:13 -08:00