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

22657 Коммитов

Автор SHA1 Сообщение Дата
Tim Yung 249435c4d5 RN: Cleanup `collapsable` Experiment (iOS)
Summary:
With the conclusion of D27944688 (925af8ddea), this backs out the experiment introduced via D27987619 (f598dd0ee3).

Changelog:
[Internal]

Reviewed By: kacieb

Differential Revision: D28799741

fbshipit-source-id: 607ee85db26326e13dd8ddb52f5aebb732e9a354
2021-06-02 09:43:41 -07:00
Tim Yung e4a4c4d6d7 ExceptionsManager: Report Fatal "Warnings"
Summary:
As suggested by motiz88 on D28421692 (883e0d5752), make sure to still report fatal "warnings".

Changelog:
[General][Fixed] Report fatal errors even if its `type` is "warn".

Reviewed By: motiz88

Differential Revision: D28815228

fbshipit-source-id: 8d3b77958ef687a4ce64bdfccbf6ce2dc5557eaf
2021-06-02 01:31:50 -07:00
David Vacca 286fac5ad0 Delete eager initialization of Fabric classes
Summary:
I run an experiment and I verified that eager initialization of fabric classes is neutral and it's showing a regression in "marketplace:interface:metrics"
See: https://www.internalfb.com/intern/qe2/react_fabric_marketplace_home_android_universe/react_fabric_marketplace_home_eager_init_v1/analysis?control=test_no_eager_init&test=test_eager_init_classes

This diff removed the optimization and it cleans up the code

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D28815647

