Summary:
Currently, React Native throws an invariant violation error when a text string or number is supplied as a child. This is undesirable because core library components should be fault-tolerant and degrade gracefully (with soft errors, if relevant).
This change will work when a change in the host configs are landed (https://github.com/facebook/react/pull/21953).
Changelog: [internal]
Reviewed By: yungsters, sammy-SC
Differential Revision: D29894182
fbshipit-source-id: 827ff299991a476b57981382d196c7ee1396ec28
Summary:
Some of the links in `CONTRIBUTING.md` redirects you to a different page.
I've fixed the links so each link would directly send users to the appropriate page.
## 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] - update links in CONTRIBUTING.md
Pull Request resolved: https://github.com/facebook/react-native/pull/31903
Test Plan: - [ ] Change links shows the appropriate content
Reviewed By: lunaleaps
Differential Revision: D29933105
Pulled By: GijsWeterings
fbshipit-source-id: b5be74181f8a8e88d8f43e44c469337b7393dedf
Summary:
Part of https://github.com/facebook/react-native/issues/31788
~Updated link in README that was pointing to master branch to main branch~
Realized that link in rn-tester README and ReactAndroid README leads to a dead link, so I've fixed the links
## 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] [FIXED] - Fix dead links in README
Pull Request resolved: https://github.com/facebook/react-native/pull/31901
Test Plan: - [ ] Updated link directs you to appropriate page
Reviewed By: PeteTheHeat
Differential Revision: D29933044
Pulled By: GijsWeterings
fbshipit-source-id: c1f301626acbb2995d74f78d8bc19214c70e9319
Summary:
Changelog: [internal]
Fabric didn't have prop [removeClippedSubviews](https://reactnative.dev/docs/view#removeclippedsubviews) implemented. This diff adds it. It is
Reviewed By: JoshuaGross
Differential Revision: D29906458
fbshipit-source-id: 5851fa41d7facea9aab73ca131b4a0d23a2411ea
Summary:
Changelog: [Internal]
This diff replaced all the internal occurrences of "Immediate" with
"ReactNativeMicrotask" in the legacy bridge and then polyfilled the
original immediate APIs during the timer setup phases as aliases of them.
Note that this diff is part of a larger refactoring.
Reviewed By: RSNara
Differential Revision: D29785430
fbshipit-source-id: 7325d2a7358a6c9baa3e9abb8acf90414de5072f
Summary: Changelog: [Internal] - Add an example to demo all the transform properties.
Reviewed By: charlesbdudley
Differential Revision: D29865790
fbshipit-source-id: 79174457071de8fca9b0aab8bf8dcc543ea9a0a3
Summary:
- Update `RNTesterNavBar` to be positioned relatively to allow for scroll views to not be clipped
- Add EasingExample with example animations taken from https://reactnative.dev/docs/easing
Changelog: [Internal]
Reviewed By: lunaleaps
Differential Revision: D29744160
fbshipit-source-id: d0e2112769d74dd34e11477f1d3b1f8f0ffebc03
Summary:
Fixed a link in a comment that lead to dead link
whatwg-url changed the source directory from `lib` to `src`
## 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] [FIXED] - fix dead link in a comment
Pull Request resolved: https://github.com/facebook/react-native/pull/31902
Test Plan: - [ ] Changed URL opens properly
Reviewed By: charlesbdudley
Differential Revision: D29915170
Pulled By: lunaleaps
fbshipit-source-id: 00b69db82f51d16cf887cd4540a159132ad7d771
Summary:
There was an unused example in ScrollView example, so I've added the example to RNTester App
## 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] [Added] - Added persistentScrollbar option example for ScrollView in RNTester App
Pull Request resolved: https://github.com/facebook/react-native/pull/31895
Test Plan: - RNTester App builds and shows example properly on Android
Reviewed By: sshic
Differential Revision: D29881126
Pulled By: mdvacca
fbshipit-source-id: 9e7e61c9d3f712cb767a78e729469fc95cb9953e
Summary:
Changelog: [internal]
Original commit changeset: 390e773283a7
Original diff didn't resolve crash T82119127. Let's back this out and investigate again.
Reviewed By: mdvacca
Differential Revision: D29909878
fbshipit-source-id: 54b054f4a5c97b8f6369f8790c2cf32a56c4fbd2
Summary:
**Context:**
Issue:
```java.lang.IllegalStateException: Message queue threads already initialized
at com.facebook.react.bridge.ReactContext.initializeMessageQueueThreads(ReactContext.java:100)
```
Possible root cause:
1, ReactContext.initializeMessageQueueThreads() can be called from different threads, so it's not thread safe
2, ReactContext.initializeMessageQueueThreads() is called again without detroying the threads.
**Fix:**
Make initializeMessageQueueThreads() thread safe. If this won't fix T93983690, I'll continue investigating with possible root cause 2.
Changelog:
[Android][Changed] - Make initializeMessageQueueThreads() thread safe
Reviewed By: GijsWeterings
Differential Revision: D29877386
fbshipit-source-id: 11b32c7184e9e8d6f882474fd607538df12276b7
Summary:
In T94154173, when calling ```EventEmitterWrapper->invoke()```, hybrid function ```invokeEvent``` is null, even if we checked that ```mHybridData``` is valid before calling ```invokeEvent```.
**Theory:**
```invoke()``` is called from ```mqt_js``` thread, ```desotry()``` is called from ```main``` thread, which cause multi-thread access of```mHybridData```.
So if ```desotry()``` is called after ```isValid()``` check and before calling ```invokeEvent()```, ```invokeEvent``` could be destroyed and is null.
I can reproduce with above theory:
{F633411001}
**Fix:**
Make functions synchronized so ```mHybridData``` can be thread safe.
Changelog:
[Android][Fixed] - Make mHybridData thread safe
Reviewed By: RSNara
Differential Revision: D29792453
fbshipit-source-id: 8b4c754d53ece933be7b2cf99c6cd026b39e24ad
Summary:
Changelog: [internal]
If task that is being executed schedules a new task with higher priority, the new task will be dropped from the queue. To fix this, we always check if the top of the queue is what was executed and only then remove it.
Example:
Let's say there is task A with priority "normal".
When we execute task A (which is not removed from the queue until later), it adds a task B with "immediate" priority.
So priority queue now has two tasks: [1: B, 2: A]
After task A finishes, inside workLoop, it will pop from top of the priority queue. But task A is no longer top of the priority queue (this is the bug) and it pops B. B is never executed and A is executed twice.
Reviewed By: ShikaSD
Differential Revision: D29841433
fbshipit-source-id: b2f1474fdfc7b3e2d42bae5b7f4ac7e6c3a37b54
Summary:
This diff exposes a new API in FabricUIManager called getInspectorDataForInstance. The goal of this method is to return React metadata for a Native view.
This data will be used from partner teams to build tools that uses React metadata in RN
Data returned from React: P429701924
changelog: [internal] internal
allow-large-files
Reviewed By: JoshuaGross
Differential Revision: D29747864
fbshipit-source-id: 8cb55573be08cb530f7e3c83eed8b4fcf43e7781
Summary:
This diff exposes a new struct InspectorData that will be used by FabricUIManager.getInspectorDataForInstance to return metadata of stacktraces.
See next diffs of the stack
changelog: [internal] internal
Reviewed By: JoshuaGross
Differential Revision: D29764995
fbshipit-source-id: 6a2ab819623e379795e59002be0e4d40ac73b9a6
Summary:
This diff exposes a new API Expose new API RuntimeExecutor.executeSynchronouslyOnSameThread_CAN_DEADLOCK. This API will be used by the next diffs of the stack
changelog: [internal] internal
Reviewed By: JoshuaGross
Differential Revision: D29764996
fbshipit-source-id: e6cd6799e16f2e47a353b7504d58d80aa49447d8
Summary:
Similar to D29786190 (b0e39b2ed9) on iOS, keeps cursor position constant to the end of the text whenever text changes without selection updates.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D29879663
fbshipit-source-id: da1b50a99ae3b9ef796423146ba49e4172e286df
Summary:
With the advent of https://github.com/facebook/react-native/issues/29610, we are now able to use the `testID` view prop on Android in black-box testing framework through the view's `resource-id`.
But after testing it, I noticed that on the `TextInput`, `Slider` and `ScrollView` components, the `testID` prop was not exposed as the `resource-id` properly. The main issue was that those component was using the `AccessibilityDelegateCompat` instead of the `ReactAccessibilityDelegate`.
## Changelog
[Android] [Fixed] - Fix `testID` prop for `TextInput`, `Slider` and `ScrollView` components
Pull Request resolved: https://github.com/facebook/react-native/pull/31865
Test Plan: ![test-screenshot](https://user-images.githubusercontent.com/69216913/125802180-c0791a8c-a740-4657-a44f-42b1885eee39.png)
Reviewed By: mdvacca
Differential Revision: D29765333
Pulled By: yungsters
fbshipit-source-id: 2b8e362257e3e5fdcd20330280c588dabb44f28a
Summary:
Includes fix included in a Flipper Pod for incorrect timestamps in the Network viewer with iOS apps
1cf7456133
## 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
-->
[general][changed] - Update Flipper to 0.99.0
[CATEGORY] [TYPE] - Message
Pull Request resolved: https://github.com/facebook/react-native/pull/31896
Reviewed By: fkgozali
Differential Revision: D29881218
Pulled By: mdvacca
fbshipit-source-id: a206faa3d7b969a708d286884cff83bed5453d22
Summary:
Add INFO, and MENU key event support to Android TV
## Changelog
[Android] [Added] - Add INFO, and MENU key event support to Android TV
Pull Request resolved: https://github.com/facebook/react-native/pull/31884
Test Plan: We develop application that utilizes aforementioned events, we've made a build against react-native fork with these changes and it was working as expected. These changes just add 2 more button mappings, so I don't think it requires some extensive testing.
Reviewed By: mdvacca
Differential Revision: D29821996
Pulled By: yungsters
fbshipit-source-id: 5f97c29c9c29d6e3bafed352b8b65f0cb02f3f1d
Summary: - This is crashing too much in debug, which is good signal but making it harder to test, and test unrelated features.
Reviewed By: JoshuaGross
Differential Revision: D29857626
fbshipit-source-id: c52cfb6131747ae420b27de0591620fe79f47359
Summary:
Changelog: [Internal] - Update Animation examples to toggle useNativeDriver
There are issues when we toggle the native driver on and off. Where once off, the animations don't seem to update anymore, until we turn nativeDriver back on. See videos in testplan
Reviewed By: yungsters
Differential Revision: D29774939
fbshipit-source-id: cf6d70c1b574a87bb803510196dfb273b36de5e1
Summary:
* it says focusTextInput but the function name is blurTextInput
* probably the message was copy-pasted from `focusTextInput` where is the same error message.
Changelog: [Internal]
Reviewed By: arhelmus
Differential Revision: D29845922
fbshipit-source-id: 21fd3e572c32779c13f6909556153d07dc7a416f
Summary:
Tests like `CatalystSubviewsClippingTestCase` are intermittently failing due to registered callable modules not yet being registered.
Increasing the timeout to wait for the bundle execution to mitigate these intermittent failures.
Changelog:
[Internal]
Reviewed By: mdvacca
Differential Revision: D29835227
fbshipit-source-id: c9fe03202ad4028d3785216d50c6c173a56c6d84
Summary:
Added to C++ props, but realized this is already implemented using C++ state in Android, so added to C++ state to keep this diff simpler. Keeping the C++ props change for future use.
Changelog: [Internal]
Reviewed By: JoshuaGross
Differential Revision: D29805267
fbshipit-source-id: c1fe2dc34af8bc69352ee48a5d60ba998194e3f7
Summary:
Fix for https://github.com/facebook/react-native/issues/27952.
Noticed more than just `AUTOFILL_HINT_NEW_PASSWORD` were missing, this PR will support every `AUTOFILL_HINT_*` type.
## Changelog
[Android] [Added] - Added all autofill types to TextEdit
Pull Request resolved: https://github.com/facebook/react-native/pull/28008
Reviewed By: sturmen
Differential Revision: D29766235
Pulled By: mdvacca
fbshipit-source-id: d5171aef8092d37716fddcb6f3443637a4af8481
Summary:
Changelog:
[General][Added] - Added data field to markerPoint to allow callers to add additional arbitrary string data to logged points
Reviewed By: dmitry-voronkevich
Differential Revision: D29764274
fbshipit-source-id: b0d21e3b20a5353351424afb10c950f3e8689887
Summary:
This diff refactors the AndroidTextInput.AndroidTextInput.color prop to use SharedColor instead of int
The purpose of this change is avoid a crash when using PlatformColor on TextInput
changelog: [intenral] internal
Reviewed By: JoshuaGross
Differential Revision: D29810595
fbshipit-source-id: 2a5a9c5ae66e8d5de8adb1c89ea62489190a91ee
Summary:
I'm hunting down the source of a perf regression on a screen and think that having these systrace sections could be handy for this and future investigations.
Changelog: [internal]
Reviewed By: mdvacca
Differential Revision: D29802969
fbshipit-source-id: f4030261da8888ddeb32ae41b9cf2b25af6a5583
Summary:
This change adds a series of snapshot tests to validate the render output of VirtualizedList in mixed scenarios. Jest timer mocks are used to measure rendering at different ticks. These test cases mostly center around realization logic, to help prevent regressions when chaning internal state representation.
## 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] [Added] - Add unit tests for VirtualizedList render quirks
Pull Request resolved: https://github.com/facebook/react-native/pull/31401
Test Plan: Ran the added UTs locally.
Reviewed By: lunaleaps
Differential Revision: D28017750
Pulled By: rozele
fbshipit-source-id: df9684c4ac80a8732f3e88e7496815127213832e
Summary:
I'm going to be flipping the default from autoglob on `fb_apple_library` to `True`. This prepares the target so that there are no behavior changes.
## Changelog: [Internal]
Reviewed By: natestedman
Differential Revision: D29769275
fbshipit-source-id: 7ac04f8a8f7e41ce8d43a81b25ebd063b3a9f3de
Summary:
I'm going to be flipping the default from autoglob on `fb_apple_library` to `True`. This prepares the target so that there are no behavior changes.
## Changelog: [Internal]
Reviewed By: natestedman
Differential Revision: D29769271
fbshipit-source-id: a20b4f99f00613c092461979b4afe61bdca9fe37