react-native-macos/React/Base
Janic Duplessis 41343f6a73 BREAKING - RCTEvent improvements, remove deprecated [sendInputEventWithName:body:] (#15894)
Summary:
This makes the RCTEvent protocol more generic to make it easier to use the event coalescing feature for type of events other than components. This does a few other improvements that will be useful in follow up PRs.

- Add `RCTComponentEvent` which is used instead of deprecated `[sendInputEventWithName:body:]` and remove that method completely (was only used at 2 places).
- Make `coalescingKey` optional for events that return NO from `canCoalesce`.
- Make `viewTag` optional for events that are not related to views.
- Fast path for events that return NO from `canCoalesce`.
- Add a missing test for event coalescing with different view tags.

Ended up making only one PR for all this since the changes are related and hard to separate.

**Migration**
Use a custom RCTEvent subclass with `[sendEvent:]` (preferred way to allow type safe events) or `RCTComponentEvent`.

**Test plan**
- Ran RCTEventDispatcher unit tests
- Tested manually in RNTester

Changelog:

[iOS] [Changed] - Remove deprecated RCTEvent method, sendInputEventWithName:body:
Pull Request resolved: https://github.com/facebook/react-native/pull/15894

Reviewed By: shergin

Differential Revision: D13726194

Pulled By: hramos

fbshipit-source-id: 11f63a99e08f46ec6b4f16f8d9949cdbf5c3fe13
2019-03-27 11:20:22 -07:00
..
Surface Fix 50 xcode warnings (#23553) 2019-02-20 10:17:26 -08:00
RCTAssert.h Crash reporting heaven (#23691) 2019-03-12 19:41:51 -07:00
RCTAssert.m Crash reporting heaven (#23691) 2019-03-12 19:41:51 -07:00
RCTBridge+Private.h Remove compiler warning (#23588) 2019-02-22 01:40:09 -08:00
RCTBridge.h Introduce Module Setup Metric (#23859) 2019-03-22 10:43:00 -07:00
RCTBridge.m Introduce Module Setup Metric (#23859) 2019-03-22 10:43:00 -07:00
RCTBridgeDelegate.h iOS: register lazy nativemodules on startup when Chrome is attached 2018-11-02 00:16:16 -07:00
RCTBridgeMethod.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTBridgeModule.h Enable module lookup in TurboModules 2019-01-31 11:35:05 -08:00
RCTBundleURLProvider.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTBundleURLProvider.m Feature: dev menu option to change packager location during runtime (#21970) 2019-02-20 22:07:11 -08:00
RCTComponentEvent.h BREAKING - RCTEvent improvements, remove deprecated [sendInputEventWithName:body:] (#15894) 2019-03-27 11:20:22 -07:00
RCTComponentEvent.m BREAKING - RCTEvent improvements, remove deprecated [sendInputEventWithName:body:] (#15894) 2019-03-27 11:20:22 -07:00
RCTConvert.h Fix RNTester build 2018-09-17 12:33:01 -07:00
RCTConvert.m iOS support keyboardType ASCIICapableNumberPad (#20597) 2019-02-15 08:44:03 -08:00
RCTCxxConvert.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTCxxConvert.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTDefines.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTDisplayLink.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTDisplayLink.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTErrorCustomizer.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTErrorInfo.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTErrorInfo.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTEventDispatcher.h BREAKING - RCTEvent improvements, remove deprecated [sendInputEventWithName:body:] (#15894) 2019-03-27 11:20:22 -07:00
RCTEventDispatcher.m BREAKING - RCTEvent improvements, remove deprecated [sendInputEventWithName:body:] (#15894) 2019-03-27 11:20:22 -07:00
RCTFrameUpdate.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTFrameUpdate.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTImageSource.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTImageSource.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTInvalidating.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTJSStackFrame.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTJSStackFrame.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTJavaScriptExecutor.h iOS changes to switch to JSI 2018-10-18 01:06:24 -07:00
RCTJavaScriptLoader.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTJavaScriptLoader.mm iOS changes to switch to JSI 2018-10-18 01:06:24 -07:00
RCTKeyCommands.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTKeyCommands.m Remove compatible system code for iOS8 and before (#23656) 2019-02-26 07:58:52 -08:00
RCTLog.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTLog.mm Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTManagedPointer.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTManagedPointer.mm Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTModuleData.h Allow init of Native Module before bridge is initialized [2/N] 2018-11-26 17:28:11 -08:00
RCTModuleData.mm Properly validate JS->native method calls (#23658) 2019-03-04 17:39:53 -08:00
RCTModuleMethod.h Add support for argument conversion via RCTConvert 2019-03-22 16:23:40 -07:00
RCTModuleMethod.mm Add support for argument conversion via RCTConvert 2019-03-22 16:23:40 -07:00
RCTMultipartDataTask.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTMultipartDataTask.m Remove compatible system code for iOS8 and before (#23656) 2019-02-26 07:58:52 -08:00
RCTMultipartStreamReader.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTMultipartStreamReader.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTNullability.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTParserUtils.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTParserUtils.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTPerformanceLogger.h Introduce Module Setup Metric (#23859) 2019-03-22 10:43:00 -07:00
RCTPerformanceLogger.m Introduce Module Setup Metric (#23859) 2019-03-22 10:43:00 -07:00
RCTPlatform.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTPlatform.m Start using getConstants 2019-02-04 17:46:56 -08:00
RCTReloadCommand.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTReloadCommand.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTRootContentView.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTRootContentView.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTRootView.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTRootView.m No force layout of superview and contentSize recalculation if intrinsicContentSize not changed 2019-02-15 08:35:41 -08:00
RCTRootViewDelegate.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTRootViewInternal.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTVRemoteHandler.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTVRemoteHandler.m Differentiate swipe and tap events (#22916) 2019-01-15 16:29:38 -08:00
RCTTouchEvent.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTouchEvent.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTouchHandler.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTouchHandler.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTURLRequestDelegate.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTURLRequestHandler.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTUtils.h Fix animation delay 2019-03-07 17:39:00 -08:00
RCTUtils.m Revert D14425373: [react-native][PR] [iOS] Remove explicitly add png file extension when load local image 2019-03-20 14:46:53 -07:00
RCTVersion.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTVersion.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00