fbshipit-source-id: 2c9fe3875b1797d9a7def61e5ab97c2df2a462dd
2021-06-01 18:27:04 -07:00
Simen Bekkhus 2f477b1844 fix: update to @jest/create-cache-key-function@27 (#30637)
Summary:
API of Jest transformers is changing in Jest 27. The new version of `jest/create-cache-key-function` handles both current versions of the API and the upcoming 27 API.

Ref: https://github.com/facebook/jest/pull/10834

## 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] - Use version of `jest/create-cache-key-function` compatible with upcoming Jest v27 release

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

Test Plan: I've tested locally that it works with both a `jest@latest` and `jest@next` release.

Reviewed By: yungsters

Differential Revision: D28807361

Pulled By: hramos

fbshipit-source-id: 9d9ccb4d7f91b30bcbf3d28202bb74ce7499a91b
2021-06-01 17:18:52 -07:00
Tim Yung 78caaca768 RNTester: Text Adjusts Dynamic Layout Example
Summary:
Creates a new RNTester example to verify facebook/react-native#31538 (D28631465).

Changelog:
[Android][Added] - RNTester example for adjusting text with dynamic layout.

Reviewed By: kacieb

Differential Revision: D28779870

fbshipit-source-id: 5297a823645d1e9e35d4c86b491f3c225ecc9543
2021-06-01 16:00:10 -07:00
Tim Yung b85572af6e RN: Cleanup `TextInjection`
Summary:
Deletes `TextInjection` which is no longer needed.

Changelog:
[Internal]

Reviewed By: kacieb

Differential Revision: D28799740

fbshipit-source-id: 5dfbff23db3f73153aa0c3df25fec5acfb4977e4
2021-06-01 15:29:59 -07:00
Joshua Gross 7e9c741146 Pass in EventEmitter during View CREATE and Preallocation
Summary:
EventEmitter is not transmitted from C++ to Java until an UPDATE operation is enqueued. Practically this usually happens "right away", but in the case of an Image component, especially, the EventEmitter could be missing while events are being fired from the native side (for example, loading events).

The fix is just to pass EventEmitter in sooner, in both Create and Preallocate. There should be no ill effect since EventEmitter is nullable anyway.

One potential side-effect: since Views can be PreAllocated and potentially never deallocated until StopSurface is called, this could result in more EventEmitter objects being leaked and retained from Java. I believe the fix is to remove PreAllocated Views more aggressively.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D28810022

fbshipit-source-id: ae4c8b4eefe619d9a99fa5f90f612d6dd4880da5
2021-06-01 15:15:47 -07:00
Dulmandakh 547b4c92e4 Gradle 6.9, Android Gradle Plugin 4.2.1 (#31593)
Summary:
Bump Gradle to 6.9 which supports Apple Silicon, also Android Gradle Plugin 4.2.1 which defaults to Java 1.8 so no additional config required.

## Changelog

[Android] [Changed] - Bump Gradle to 6.9, Android Gradle Plugin to 4.2.1

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

Test Plan: rn-tester builds and runs as expected

Reviewed By: mdvacca

Differential Revision: D28711942

Pulled By: ShikaSD

fbshipit-source-id: 2a4616cd0f17db7616ab29dea1652717f2cd0f6d
2021-06-01 11:29:51 -07:00
Daniel Sainati 74d5d03dbd pre-suppress Flow errors in xplat ahead of 153 release
Summary:
This pre-suppresses the 153 error diff ahead of its release, since it is large.

Changelog: [Internal]

Reviewed By: mroch

Differential Revision: D28754374

fbshipit-source-id: 1806f53bc7d804644d434583a2dcd6da63d00328
2021-06-01 09:01:26 -07:00
Andrei Shikov d1ab03235c Remove feature flag for layout transition tag cleanup
Summary:
Removes stale feature flag that was in production for a couple of months. Fix helped to decrease number of crashes significantly, so we can remove it.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D28757995

fbshipit-source-id: 375da09c11f265e8bbe03cd99de1b83f168420ce
2021-05-27 14:43:53 -07:00
Paige Sun 8a5ee96354 Remove log info when TurboModule cannot be found
Summary: Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D28749474

fbshipit-source-id: 28079904023f23e88b4f5bca45d7e600171e929e
2021-05-27 10:42:34 -07:00
Andrei Shikov fff0107e5a Fix robolectric tests for touch events
Summary:
Touch event logic has been recently modified to contain surfaceId only in the new renderer. This change aligns OSS tests that have been failing for them.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D28749961

fbshipit-source-id: 483ab3ac97bbdc4f1fbdb2a8c699ef060cca9f77
2021-05-27 10:14:32 -07:00
Marshall Roch 726e689269 Deploy Flow v0.152.0
Summary: Changelog: [Internal]

Reviewed By: dsainati1

Differential Revision: D28747275

fbshipit-source-id: 9484c49d9dcaa214545761e88793f8f7f34f2063
2021-05-27 07:58:47 -07:00
Andrei Shikov 712bc6769b Log when item execution is delayed during mounting
Summary:
Adds logs to indicate that MountItem was queued instead of executed.
Also moves logging of preMount items to dispatcher for consistent logging with other items.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D28690203

fbshipit-source-id: 14d24f0bebb97a810127f5187b4d46f66b6c836f
2021-05-27 04:44:30 -07:00
Dennis Urtubia 44717152ca Adds accessiblity actions on core components (#31532)
Summary:
Android: Adding custom actions (https://github.com/facebook/react-native/issues/30854).
Adds accessiblity actions on core components (Button, TextInput, Text, and Picker).

## Changelog
[General] [Added] - Adds accessiblity actions on core components

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

Test Plan:
- `npm test`
- Rendering of components on `RNTesterApp` using talkback:
    - Check if accessibility actions were available;
    ![image](https://user-images.githubusercontent.com/33161939/118381843-a668c180-b5c5-11eb-9ce4-016a49157dc5.png)
    - Trigger `activate` action for all components;
    ![image](https://user-images.githubusercontent.com/33161939/118381736-7bca3900-b5c4-11eb-82fb-32e824e1b38c.png)

## Notes
- For `TextInput` an unexpected error is raised:
![image](https://user-images.githubusercontent.com/33161939/118381603-d1054b00-b5c2-11eb-93f2-1d5730ee2d24.png)

Reviewed By: kacieb

Differential Revision: D28654294

Pulled By: lunaleaps

fbshipit-source-id: 80dd3f3c7aa27bbaf16ef12997e8f55952a02eb2
2021-05-26 16:49:11 -07:00
Luna Wei 52b51f0886 Update CONTRIBUTING.md (#31590)
Summary:
Add more detail about requesting review in the contribution guide.
In the GAAD initiative it's particularly useful to know when certain PRs need our attention so wanted to highlight the code review process to remind contributors to request reviewers.

## Changelog

[General] [Added] - Added more detail about the review process

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

Test Plan: Grammar, clarity review

Reviewed By: TheSavior

Differential Revision: D28719869

Pulled By: lunaleaps

fbshipit-source-id: 9213fefbe602588f9e5cee7ba240b93bc7f291b5
2021-05-26 13:41:44 -07:00
Evgen Filatov 34b8d07bfb Back out "iOS: 6/7 JS only. Remove logic for visible prop in JS, and pass it to native"
Summary:
Changelog: [Internal]

back out D28138741 (40706e0546)

Differential Revision: D28709374

fbshipit-source-id: c7085588ab4573c0ca18a2324f8e1ed40384753c
2021-05-26 10:35:10 -07:00
Samuel Susla 0ee8e292a4 Fix for ScrollView race condition between C++ state update and onScroll
Summary:
Changelog: [internal]

There is a possibility of race between updating scrollview's state and virtualised list asking for layout of individual cells.
To make sure the race doesn't happen, state must be updated before dispatching onScroll event.

Android has implemented a different mechanism to tackle this issue in D28558380 (b161241db2).

Reviewed By: JoshuaGross

Differential Revision: D28642737

fbshipit-source-id: 33874beac69fc5a66eeb7f459fd89cd0b00dafcf
2021-05-26 03:32:03 -07:00
Andrew Coates 6b91ae73cd localeIdentifier missing from flow type of I18nManager (#31589)
Summary:
23d9bf1a24 looks like it accidently removed `localeIdentifier` from I18nManager.

## 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] [Fixed] - Re-added localeIdentifier to I18nManager constants

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

Reviewed By: GijsWeterings

Differential Revision: D28690202

Pulled By: fkgozali

fbshipit-source-id: 543a491f89789bca5629e1251c94fd055ec4a801
2021-05-26 00:04:19 -07:00
Samuel Susla 925af8ddea Add collapsable to RCTViewManager as property
Summary:
Changelog: [internal]

collapsable was not passed to Fabric because view configs are built using Paper' ViewManagers.

Reviewed By: p-sun

Differential Revision: D27944688

fbshipit-source-id: 73a5646e25b3dd7a1a9dfc1079406047ab483d88
2021-05-25 12:52:34 -07:00
David Vacca 4efd603b26 Update customDirectEvent types for ReactVitoImageManager
Summary:
This diff updates the customDirectEvent types for ReactVitoImageManager

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D28682669

fbshipit-source-id: 3341a7d6dbd5ec90f274f0770c6e883bd82f0a2d
2021-05-25 11:31:47 -07:00
Rick Hanlon f684d99a50 React Native sync for revisions 459c34f...1e4c353
Summary:
This sync includes the following changes:
- **[2d8d133e1](https://github.com/facebook/react/commit/2d8d133e1 )**: Turn on enableSyncDefaultUpdates everywhere ([#21548](https://github.com/facebook/react/pull/21548)) //<Ricky>//

Changelog:
[General][Changed] - React Native sync for revisions 459c34f...2d8d133

jest_e2e[run_all_tests]

Reviewed By: gaearon

Differential Revision: D28654355

fbshipit-source-id: c245f272e7f8d4215539fa90602b76cad67632fe
2021-05-25 10:24:00 -07:00
Paige Sun 2c4eba7b9c iOS: 7/7 Test Modal onDismiss with Jest
Summary:
Changelog: [Internal]

Add onDismiss tests for Modal

Reviewed By: fkgozali, sammy-SC, nadiia

Differential Revision: D28074384

fbshipit-source-id: 464c63cc9fe2d3e1709687369eea8cefd78d8356
2021-05-25 10:07:10 -07:00
Paige Sun 40706e0546 iOS: 6/7 JS only. Remove logic for visible prop in JS, and pass it to native
Summary: Changelog: [Fabric][iOS] Use non-global event emitter for onDismiss event for <Modal>

Reviewed By: fkgozali

Differential Revision: D28138741

fbshipit-source-id: df9069e523f2e8bd1b85f3d9be55cfd300f89d66
2021-05-25 10:07:10 -07:00
Samuel Susla fa899cb51f Use getter instead of directly accessing ivar
Summary:
Changelog: [internal]

Use getter function instead of accessing ivar. This makes for clearer APIs.

React part is implemented in https://github.com/facebook/react/pull/21553

Reviewed By: JoshuaGross

Differential Revision: D28675372

fbshipit-source-id: cf99f8482067bfc0fd57d39fda9656abd665bb69
2021-05-25 09:56:32 -07:00
Eric Rozell 917f83c940 Use transform prop in PanResponderExample
Summary:
Replaces deprecated `translateX` and `translateY` props with `transform` prop in PanResponderExample. This fixes the RNTester example for react-native-windows, which doesn't support the deprecated props.

Changelog:
[General][Fixed] - [RNTester] Use transform prop in PanResponderExample

Reviewed By: kacieb

Differential Revision: D28676164

fbshipit-source-id: 437912b5abf6ca74f0043ded7a902a5938bcf93a
2021-05-25 09:10:53 -07:00
Samuel Susla 3a9e14e8a9 Add synchronous access to the runtime to RuntimeScheduler
Summary:
Changelog: [internal]

Introduces synchronous access to the runtime from RuntimeScheduler.
At the moment, this is not used anywhere.

In case RuntimeScheduler isn't defined (controlled by MC), falls back to RuntimeExecutor.

Reviewed By: mdvacca

Differential Revision: D28024380

fbshipit-source-id: 90be36dd390202540ed51940a4396040f043cd90
2021-05-25 07:42:06 -07:00
Samuel Susla 2016460528 Pass event priority to React
Summary:
Changelog: [internal]

This is a mechanism that will guess event's React priority based on other events ongoing on the platform.

If an event happens within span of ContinuousStart -> ContinuousEnd and its category is unspecified, we deduce it's React priority to be default. All other events are discrete.

Special case: `onScroll`, which is always treated as "Default".

Reviewed By: JoshuaGross

Differential Revision: D28485060

fbshipit-source-id: d2eae63dbcf03271dfed97128a1590dd165a3ce2
2021-05-25 01:16:04 -07:00
Samuel Susla 1866566d52 Introduce a way to specify React priority for events
Summary:
Changelog: [internal]

Introduce a way to specify React priority for events.
These APIs will be called from React here: 0e100ed00f/packages/react-native-renderer/src/ReactFabricHostConfig.js (L345)

React does similar thing on the web: 8ea11306ad/packages/react-dom/src/client/ReactDOMHostConfig.js (L378)

Take a look at D28483983 that shows how React will be calling these APIs.

Reviewed By: JoshuaGross

Differential Revision: D28481260

fbshipit-source-id: c965a8aa0ba5192246c216046d49bcb046152a5a
2021-05-25 01:16:04 -07:00
Samuel Susla 285406103d Introduce EventQueueProcessor
Summary:
Changelog: [internal]

Pulling out event queue processing to its separate class. We will be adding more logic there so it makes sense to separate it for simplicity and testability purposes.

Alternative names that came to mind: `EventsProcessor`, `EventsDispatcher`.

Reviewed By: JoshuaGross

Differential Revision: D28572283

fbshipit-source-id: 1cb2459f616b9995f66da80d50c401e68002da7f
2021-05-25 01:16:04 -07:00
Joshua Gross 5a9b6fc49b Simplify LockFreeEventDispatcherImpl further
Summary:
TL;DR: simplify and delete a bunch of stuff that shouldn't be necessary in Fabric.

I discovered that this event dispatcher (and the older one this is based on) is triple-queueing: we queue events into "staging", and then post "dispatch events" to only run /on the JS thread/. Even in Fabric. Then, each of these events is emitted into C++ where they are queued /again/! This refactor eliminates one more level of queueing - instead of scheduling dispatch for the JS thread, we just emit them directly to C++ when they're received in Java.

Unfortunately, the EventDispatcher is also used to drive AsyncEventBeat in C++:

1. EventBeatManager.onBatchEventDispatched: https://fburl.com/diffusion/qf6dyhsw
   In the C++ impl, it indirectly will drive the AsyncEventBeat/AsyncEventBeatV2.
2. onBatchEventDispatched is ONLY called from EventDispatcherImpl: https://fburl.com/codesearch/mxk8ifyj
3. Which is queued and only runs on the JS thread: https://fburl.com/codesearch/czvbst4u

This means the AsyncEventBeat is only ticked when the JS thread is free, and ticks will be skipped when the JS thread is occupied for long periods.

Now, in this refactor, when this class is used it will drive AsyncEventBeat on every UI tick. This is also potentially not correct. On iOS (Fabric), AsyncEventBeat is driven when the UI thread is "about to sleep".

For now I'm not going to worry about that detail - it is significant, but Fabric+Android is currently /not doing the right thing/ and it's not clear that we want to maintain iOS behavior. This is something we need to discuss further and figure out.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D28654033

fbshipit-source-id: b3cb9b706343c8dd3c4cf84f24388908c57e2138
2021-05-24 20:14:46 -07:00
Rick Hanlon d2a6d88790 React Native sync for revisions 3169430...459c34f
Summary:
This sync includes the following changes:
- **[459c34fde](https://github.com/facebook/react/commit/459c34fde )**: Add flag concurrent root ([#21552](https://github.com/facebook/react/pull/21552)) //<Samuel Susla>//

Changelog:
[General][Changed] - React Native sync for revisions 3169430...459c34f

jest_e2e[run_all_tests]

Reviewed By: mdvacca

Differential Revision: D28641463

fbshipit-source-id: 0930a8f82e49b222582995e4c8b2c8a41564bf53
2021-05-24 17:58:40 -07:00
Rick Hanlon 1c5d0dc605 React Native sync for revisions b8fda6c...ebcec3c
Summary:
This sync includes the following changes:
- **[316943091](https://github.com/facebook/react/commit/316943091 )**: Make StrictMode double rendering flag static for FB/www ([#21517](https://github.com/facebook/react/pull/21517)) //<Brian Vaughn>//
- **[e0f89aa05](https://github.com/facebook/react/commit/e0f89aa05 )**: Clean up Scheduler forks ([#20915](https://github.com/facebook/react/pull/20915)) //<Ricky>//
- **[5890e0e69](https://github.com/facebook/react/commit/5890e0e69 )**: Remove data-reactroot from server rendering and hydration heuristic ([#20996](https://github.com/facebook/react/pull/20996)) //<Sebastian Markbåge>//
- **[46491dce9](https://github.com/facebook/react/commit/46491dce9 )**: [Bugfix] Prevent already-committed setState callback from firing again during a rebase ([#21498](https://github.com/facebook/react/pull/21498)) //<Andrew Clark>//
- **[b770f7500](https://github.com/facebook/react/commit/b770f7500 )**: lint-build: Infer format from artifact filename ([#21489](https://github.com/facebook/react/pull/21489)) //<Andrew Clark>//
- **[2bf4805e4](https://github.com/facebook/react/commit/2bf4805e4 )**: Update entry point exports ([#21488](https://github.com/facebook/react/pull/21488)) //<Brian Vaughn>//

Changelog:
[General][Changed] - React Native sync for revisions b8fda6c...ebcec3c

jest_e2e[run_all_tests]

Reviewed By: JoshuaGross

Differential Revision: D28572047

fbshipit-source-id: eb09c0358edb7fbf241333ea9c08724748906fea
2021-05-24 17:58:40 -07:00
Kudo Chien 341f061ce3 Upgrade jsc-android to 250230.2.1 (#31304)
Summary:
Upgrade jsc-android to latest stable version. Hopefully this should finally fix https://github.com/facebook/react-native/issues/25494.
Before Hermes totally replaced JSC, it should be worth to have this and make JSC stable

## Changelog

[Android] [Changed] - Upgrade jsc-android to 250230.2.1

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

Test Plan: Launch app with new jsc-android and see everything works fine.

Reviewed By: TheSavior

Differential Revision: D28630503

Pulled By: yungsters

fbshipit-source-id: 84510f91c81d4aaefe265d5492677ad6ff10e0fe
2021-05-24 15:06:07 -07:00
Andrei Shikov fed6ad5bad Pass correct action name in the props callback
Summary:
JS side expects the property name to be "actionName", and this change updates it to that.

Changelog:
[iOS][Fixed] - Use actionName in accessibility event callback

Reviewed By: JoshuaGross

Differential Revision: D28645999

fbshipit-source-id: 0e7a6c3e6c1b6c998f4b53fd89c744c84083dfb1
2021-05-24 14:25:55 -07:00
Joshua Gross 900fed576b Events: Remove default `getCoalescingKey` impls
Summary:
Event.java's default implementation of `getCoalescingKey` returns 0. Most overrides of getCoalescingKey just return 0. Delete them.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D28650792

fbshipit-source-id: 374591fb4ba2305df934de412790b3397ca2fa1c
2021-05-24 13:41:19 -07:00
Andrei Shikov faaeb778df Parse accessibilityAction props into object
Summary:
Android was using rawProps received from JS, so no updates needed.
Updated iOS callsite to use the name of the action.

Changelog:
[General][Fixed] - Parse accessibilityAction props into object instead of string

Reviewed By: mdvacca

Differential Revision: D28614407

fbshipit-source-id: 209134f8fac65ca8516039e10ea502e57d52a7a7
2021-05-24 10:27:27 -07:00
CodemodService FBSourceClangFormatLinterBot dd9655503b Daily `arc lint --take CLANGFORMAT`
Reviewed By: zertosh

Differential Revision: D28634989

fbshipit-source-id: 9e6397bfc0c4059877643bea7dcda6c42a4f4133
2021-05-24 04:11:25 -07:00
Andrew Coates 7aeac4236f Move isColorMeaningful to platform specific code (#31557)
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 https://github.com/microsoft/react-native-windows/pull/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: https://github.com/facebook/react-native/pull/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
2021-05-22 23:24:14 -07:00
Samuel Susla ffa533a19d Add option to use unbatched queues only
Summary:
Changelog: [internal]

My suggestion is to simplify event dispatching to only two options, synchronous and asynchronous.

Why?
- Fabric has only been using one queue, `AsynchronousBatched`.
- Batching happens even on `AsynchronousUnbatched`. It just batches events until JS thread starts processing them instead of waiting for the main run loop.
- It will make it easier to reason about the code in the future once we start utilising different priorities for Concurrent Mode.

Reviewed By: JoshuaGross

Differential Revision: D28603472

fbshipit-source-id: 14e3a9c15a012c550dc16a044c31d722051a2bdc
2021-05-22 12:19:05 -07:00
Samuel Susla 4bec099f7e Add option to disable sending scroll events to Paper
Summary:
Changelog: [internal]

Originally added in D17814260 (ffc7ec992c) to make parallax effect work in Dating.

This diff hides it behind a flag so we can properly evaluate what's the cost of sending scroll events to Paper.

Reviewed By: JoshuaGross

Differential Revision: D28608283

fbshipit-source-id: fa4d8944ad6b5e767363e231942f13fec9d18cb5
2021-05-22 12:19:05 -07:00
Joshua Gross 0510821170 Replace EventDispatcherImpl with LockFreeEventDispatcherImpl
Summary:
EventDispatcherImpl uses synchronized blocks all over to make it thread-safe. I'm concerned about the perf implications of this and creating contention between JS and UI threads.

This is locked behind a feature flag.

Enabled only for Fabric in StaticViewConfig mode, and a feature flag, for now.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D28591331

fbshipit-source-id: ea8f93a2e1343ce37fa78690dcb62fe03594120f
2021-05-21 17:22:41 -07:00
Ramanpreet Nara a2ab3fccd0 Migrate RCTNativeAnimatedTurboModule to initialize
Summary: Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D28595948

fbshipit-source-id: a12207f8e0c11e1e105225404450ff335242aba7
2021-05-21 14:49:51 -07:00
Ramanpreet Nara 8aa85241a4 Migrate RCTDevSettings to initialize
Summary: Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D28595955

fbshipit-source-id: e61c2d321826eafb60fdac820b76d0f7d100796a
2021-05-21 14:49:51 -07:00
Ramanpreet Nara ed86891d01 Migrate NativeModules to initialize
Summary:
This migrates all ObjC NativeModule setBridge: calls to the bridge compatible initialize: call. I filtered out ViewManagers.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D28595520

fbshipit-source-id: b0e5dd681fb3563894f1aa3da1728f0c694f04bb
2021-05-21 14:49:51 -07:00
Sladyn Nunes 35dd86180b Fix/30842 - Add accessibilityState prop in slider (#31145)
Summary:
Accessibility service does not announce "selected" on accessibilityState = {selected: true} of the Button Component.
Issue link - https://github.com/facebook/react-native/issues/30956

## 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] [Added] - Add accessibilityState prop to Slider component

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

Test Plan:
Verified accessibility states are read by voiceover and talkback. Some state values aren't handled by iOS and have been identified.

Added snapshot tests to test accessibilityState.disabled = disabled values

`js1 test Slider-test`

Reviewed By: yungsters

Differential Revision: D28337723

Pulled By: lunaleaps

fbshipit-source-id: 72a54d8d9dcf1fafb9785c81da99f32a21f3df00
2021-05-21 13:35:56 -07:00
Joshua Selbo 0aa1aa6cc2 Convert remaining targets to wrapper
Summary: Changelog: [Internal]

Differential Revision: D28479823

fbshipit-source-id: 997c6ac137d85d22ee5052d69dae006a1a0a7aac
2021-05-21 12:47:26 -07:00
Joshua Gross cd4bebb6c6 Make sure that touch events have a SurfaceId only in Fabric
Summary:
Could fix some infrequent crashes in non-Fabric.

Changelog: [Internal]

Reviewed By: ShikaSD

Differential Revision: D28605773

fbshipit-source-id: 57555e013657e61cfb02b25d9fd14c9c15774e0e
2021-05-21 11:32:02 -07:00
Samuel Susla 118489f6e5 Make LeakChecker available on Android
Summary:
Changelog: [internal]

Extend LeakChecker so it is available on Android (or any other platform as it is completely in C++ now).

Reviewed By: JoshuaGross

Differential Revision: D28600243

fbshipit-source-id: c77a003e3ffc6171e61c998508c9f34f10bb65ca
2021-05-21 10:39:43 -07:00
Andres Suarez ffab8e3f46 Apply clang-format
Reviewed By: igorsugak

Differential Revision: D28477074

fbshipit-source-id: f15dfc45b9fb30c661ebe2899cd882676d0fdf2a
2021-05-20 21:24:25 -07:00