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

5780 Коммитов

Автор SHA1 Сообщение Дата
Jordan Brown 48cb80892d Manually fix places the codemod doesnt hit
Summary:
Generating this diff was difficult. We _will_ fix the issues with jscodeshift, but i don't want to block the syntax change on that.

To get this diff, I first codemodded all of xplat to use exact-by-default. Then i turned on implicit-inexact-object:error enforcement to get a list of errors showing places that violated the lint. With that, I used this to generate a list of `sed` commands to add `...`:

```
flow --json | jq '.errors | .[] | .message | .[] | .loc | {source, "line": .end."line", "column": .end."column"} | "\(.column),\(.line),\(.source)"' | sort -n -r | sed 's/"//g' | while read -r line; do echo $line; awk -F',' "{ print \"sed -i '\"\$2\"s/./...&/\"\$1\"' \" \$3 }"; done
```

Then I ran prettier, reverted generated files, and manually fixed up suppressions that got messed up.

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D18516431

fbshipit-source-id: 6cf940dce411fb179e7ebaff764bd5113a07989f
2019-11-19 13:38:18 -08:00
Samuel Susla 2d80a248cd Migrate RefreshControl to Native Commands
Summary:
Changelog: [Internal]

Introduce native command `setNativeRefreshing`, it has the word Native in order to avoid name conflict with setRefreshing in Android implementation. Even this component is iOS only, it would make it easier to merge them in the future.

Introduce `RCTRefreshableProtocol` and make `RCTRefreshControl` and `RCTPullToRefreshViewComponentView` to conform to the protocol so view manager can forward command to both, Paper and Fabric component.

Reviewed By: mmmulani

Differential Revision: D18475804

fbshipit-source-id: 4c19225784efc931b7b8f2d2671cc839bce429bf
2019-11-19 10:06:56 -08:00
Rick Hanlon 6db52c5fe0 LogBox - Add app version and move meta info
Summary:
This diff adds a new API `setAppInfo` to add app version and engine to LogBox and changes the way they're displayed so that they're more subtle and visible for screenshots.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18592992

fbshipit-source-id: 1c57b21fa9dca93029ffc92acf1287f3ee247f4d
2019-11-19 09:36:28 -08:00
Dan Abramov 1edce56a9d React Native sync for revisions 4eeee35...6cff70a
Summary:
Changelog: [General][Changed] - React sync for revisions 0b61e2698...6cff70a74 (Includes React 16.11.0)

This sync includes the following changes:
- **[6cff70a74](https://github.com/facebook/react/commit/6cff70a74 )**: [react-interactions]
Expost host instance to Scope Query function (#17341) //<Dominic Gannaway>//
- **[b8f825877](https://github.com/facebook/react/commit/b8f825877 )**: Split ReactDOM entry
point (#17331) //<Dan Abramov>//
- **[a7b4d51a2](https://github.com/facebook/react/commit/a7b4d51a2 )**: Warn when doing creat
eRoot twice on the same node (another approach) (#17329) //<Dan Abramov>//
- **[be3bfa6fa](https://github.com/facebook/react/commit/be3bfa6fa )**: [Flight] Basic Integr
ation Test (#17307) //<Dan Abramov>//
- **[6cb6b1d66](https://github.com/facebook/react/commit/6cb6b1d66 )**: Add yarn build --unsa
fe-partial (#17316) //<Dan Abramov>//
- **[38dd17ab9](https://github.com/facebook/react/commit/38dd17ab9 )**: [RN] Hoist static dee
pDiffer options object (#17303) //<Moti Zilberman>//
- **[61d3dd0e0](https://github.com/facebook/react/commit/61d3dd0e0 )**: Update deepDiffer usa
ge in React Native renderer (#17282) //<Moti Zilberman>//
- **[e701632ad](https://github.com/facebook/react/commit/e701632ad )**: [react-interactions] Change unmount blur logic to a dedicated event (#17291) //<Dominic Gannaway>//
- **[ce4b3e998](https://github.com/facebook/react/commit/ce4b3e998 )**: [react-interactions] Add optional searchNodes to Scope.queryAllNodes (#17293) //<Dominic Gannaway>//
- **[dee03049f](https://github.com/facebook/react/commit/dee03049f )**: [Flight] Basic Streaming Suspense Support (#17285) //<Sebastian Markbåge>//
- **[f50f39b55](https://github.com/facebook/react/commit/f50f39b55 )**: [Flight] Better compat with http.createServer (#17289) //<Dan Abramov>//
- **[345270630](https://github.com/facebook/react/commit/345270630 )**: DevTools cleanup (#17283) //<Brian Vaughn>//
- **[cd1bdcd06](https://github.com/facebook/react/commit/cd1bdcd06 )**: [react-interactions] Prevent duplicate onPress firing for keyboard Enter (#17266) //<Dominic Gannaway>//
- **[4f02c93c7](https://github.com/facebook/react/commit/4f02c93c7 )**: Fix devtools displaying Anonymous for memo of ref-forwarding components (#17274) //<Waseem Dahman>//
- **[053cf0fed](https://github.com/facebook/react/commit/053cf0fed )**: Fix react-is memo and lazy type checks (#17278) //<Brian Vaughn>//
- **[0f3838a01](https://github.com/facebook/react/commit/0f3838a01 )**: Remove `debugRenderPhaseSideEffects` flag (#17270) //<Andrew Clark>//
- **[cb09dbe0a](https://github.com/facebook/react/commit/cb09dbe0a )**: [react-interactions] Add handleSimulateChildBlur upon DOM node removal (#17225) //<Dominic Gannaway>//
- **[6095993d4](https://github.com/facebook/react/commit/6095993d4 )**: Types: findHostInstance_DEPRECATED returns React.ElementRef<HostComponent<mixed>> (#17265) //<Eli White>//
- **[62ef25077](https://github.com/facebook/react/commit/62ef25077 )**: Avoid bundling in ponyfill for Object.assign in use-subscription package (#17259) //<Mateusz Burzyński>//
- **[f4148b256](https://github.com/facebook/react/commit/f4148b256 )**: [Flight] Move around the Server side a bit (#17251) //<Sebastian Markbåge>//
- **[fadc97167](https://github.com/facebook/react/commit/fadc97167 )**: [Flight] Add Client Infrastructure (#17234) //<Sebastian Markbåge>//
- **[36fd29f09](https://github.com/facebook/react/commit/36fd29f09 )**: Don't show empty (no work) commits in Profiler (#17253) //<Brian Vaughn>//
- **[a2e05b6c1](https://github.com/facebook/react/commit/a2e05b6c1 )**: [Scheduler] Delete old rAF implementation (#17252) //<Andrew Clark>//
- **[6dc2734b4](https://github.com/facebook/react/commit/6dc2734b4 )**: Codemod tests to `it.experimental` (#17243) //<Andrew Clark>//
- **[273679a78](https://github.com/facebook/react/commit/273679a78 )**: DevTools standalone shell changes: (#17213) //<Brian Vaughn>//
- **[d0fc0ba0a](https://github.com/facebook/react/commit/d0fc0ba0a )**: Revert "Dispatch commands to both UIManagers from both renderers (#17211)" (#17232) //<Eli White>//
- **[bdcdb69a2](https://github.com/facebook/react/commit/bdcdb69a2 )**: Rename findHostInstance_deprecated to findHostInstance_DEPRECATED (#17228) //<Eli White>//
- **[515746c21](https://github.com/facebook/react/commit/515746c21 )**: Add findHostInstance_deprecated to the React Native Renderer (#17224) //<Eli White>//
- **[9a35adc96](https://github.com/facebook/react/commit/9a35adc96 )**: Only call Profiler onRender when a descendant had work (#17223) //<Brian Vaughn>//
- **[8eee0eb01](https://github.com/facebook/react/commit/8eee0eb01 )**: Dispatch commands to both UIManagers from both renderers (#17211) //<Eli White>//
- **[f4e974d26](https://github.com/facebook/react/commit/f4e974d26 )**: Add Experimental Flight Infrastructure (#16398) //<Sebastian Markbåge>//
- **[6cd365cac](https://github.com/facebook/react/commit/6cd365cac )**: Don't treat the last row in hidden as deleted if already mounted (#17206) //<Sebastian Markbåge>//
- **[048879eda](https://github.com/facebook/react/commit/048879eda )**: [react-interactions] Ensure props on scope query function is always object (#17212) //<Dominic Gannaway>//
- **[3497ccc14](https://github.com/facebook/react/commit/3497ccc14 )**: Add guard to handle modified React elements with non-string keys (#17164) //<Brian Vaughn>//
- **[3f9c03675](https://github.com/facebook/react/commit/3f9c03675 )**: Typo fix in comment (#17111) //<Deniz Susman>//
- **[f6b8d31a7](https://github.com/facebook/react/commit/f6b8d31a7 )**: Rename createSyncRoot to createBlockingRoot (#17165) //<Dan Abramov>//
- **[9c02d2654](https://github.com/facebook/react/commit/9c02d2654 )**: docs: Fixed a typo in readme.md (#17119) //<Wilco Fiers>//
- **[8075c8505](https://github.com/facebook/react/commit/8075c8505 )**: Update local package versions for 16.10 release //<Andrew Clark>//
- **[5faf377df](https://github.com/facebook/react/commit/5faf377df )**: Fixed a style bug in props editor (#17162) //<Brian Vaughn>//
- **[f7ec65eeb](https://github.com/facebook/react/commit/f7ec65eeb )**: [react-interactions] Make events non-passive to allow preventDefault (#17136) //<Dominic Gannaway>//
- **[1022ee0ec](https://github.com/facebook/react/commit/1022ee0ec )**: Read current time without marking event start time (#17160) //<Andrew Clark>//
- **[349cf5acc](https://github.com/facebook/react/commit/349cf5acc )**: Experimental test helper: `it.experimental` (#17149) //<Andrew Clark>//
- **[edc234c73](https://github.com/facebook/react/commit/edc234c73 )**: Build script should default to experimental (#17144) //<Andrew Clark>//
- **[3cc564547](https://github.com/facebook/react/commit/3cc564547 )**: SuspenseList support in DevTools (#17145) //<Sebastian Markbåge>//
- **[68fb58029](https://github.com/facebook/react/commit/68fb58029 )**: Remove unstable_ prefix in various internal uses (#17146) //<Sebastian Markbåge>//
- **[7082d5a2d](https://github.com/facebook/react/commit/7082d5a2d )**: Don't build non-experimental www bundles (#17139) //<Andrew Clark>//
- **[c47f59331](https://github.com/facebook/react/commit/c47f59331 )**: Move SuspenseList to experimental package (#17130) //<Andrew Clark>//
- **[685ed561f](https://github.com/facebook/react/commit/685ed561f )**: Migrate useDeferredValue and useTransition (#17058) //<Luna Ruan>//
- **[0b61e2698](https://github.com/facebook/react/commit/0b61e2698 )**: Update RN typings for a shim (#17138) //<Dan Abramov>//

Reviewed By: threepointone

Differential Revision: D18428149

fbshipit-source-id: 28273be4d7a4c7ec0fe0451cea134ee09a3b4d86
2019-11-19 08:52:37 -08:00
Valentin Shergin 3f7e0a2c96 Removing <TextInput>'s `onTextInput` event
Summary:
This is the first diff in the series. It removes Flow types for this feature to verify that we actually do not have any usages. After it lands, we will remove actual support on the native side.

There are several reasons why removing it is a good idea:
* There is no any evidence that this feature is actually useful. That was discussed several times (e.g. see T7936714) during RN lifetime and the overall consensus is: We need something else, something like sync `onChange` event instead of it.
* Supporting the previous point, it's not used (at least inside Facebook). I searched hard and I could find only one place where it's used: in the TextInput Example.
* To deliver more functionality we should lean towards W3C specs, this one is not W3C compliant.
* Supporting this Feature in Fabric is quite challenging, so I want to do it sooner than later.
* This feature was never documented.

Changelog: [Breaking] `<TextInput>::onTextInput` event was removed

Reviewed By: TheSavior

Differential Revision: D18456175

fbshipit-source-id: c7a8ed7a86b33ecc01d45497645fe249556fdf96
2019-11-18 20:53:35 -08:00
Emily Janzer e22a27fb9b Use JS view configs for Image
Summary:
There was already a ImageViewNativeComponent used on Android, so I changed `Image.ios.js` to use it as well, and then switched that component to use `codegenNativeComponent` instead of `requireNativeComponent` so that it gets the view config from JS instead of the UIManager.

I'm gating this change behind `RN$Bridgeless` so this only affects bridgeless mode.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D18575533

fbshipit-source-id: aa71beb6be65dbb48ad2e1ca748f2cccd72a0e73
2019-11-18 18:37:37 -08:00
Emily Janzer 719d52fb6b Remove unused import from ScrollViewViewConfig
Summary:
As titled

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D18575837

fbshipit-source-id: 02e0b126bb783119f78e1eca82ee9fe9980529bc
2019-11-18 18:08:11 -08:00
Rick Hanlon b346970016 LogBox - Minor error message formatting fixes
Summary:
Adds better handling of component stacks for warnings and clarifies why we ignore `(ADVICE)` warnings.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18575693

fbshipit-source-id: f4eacbf74c62cd079f2c441951849fb03e0941dd
2019-11-18 13:47:42 -08:00
Moti Zilberman ca3c8b7a7d Treat NSNull like nil in RCTBridgingToOptional{Bool,Double}
Summary:
Currently `RCTBridgingToOptionalBool` and `RCTBridgingToOptionalDouble` will crash if passed an `NSNull` value. This diff changes these functions to instead treat it as equivalent to a missing value.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D18532044

fbshipit-source-id: fa822dcacb49697dd8a4f7b579bcfc029e0cdf41
2019-11-18 07:04:46 -08:00
Moti Zilberman 75a154b449 Use timer type as Systrace identifier
Summary:
Removes the use of `parseErrorStack` in `_allocateCallback`, which was used to determine which timer API was allocating the callback (for Systrace purposes). Instead, we now use the already-existing `type` argument, which achieves the exact same thing but is much faster than parsing the stack trace.

Changelog: [General] [Fixed] - Reduce overhead of setting up timers in DEV

Reviewed By: yinghuitan

Differential Revision: D18233182

fbshipit-source-id: 190c0ffad8734cd889b790248e5a77cfb147454b
2019-11-18 05:16:49 -08:00
Kevin Gozali bae5aea074 iOS: Pass image react tag to the image loader for attribution purpose
Summary:
Changelog: [Internal]

For image loading, the loader may need to inspect the imageView itself, so let's pass its reactTag. This only works pre-Fabric.

Reviewed By: sammy-SC

Differential Revision: D18522073

fbshipit-source-id: 400fc7e04b8d7852f6ecef941dd446fbff423c88
2019-11-16 00:13:48 -08:00
Kevin Gozali 446705df33 iOS: attach rootTag to the native component instance for easy access
Summary:
Changelog: [Internal]

The main use-case here is to get the rootTag off RCTImageView, for image loading instrumentation. The fact is, each RCTView subclass already has `reactTag` attached today. We already have the `rootTag` when the view is created by the UIManager, so why not just attach it like reactTag? If we don't, looking up the rootTag from the native component is non-trivial and extremely inefficient (have to jump to shadow queue, back to main queue, etc).

Reviewed By: sammy-SC

Differential Revision: D18497002

fbshipit-source-id: 8409e3a1c95e09accedd959592cbf178fab0b2c3
2019-11-16 00:13:48 -08:00
Kevin Gozali fdcdca4cfa iOS: Introduced RCTImageURLLoaderWithAttribution
Summary:
Changelog: [iOS] [Changed] - New internal image attribution support, but files importing RCTImageLoader.h must be converted to ObjC++

This new interface is the same as RCTImageURLLoader, but with additional support to pass in optional attribution information. The attribution info is not strictly defined (we may do so in the future though), and it's up to the hosting application and RCTImageURLLoader classes to handle it.

Reviewed By: sammy-SC

Differential Revision: D18492882

fbshipit-source-id: c3870c60e6c2e7c65758fc3235ebf5db369e07dc
2019-11-16 00:13:47 -08:00
Eli White bbc5c35a61 Convert to using forwardRef
Summary:
TextInput now acts as a host component and can be passed directly to our new APIs that require a host component. Callsites no longer need to call

```
inputRef.getNativeRef()
```

We mutate the ref to the host component adding the imperative methods of the TextInput so you can still call `inputRef.clear` and `inputRef.isFocused`.

Changelog:
[General][Changed] TextInput now uses `forwardRef` allowing it to be used directly by new APIs requiring a host component.

Reviewed By: yungsters

Differential Revision: D18458408

fbshipit-source-id: 1f149fd575210d702fa0fdf3d05bb2162436a773
2019-11-15 14:02:42 -08:00
Eli White 99dc4e204e Become compatible with Flow's TypesFirst
Summary:
When the TextInput class is exported directly Flow complains about some definitions because they don't properly define the export type. This change adds those types but still doesn't export the TextInput directly as there are more things that still need to get fixed.

Changelog:
[Internal]

Reviewed By: JoshuaGross

Differential Revision: D18444096

fbshipit-source-id: 18c88bbf1de5504f350681a71ea21d7e41876e49
2019-11-15 14:02:42 -08:00
Eli White 8f601418ab Convert TextInput from NativeMethodsMixin to ES6 Class
Summary:
In order to make this more flow typed and modern we need to get it off of createReactClass. This change converts the class as is with no intended behavior changes to an ES6 class.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D18443018

fbshipit-source-id: 831921976e9de8e965180cdefd1c4a154f04bfea
2019-11-15 14:02:41 -08:00
Eli White ce314ba097 Inline NativeMethodsMixin
Summary:
We need to get rid of NativeMethodsMixin. Normally we'd use forwardRef to the HostComponent, however we can't do this here because TextInput has its own imperative methods. I want to refactor this into a class and after that will revisit how to get rid of these methods.

Changelog:
[Internal]

Reviewed By: JoshuaGross

Differential Revision: D18436162

fbshipit-source-id: 0c81fa8b31b3248cbab8680ff680dd09c61c76e2
2019-11-15 14:02:41 -08:00
Eli White ca78497f73 Reorder methods
Summary:
Reordering the methds in TextInput to be a bit more consistent.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D18435732

fbshipit-source-id: 05a1d9d2c70a4b5fa00a3dc6be0520a216a24106
2019-11-15 14:02:41 -08:00
Eli White c70a093dd2 Refactor props, sort
Summary:
Sorting these props to be consistent

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D18435730

fbshipit-source-id: 259c6902bdaa3a7d4c7bdf8768d7f42191d5398b
2019-11-15 14:02:40 -08:00
Eli White b7bd85a2bf Refactor to not copy props
Summary:
We don't need a local mutable copy of props.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D18435731

fbshipit-source-id: 13ec1a78ca26b1372a4aed484a821204a93b6437
2019-11-15 14:02:40 -08:00
Eli White 854fa96cae Factor out TouchableWithoutFeedback
Summary:
The TouchableWithoutFeedback is almost exactly the same between both branches.

The responderReject prop was added in https://github.com/facebook/react-native/pull/16755.
The PR seems to say that it is the default behavior on Android. I don't want to make risky changes in this refactor so I'm not doing anything special about that prop for now.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D18435733

fbshipit-source-id: 372d17d8e67884930409a6a863757944cec4737e
2019-11-15 14:02:40 -08:00
Eli White eef7de6c6d TextInput merge _renderIOS and _renderAndroid methods
Summary:
These functions are quite similar and I'm going to refactor out the shared pieces. To make it easy to review this change just inlines those two functions with no other changes.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D18435734

fbshipit-source-id: 826f510359358427856993b536d41054ddf8c792
2019-11-15 14:02:39 -08:00
Rick Hanlon e9fd102c33 Remove "reload to reconnect" from the metro disconnected message
Summary:
Changes the Fast Refresh message for when metro disconnects to remove "Reload to reconnect.". The most common use case for this happening is when Metro is stopped, and reloading will not reconnect to a stopped metro server.

Long term we should reconnect to Metro automatically and then this message would be followed up with a "Reconnected to Metro" message, never needing a reload.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18527705

fbshipit-source-id: 40768ce1089348b612e9d86638f07169d2a34b67
2019-11-15 06:18:30 -08:00
Rick Hanlon 9c4afce70f LogBox - Move and improve 'see more' button
Summary:
Feedback from multiple people has been that the "see more" is hard to discover and that it should be at the bottom left, so this diff moves it there.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18487041

fbshipit-source-id: 1543c54e1de5fa16fa5b2e427812b6e72977bfb2
2019-11-15 06:11:08 -08:00
Rick Hanlon c54f5cf72a LogBox - Only dismiss syntax errors when the issue is fixed
Summary:
This change is not only more correct, it's also fixes the modal in the the next diff.

It's more accurate because in the previous location, the redbox dismissal was done as a hack in order to hide non-syntax errors so that the syntax error would be visible when it fired. This is unnecessary for LogBox because it always puts syntax errors on top of any other error.

The main motivation for changing this, however, is that this strategy is broken when switching to the Modal component because the Modal component does not work well with quickly unmounting and remounting. With the old strategy, the inspector would flicker and then collapse even though there was a syntax error.

Changelog: [Internal]

Reviewed By: cpojer, gaearon

Differential Revision: D18461431

fbshipit-source-id: e8ed83e3d2b002e5d45cc13dc9533ed841ed5cae
2019-11-14 12:06:35 -08:00
Rick Hanlon 32eb05ebea LogBox - Add temporary default error boundary for logbox
Summary:
Fixes an issue where unhandled exceptions would unmount the app and LogBox, hiding the exception and leaving the user stuck. This is a temporary solution until we either decide to provide an error boundary by default or move this to a separate root.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18504346

fbshipit-source-id: 4bca8693e63c367bf3070f12606a50824aa4cc23
2019-11-14 11:14:12 -08:00
Rick Hanlon 63b534a745 LogBox - Improve stack frame pressables and counts
Summary:
This diff makes number of improvements to stack frames:

- Adds padding around stack frame pressables
- Fixed wrapping for the closing bracket on component stacks
- Adds passing around "see more" buttons
- Fixed the count for "Show x more frames" when it's 0 and otherwise
- Add more cases for the count text
- Switches button back to minimize (snuck this in here)

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18495331

fbshipit-source-id: 8b9efa88c4205b23e734893d8db6deccce88344c
2019-11-14 04:48:55 -08:00
Rick Hanlon a0d2cd3d13 LogBox - Fix message content rendering in notifications
Summary:
Strips "Error: " and "Warning: " from the log notification.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18491963

fbshipit-source-id: 7c9d18638eee442d521a9aa2135ce6891c673cbe
2019-11-14 04:43:27 -08:00
Rick Hanlon ab751f5c45 LogBox - Add ReactNativeWarningFilter
Summary: Changelog: [Internal]

Differential Revision: D18492212

fbshipit-source-id: 81234c532cdcc8935a0c532950398bc84aa6d4d1
2019-11-13 18:29:47 -08:00
Valentin Shergin d5ec68f841 A workaround for RCTUITextField::secureTextEntry was moved to RCTUITextField
Summary:
The moved code fragment is a workaround for a bug in UITextField in iOS 8. There is no need to have this code in a general base class that serves both UITextField- and UITextView-based components. Especially for such workarounds like that, we have a dedicated class RCTUITextField. This diff moves that there.

Read more about the bug:
https://stackoverflow.com/questions/14220187/uitextfield-has-trailing-whitespace-after-securetextentry-toggle/22537788#22537788

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D18444734

fbshipit-source-id: a3764c19f562231ba3fa3d4c0ad7de069ea04d98
2019-11-13 14:22:17 -08:00
Rick Hanlon 80b4919d77 LogBox - Title render errors "Render Error"
Summary:
This diff changes LogBox to say "Render Error" instead of "Fatal Error" for errors thrown in render.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18466237

fbshipit-source-id: 737759f3febb937f70698dae5f1b1617e233fc98
2019-11-13 11:33:38 -08:00
Rick Hanlon 8335ebaeab Add support for isRenderError
Summary:
This diff adds `isRenderError` to the Log data, and refactors the LogBoxLog object to accept an object in the constructor instead of adding the 7th argument. No visual updates as those are in the next diff.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18466192

fbshipit-source-id: e38ef9032b8074abbc7b40cbe7a84d45285944c4
2019-11-13 11:33:38 -08:00
Rick Hanlon 75deeb32fe LogBox - Errors thrown in render are fatals
Summary:
The React team wants exceptions thrown during render to pop over the screen as fatals.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D18439258

fbshipit-source-id: dded7b9d93271c1a4eff682be521c7567dfe7d7e
2019-11-13 11:33:37 -08:00
Daniel Sainati 0f8ad31745 @allow-large-files deploy Flow v0.112 to xplat
Summary: Changelog: [Internal]

Reviewed By: samwgoldman

Differential Revision: D18466454

fbshipit-source-id: 83c76ba06822a378cb0a8ea72cd0fb9d19f81a4b
2019-11-13 11:18:41 -08:00
Oleksandr Melnykov c5c3264a94 Add setNativeRefreshing command to SwipeRefreshLayoutManager
Summary:
As a part of the migration from `setNativeProps` in Fabric and Paper, we are replacing it by view commands in the RefreshControl component on Android.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D18475428

fbshipit-source-id: f2e978d88e34c74771f8582247ecc82b2b942557
2019-11-13 10:21:04 -08:00
Oleksandr Melnykov cd1e34d4a2 Add setNativeValue command to ReactCheckBoxManager
Summary:
As a part of the migration from `setNativeProps` in Fabric and Paper, we are replacing it by view commands in the Checkbox component on Android.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D18451524

fbshipit-source-id: 566f3574b85a1ae97f78b2fb95548b8529c0c92f
2019-11-13 10:15:50 -08:00
Rick Hanlon 687d3f438f LogBox - Fix animation for source map failure
Summary:
Fixes an issue where the icon for failed source maps would spin like the pending icon.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18479027

fbshipit-source-id: 07c428239122f3f4a8a58dcd8faf09e54170d45b
2019-11-13 10:04:44 -08:00
Rick Hanlon 80ba7f78fb LogBox - Exclude from inspector
Summary:
LogBox should be on top of the inspector so that you can dismiss and view errors without the inspector getting in the way.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D18462490

fbshipit-source-id: 0da2819158c3bc2602a63695222c1601dcf79183
2019-11-13 09:52:44 -08:00
Rick Hanlon 5427211a00 LogBox - Dismiss keyboard when the inspector opens
Summary:
If the keyboard is open when the inspector pops open, dismiss it.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18468221

fbshipit-source-id: 0d51fa90824ed8bef6a3b6e813013fa3c2a4bbda
2019-11-13 09:39:50 -08:00
Ramanpreet Nara a95184cbad Make RCTNativeAnimatedModule a regular NativeModule
Summary: We suspect that RCTNativeAnimatedModule's conversion to TurboModule could be the cause. There could be a memory leak in the TurboModule system that RCTNativeAnimatedModule exposes, or RCTNativeAnimatedModule itself could have a memory leak. Therefore, I'm making RCTNativeAnimatedModule a regular NativeModule for now.

Reviewed By: fkgozali

Differential Revision: D18410852

fbshipit-source-id: dd714fe0fb0267fe5e1a94a26d47a82199b6f2c7
2019-11-12 13:56:09 -08:00
Emily Janzer d37baa78f1 Split JS spec for image loader module
Summary:
It turns out the ImageLoader native module has different method signatures on iOS than on Android, so the JS spec we currently have won't work for ANdroid. In this diff I'm splitting up the spec for NativeImageLoader into an Android & iOS versions (similar to PlatformConstants), and updating the Android spec to match the native implementation. I'm also changing `RCTImageLoader` to use the new generated spec, and updating the JS callers (`Image.android.js` and `Image.ios.js`) to use the right one for the platform (instead of importing the untyped `ImageLoader` native module from `react-native`, like we were on Android :-/).

This will be a breaking change for anyone who's directly using `NativeImageLoader.js`, but I think most callsites should be using the `Image` component instead.

Changelog: [General] [Changed] Split NativeImageLoader into NativeImageLoaderAndroid and NativeImageLoaderIOS

Reviewed By: RSNara

Differential Revision: D18439538

fbshipit-source-id: 94c796d3fd27800ea17053e963bee51aca921718
2019-11-11 17:24:25 -08:00
Rick Hanlon 390546f6ed Increase hitslop for notification dismiss button
Summary:
This diff increases the hit slop for the close button to dismiss the notifications.

Changelog: [Internal]

Differential Revision: D18438192

fbshipit-source-id: e671ec06c69f52f83c7dda87118ca1d2426e993b
2019-11-11 16:16:03 -08:00
Rick Hanlon a9ffad446a LogBox - Better design for stacks
Summary:
This diff makes minor style improvements and refactors to stack frame displays, primarily:
- Adding brackets around react components
- Uses a monospace font for the code
- Changing section titles to "Components" and "Call stack"
- Refactors the section headers to a single component and reduces the text size of headings
- Removes the query string from unsymbolicated stacks

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18433487

fbshipit-source-id: 7914b5810a4303e9a0d52def92e524b9e72f79ed
2019-11-11 16:12:44 -08:00
Rick Hanlon c1d9a1f099 LogBox - Add support for filtering warnings
Summary:
This diff adds the ability to set a custom warning filter function.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18422114

fbshipit-source-id: a2949a013f478093a2fabc003c496353b8fdbc3a
2019-11-11 16:12:43 -08:00
Rick Hanlon 619a17e34b LogBox - Speed up popping fatal errors
Summary:
This diff add proper optimistic symbolication loading to fatal errors that are popped open, improving both raw performance and perceived performance of fatal logboxes.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18421259

fbshipit-source-id: 2c96a96522d6d199fecd828144799c96437c3d28
2019-11-11 16:12:43 -08:00
Rick Hanlon fe82f402a9 LogBox - Rework how fatals and syntax errors are handled
Summary:
This diff makes a few changes to how errors and warnings are handled in LogBox:

- Soft errors continue to notify the user collapsed.
- Fatal errors pop up full screen over the content, but are dismissible.
- Syntax errors pop up full screen, and are **not** dismissible.
- Removed the "Reload" button on fatals, and added back the dismiss/close.
- Removed all buttons from syntax errors so users are encouraged to fix it and safe without reloading.

To do this we needed to:
- Move the selectedLogIndex state out of the component and up to the rest of the log state.
- Change the way popping a log works, it's now done by setting selectedLogIndex at log time instead of deriving it at render time, that means `selectedLogIndex` is now the sole state value for deciding if the log inspector is open or not
- Whenever the state is updated, find a syntax error if it's there, instead of doing this at render time

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18421089

fbshipit-source-id: d2c4937f666f1302ed1a7b1b9c6679b0509136c5
2019-11-11 16:12:43 -08:00
Oleksandr Melnykov a62a685b14 Add setNativeSelectedPosition command to ReactPickerManager
Summary:
Fabric doesn't support setNativeProps, so we have to use commands instead to set the value of the native component.

Changelog: [Android] [Added] - Add setNativeSelectedPosition command to ReactPickerManager

Reviewed By: mdvacca

Differential Revision: D18007791

fbshipit-source-id: dfa26792205189a336ab43b1c51f43f8f57c8e72
2019-11-11 12:32:51 -08:00
Eli White 60e91fa9ff Add ascii-capable-number-pad to DeprecatedTextInputPropTypes
Summary:
This was added to the flow type and example in D18275225 but not added to the prop-type

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D18431253

fbshipit-source-id: ffe4eaa8bd9dd22bf7c1487873c9fbdb7b226e3d
2019-11-11 12:20:18 -08:00
Rick Hanlon 28a3b25c31 LogBox - Display code frame column number correctly
Summary:
Code frame columns are returned 0 based but displayed in editors 1 based, this diff bumps the column we display by one to match.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18426163

fbshipit-source-id: 2c6aefb6fe7ce161cd768b6748b7739d486ed438
2019-11-11 07:40:09 -08:00
Samuel Susla 8f607a7967 Fabric: add native commands support to ScrollView
Summary:
ScrollView isn't using codegen, therefore we need to manually write commands interface. I also typed commands so it uses `Double` instead of `number`.

Changelog: [Internal]

Reviewed By: TheSavior

Differential Revision: D18371887

fbshipit-source-id: 3bd11b9969b80ce6d2302e2f0da28884e9221b7e
2019-11-10 17:19:00 -08:00
Eli White 960a4767be Prepare event.target to be a HostComponent
Summary:
We are going to be switching event target and current target from being a reactTag to being a host instance.

This doesn't actually change what the actual type of this key is, but is split out like this to make diffs smaller and easier to review. Actual behavior changes will be coming and tested in a future diff.

These are the only callsites I found that use target outside of the React renderers.

The other approach this change could take would be to make all the downstream callsites take both a tag or a HostComponent. That felt too difficult to do at the same time so I'm instead introducing these `findNodeHandle` calls temporarily.

The main thing we need to do is be able to change the callsites in the renderer to start sending the instance. Once everything is passing the instance instead of the tag then we can clean all these up cleanly.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D18384435

fbshipit-source-id: b3a7e6a2778cb7dd9cdfe451cf869cd99641b167
2019-11-08 17:33:35 -08:00
Eli White 74f567ba3c Prepare `currentTarget` to accept number or host component
Summary:
We are going to be switching event target and current target from being a reactTag to being a host instance.

This doesn't actually change what the actual type of this key is, but is split out like this to make diffs smaller and easier to review. Actual behavior changes will be coming and tested in a future diff.

These are the only callsites I found that use `currentTarget` outside of the React renderers.

Changelog:
[Internal]

Reviewed By: zackargyle, yungsters

Differential Revision: D18382470

fbshipit-source-id: 23add5498b38dc109b154479826f701c8a1920b9
2019-11-08 17:33:35 -08:00
Ramanpreet Nara 8ec7e0966c Delete Sample and CrashyCrash
Summary:
These NativeModules aren't necessary. So, instead of making them TurboModule-compatible, I'm deleting them.

Changelog:

[General][Removed] - Remove Sample and CrashyCrash

Reviewed By: fkgozali

Differential Revision: D18361526

fbshipit-source-id: 3217130a5fb32bec9db78d53c5429bae7ed7b66c
2019-11-08 14:14:47 -08:00
Ramanpreet Nara 861c860462 Make PushNotificationManager TurboModule-compatible
Summary:
Changelog:
[iOS][Added] - Make PushNotificationManager TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D18375067

fbshipit-source-id: 256e6a42bf0055253f04df45e67f538f7564a966
2019-11-08 14:14:46 -08:00
Ramanpreet Nara d73ae1baa3 Make RCTWebSocketModule TurboModule-compatible
Summary:
Changelog:
[iOS][Added] - Make RCTWebSocketModule TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D18353766

fbshipit-source-id: fde0f6593dd203ab3dcb8f9cf40012ba4761d6ba
2019-11-08 14:14:46 -08:00
Ramanpreet Nara 1b2992e8b3 Make RCTLinkingManager TurboModule-compatible
Summary:
See title.

Changelog:
[iOS][Added] - Make RCTLinkingManager TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D18331085

fbshipit-source-id: 5b4482affbf647bd96043ef9a27e715856bc25f1
2019-11-08 14:14:45 -08:00
Kevin Gozali fb627dac6a TM JS: Revert to import from TurboModuleRegistry.js
Summary:
Changelog: [Internal]

Reverting the import to the previous local module style since importing from react-native seems to introduce some perf regression. We'll revisit this later in the future.

Reviewed By: yungsters

Differential Revision: D18383893

fbshipit-source-id: f11d46a4545768f39199fd6fd22fcf14905d0a74
2019-11-08 11:44:16 -08:00
Christoph Nakazawa fa4f23e4e8 Add codeFrame to each warning and error in LogBox
Summary:
This diff changes the LogBox to show the code frame for the first non-collapsed stack frame. Let me know what you think about this change!

Changelog: [Internal] LogBox changes

Reviewed By: rickhanlonii

Differential Revision: D18372456

fbshipit-source-id: ddf6d6c53ab28d11d8355f4cb1cb071a00a7366e
2019-11-08 08:31:01 -08:00
Rick Hanlon 5eddf1d79a LogBox - Show native redbox when failing to handle logs in LogBox
Summary:
This diff adds error handling to logbox so that if there is an error either when parsing logs or when rendering LogBox, we show a native redbox with the error that was thrown and a message explaining that it's an internal React Native error.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18394788

fbshipit-source-id: 5d74d58e4b28ef6d863079e83677fb23ef4ccb34
2019-11-08 07:41:09 -08:00
Rick Hanlon 7ad862eaba LogBox - Press to open code frame file
Summary:
This diff adds the ability to press the file name of a code frame to open the file in your editor.

Note: I re-worked the frame location to extract the frame row and column at parse time so that we don't need to do any clowny regexes down stream.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18358283

fbshipit-source-id: 705e07d229c66ecfd225a8fb65ef2f78b5034c9c
2019-11-07 09:11:59 -08:00
Rick Hanlon 83401adeae LogBox - Add platform and dim text in meta
Summary:
This diff adds more information to the meta area so it doesn't look so empty and dims the text so it doesn't jump out so much.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18360434

fbshipit-source-id: d460ffd59ef032d89879f88e309ac81e6d862c30
2019-11-07 08:48:05 -08:00
Rick Hanlon f1a11b6ce4 LogBox - Rename and re-order dismiss/minimize buttons
Summary:
Based on feedback "minimize" wasn't clear and "close" is more common so it should be on the right

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18353907

fbshipit-source-id: bccfc9be6c225a9adb31ef11d6a91330a7d4e008
2019-11-07 06:32:01 -08:00
Rick Hanlon 8901a0b863 LogBox - Better shadow for fatal button
Summary:
This diff lowers the intensity of the shadow on the fatal button based on user feedback that it's weird.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18353498

fbshipit-source-id: 9133aae02e5609e181a55289f349ea6a9e9fdaf6
2019-11-07 06:32:01 -08:00
Rick Hanlon 118e4d2c04 LogBox - Dim collapsed frames
Summary:
It's nice to be able to still see which stack frames are collapsed even when they're expanded.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18352700

fbshipit-source-id: f76086574677ea58c6b19b3300597681a17a96ae
2019-11-07 06:32:01 -08:00
Rick Hanlon 1c9a792ca4 LogBox - Re-apply badge color fix
Summary:
The previous diff mistakenly landed an old version

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18358917

fbshipit-source-id: 284dd6754c4aea3814e5f45dae6f68ed2c261b6a
2019-11-07 06:17:35 -08:00
Rick Hanlon e223454fbf LogBox - Remove extra padding to bottom of scroll container
Summary:
Fixes the comical level of padding at the end of the scroll container.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18351352

fbshipit-source-id: 5482fb81d0e385f0ce36530491b407c03ad87f3e
2019-11-06 13:56:10 -08:00
Rick Hanlon 38b3cbcca9 LogBox - Update press backfround for inspector footers
Summary:
Previously the background for the LogBox inspector footer buttons bleed into the background behind them. This change gives them more distinct on press backgrounds.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18337437

fbshipit-source-id: c0cefd4464d94dc23316208135a9bf922fb510cb
2019-11-06 10:17:47 -08:00
Rick Hanlon 40ee0adbc1 LogBox - Center number and darken warning count color
Summary:
Some feedback for logbox is that the count wasn't centered on certain devices (e.g. Nexus 6 but not Pixel 3), and that the white badge count color for warnings was hard to read. This diff fixes both issues.

Changelog: [Internal]

Differential Revision: D18336681

fbshipit-source-id: 8200bcf04dcea9a6bbcaa1555fbab000c78c0a4f
2019-11-06 10:17:47 -08:00
Rick Hanlon 001e8d5a2b LogBox - Don't show substitutions for log notification
Summary:
When messages are collapsed, showing a different style for the string substitutions for interpolated strings is jarring, so let's  show the plaintext instead.

Changelog: [Internal]

Differential Revision: D18335295

fbshipit-source-id: f718469ac3206fd7a934a26495ebf8b1850fb674
2019-11-06 10:17:47 -08:00
Rick Hanlon 059e54a6e3 LogBox - hide only non-fatal errors for disableLogBox
Summary:
This diff updates the handling for `console.disableLogBox` so that:

- It does not disable fatals and syntax errors
- When there is a fatal or syntax error, the hidden logs are still shown and browsable

Changelog: [Internal]

Differential Revision: D18339684

fbshipit-source-id: 906122cc19ce50b3a21a42ae455206796953bcf3
2019-11-06 10:12:01 -08:00
Jordan Brown 9d0707c409 deploy v0.111 to xplat
Summary: Changelog: [Internal]

Reviewed By: dsainati1

Differential Revision: D18342672

fbshipit-source-id: ae6933344e4545ae8f650a4d14cfe55c34f43ad9
2019-11-06 10:02:29 -08:00
Ramanpreet Nara 97a4b9b691 Fix RCTNetwork podspec
Summary:
RCTNetwork files require the `MobileCoreServices` framework. This diff adds the spec to the Podfile

Changelog:
[iOS][Fixed] - Fix RCTNetwork podspec

Reviewed By: PeteTheHeat

Differential Revision: D18331084

fbshipit-source-id: 0de9e6d5e2ad2a24ba0cfdecd4a8a18419acf042
2019-11-05 19:14:39 -08:00
Emily Janzer f3b3d777ab Add view config for AndroidHorizontalScrollContentView
Summary:
Add handwritten view config for AndroidHorizontalScrollContentView. Same as RCTScrollContentView, this native component has no props of its own other than what View accepts. It's simply used as a container for the horizontal ScrollView on Android.

Changelog: [Internal]

Reviewed By: rickhanlonii

Differential Revision: D18284673

fbshipit-source-id: 8cd6282a3b2e5c9876da5cc0e068b12dd56acfd8
2019-11-05 19:09:03 -08:00
Emily Janzer b7fac14b64 Add view config for AndroidHorizontalScrollView
Summary:
Adding a handwritten view config for AndroidHorizontalScrollView, the native component that's used with `<ScrollView horizontal={true} />` on Android. Native props are the same as `RCTScrollView`, so I'm reusing the type for that.

Changelog: [Internal]

Reviewed By: rickhanlonii

Differential Revision: D18284517

fbshipit-source-id: 7c81f72440b93d611f9574ad2c01a96530d07bf7
2019-11-05 19:09:03 -08:00
Emily Janzer 1f2dc8997f Add (empty?) view config for RCTScrollContentView
Summary:
Adding a handwritten view config for RCTScrollContentView. This host component doesn't actually have any props of its own separate from View; it's just a container for a ScrollView.

Changelog: [Internal]

Reviewed By: rickhanlonii

Differential Revision: D18283792

fbshipit-source-id: db95e981f54bef7c068b907c5d1fa52774dad147
2019-11-05 19:09:02 -08:00
Emily Janzer da39b07298 Add handwritten view config for RCTScrollView
Summary:
Adding a handwritten view config for RCTScrollView, to be used in DEV only (for now).

Changelog: [Internal]

Reviewed By: rickhanlonii

Differential Revision: D18263203

fbshipit-source-id: 975499f030c7caed9851bcde0be42c5058911ad5
2019-11-05 19:09:02 -08:00
Jordan Brown 93e58b2c96 Suppressions for 0.111
Summary:
still some generated files in www that need to land before we can release 0.111 here.

drop-conflicts

Changelog: [Internal]

(Note: this ignores all push blocking failures!)

Reviewed By: dsainati1

Differential Revision: D18278838

fbshipit-source-id: b20c3fefb3aab7c5fb614b33d846c7548184f49a
2019-11-05 17:36:23 -08:00
Samuel Susla 6fb5f81193 Use commands instead of setNativeProps in DatePicker
Summary:
Changelog: DatePicker now uses commands instead of `setNativeProps`

We are moving away from `setNativeProps` in favour of commands API.

Reviewed By: shergin

Differential Revision: D17787870

fbshipit-source-id: aa532cbb7bfb3031c085e5122ab808522c437901
2019-11-05 10:41:41 -08:00
Rick Hanlon 1fb815ed43 LogBox - hotfix for opening logs
Summary:
`fatalIndex` is never null, we switched it to go to -1 when it's not set

Changelog: [Internal}

Reviewed By: cpojer

Differential Revision: D18324666

fbshipit-source-id: 04d4cca9923af2a91ceec03f8314dead4681e526
2019-11-05 07:14:27 -08:00
Jorge Bernal a6fc0898de Add support for native pseudo-OS to Platform.select (#26966)
Summary:
When you write platform-specific code using [file extensions](https://facebook.github.io/react-native/docs/platform-specific-code#platform-specific-extensions), you can specify `.ios.js`, `.android.js`, or the catch-all `.native.js` when you are sharing code with a web project.

This `native` shortcut is missing for the `Platform.select` method, and this PR is adding support for that.

## Changelog

[General] [Added] - Platform.select now supports native as an option.
Pull Request resolved: https://github.com/facebook/react-native/pull/26966

Test Plan: Added relevant passing unit tests for Platform module.

Differential Revision: D18323670

Pulled By: cpojer

fbshipit-source-id: 7524c1914beab4f86041dcf8e60875380ebf7e02
2019-11-05 05:39:20 -08:00
Kevin Gozali dd06f85bd0 TM JS: cleaned up TurboModuleRegistry types [2]
Summary:
Changelog: [Internal]

Moved the imports for `TurboModuleRegistry` and `TurboModule` from `react-native`. This was a jscodeshift with the script: P120688078

Reviewed By: yungsters

Differential Revision: D18262538

fbshipit-source-id: 48fac15229c897408928511c5ecbb42f17ec7b42
2019-11-04 18:51:05 -08:00
Kevin Gozali e40aa7922e TM JS: cleaned up TurboModuleRegistry types [1]
Summary:
Changelog: [Internal]

* The original intention was to export both `get()` and `getEnforcing()` from TurboModuleRegistry.js, so define export default there
* Exposes `TurboModule` type on the top-level `'react-native'` import
* Tried this out on `NativeSegmentFetcher`

Reviewed By: yungsters

Differential Revision: D18262535

fbshipit-source-id: a46f2b8b6147531998efac8aa3b8259885224902
2019-11-04 18:51:05 -08:00
Ramanpreet Nara 6f54f00e0d Make RCTDataRequestHandler, RCTFileRequestHandler, and RCTHTTPRequestHandler TurboModule-compatible
Summary:
See title.

Changelog:
[iOS][Added] - Make RCTDataRequestHandler, RCTFileRequestHandler, and RCTHTTPRequestHandler TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D18093611

fbshipit-source-id: dad4e04104a9a5fc8e70a17ef0bdf7b29bff9171
2019-11-04 16:07:25 -08:00
Ramanpreet Nara ffb8191a51 Make RCTNetworking TurboModule-compatible
Summary:
See title.

Changelog:
[iOS][Added] - Make RCTNetworking TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D18087243

fbshipit-source-id: 81bbf77d603e96fa94ad219e5ed68f42bb7e7dc5
2019-11-04 16:07:25 -08:00
Ramanpreet Nara 1d315608ef Make RCTCameraRollManager TurboModule-compatible
Summary:
See title.

Changelog:
[iOS][Added] - Make RCTCameraRollManager TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D18148892

fbshipit-source-id: de49e368615032b2c4de129dc55191c562cbdfbe
2019-11-04 16:07:24 -08:00
Ramanpreet Nara c29ec64d94 Implement RCTConvertOptionalVecToArray(const folly::Optional<ContainerT> &vec)
Summary:
There are two implementations of `RCTConvertVecToArray`. The first implementation:

```
template<typename ContainerT>
NSArray *RCTConvertVecToArray(const ContainerT &vec, id (^convertor)(typename ContainerT::value_type element))
{
  NSMutableArray *array = [NSMutableArray new];
  for (size_t i = 0, size = vec.size(); i < size; ++i) {
    id object = convertor(vec[i]);
    array[i] = object ?: (id)kCFNull;
  }
  return array;
}
```
The purpose of the second implementation is to default the convertor function to the identify function:
```
template<typename ContainerT>
NSArray *RCTConvertVecToArray(const ContainerT &vec)
{
  return RCTConvertVecToArray(vec, ^id(typename ContainerT::value_type element) { return element; });
}
```

Meanwhile, there's only one implementation of `RCTConvertOptionalVecToArray`:

```
template<typename ContainerT>
NSArray *RCTConvertOptionalVecToArray(const folly::Optional<ContainerT> &vec, id (^convertor)(typename ContainerT::value_type element))
{
  return vec.hasValue() ? RCTConvertVecToArray(vec.value(), convertor) : nil;
}
```

In this diff, I overload `RCTConvertOptionalVecToArray` to default the convertor to the identify function.

Changelog:

[iOS][Added] - Added RCTConvertOptionalVecToArray with default converter

Reviewed By: PeteTheHeat

Differential Revision: D18148891

fbshipit-source-id: d7d5f05cda06c9fa5374334ec4e9dbbd8b6d2eba
2019-11-04 16:07:24 -08:00
Ramanpreet Nara 7e5de4e241 Make RedBox TurboModule-compatible
Summary:
See title.

Changelog:
[iOS][Added] - Make RedBox TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D18142255

fbshipit-source-id: 2d130aca93a88ac7c983ce0e4848955ffb0be518
2019-11-04 16:07:23 -08:00
Ramanpreet Nara fe3ae9dce8 Make RCTDevMenu and RCTDevSettings TurboModule-compatible
Summary:
Changelog:
[iOS][Added] - Make RCTDevMenu and RCTDevSettings TurboModule-compatible

Reviewed By: shergin

Differential Revision: D18148890

fbshipit-source-id: bd4f0b2797e299cd963e34fa47044a9e1232efe0
2019-11-04 16:07:23 -08:00
Janic Duplessis 686ab49107 Don't restore default values when components unmount (#26978)
Summary:
There are some cases where restoring default values on component unmount is not desirable. For example in react-native-screens we want to keep the native view displayed after react has unmounted them. Restoring default values causes an issue there because it will change props controlled my native animated back to their default value instead of keeping whatever value they had been animated to.

Restoring default values is only needed for updates anyway, where removing a prop controlled by native animated need to be reset to its default value since react no longer tracks its value.

This splits restoring default values and disconnecting from views in 2 separate native methods, this way we can restore default values only on component update and not on unmount. This takes care of being backwards compatible for JS running with the older native code.

## Changelog

[General] [Fixed] - NativeAnimated - Don't restore default values when components unmount
Pull Request resolved: https://github.com/facebook/react-native/pull/26978

Test Plan:
- Tested in an app using react-native-screens to make sure native views that are kept after their underlying component has been unmount don't change. Also tested in RNTester animated example.

- Tested that new JS works with old native code

Reviewed By: mmmulani

Differential Revision: D18197735

Pulled By: JoshuaGross

fbshipit-source-id: 20fa0f31a3edf1bc57ccb03df9d1486aba83edc4
2019-11-04 15:40:09 -08:00
Eli White e9b4928311 TextInput: Don't do an extra round trip to native on focus/blur
Summary:
I wrote up a bunch of context for this in response to #27038 by fat. That comment is reproduced here in this commit message. You can see it in it's original contxt here: https://github.com/facebook/react-native/pull/27038

Okay, here is what I think is happening. For context, here is a diagram I have of how focus and blur propagates through the system. This might be interesting to refer back to as you go through the rest of my explanation.

![graphviz (12)](https://user-images.githubusercontent.com/249164/67992345-982c9d80-fbf9-11e9-96ea-b091210dddbe.png)

ScrollView's scrollResponder is responsible for blurring text inputs when a touch occurs in the ScrollView but outside of the currently focused TextInput. The code for that is here:
6ba2769f0f/Libraries/Components/ScrollResponder.js (L301-L314)

This happens on `scrollResponderHandleResponderRelease` aka, touch up.

It checks for what the currently focused textinput is by calling `TextInputState.currentlyFocusedField()`.

That function is a JS variable that is being updated by calls to `TextInputState.focusTextInput` and `TextInputState.blurTextInput`:

6ba2769f0f/Libraries/Components/TextInput/TextInputState.js (L36-L71)

I added some console logs to those methods to see which ones are being called when running your repro (thanks for the repro!). **This is without your fix**

Click on and off:
```
// Click on input 1
focusTextInput input1
TextInput's _onFocus called

// Click on blank space
scrollResponderHandleResponderRelease blur input1
blurTextInput input1
TextInput's _onBlur called
```

Click on input1, then input 2, then off
```
// Click on input 1
focusTextInput input1
TextInput's _onFocus called for input1

// Click on input 2
focusTextInput input2
TextInput's _onBlur called for input1
TextInput's _onFocus called for input2

// Click on blank space
scrollResponderHandleResponderRelease blur input2
blurTextInput input2
TextInput's _onBlur called for input2
```

And now for the bug. Click on input 1, tab to 2, then off
```
// Click on input 1
focusTextInput input1
TextInput's _onFocus called for input1

// Tab to input 2
TextInput's _onBlur called for input1
TextInput's _onFocus called for input2

// Click on blank space
scrollResponderHandleResponderRelease blur input1
blurTextInput input1
```

Notice how `focusTextInput` was never called with input2 in the last example. Since this is the function that sets the `currentlyFocusedField` when we click on the blank space RN is trying to blur the first input instead of the second.

# The root cause
We are tracking the state of which field is focused in JS which has to stay in sync with what native knows is focused. We [listen to _onPress](6ba2769f0f/Libraries/Components/TextInput/TextInput.js (L1103-L1107)) and call `TextInputState.focusTextInput` in that handler. However, we don't currently have anything listening to other ways for an input to become focused (like tabbing) so it doesn't end up updating the `currentlyFocusedField`.

We have the same problem with blur that we actually fixed the same way you did here in this PR:
6ba2769f0f/Libraries/Components/TextInput/TextInput.js (L1182-L1189)

If you look back at my diagram at the beginning of this post, you'll notice the missing edge from `TextInput._onFocus` to `TextInputState.focusTextInput`. That's the problem. :)

The reason this solution works is because this function **is** the notification from native that an input was focused or blurred. This solution is *fine* because this updates the `currentlyFocusedID` but isn't great because it both sets that value and **calls the native code to focus or blur again**. Luckily the native code doesn't send an event back to JS if you try to blur an already blurred TextInput otherwise we'd have an infinite loop.

# The correct solution
The correct thing would probably be to have all of this tracking in native code and not in JavaScript code. That's a pretty big change though and very out of scope. Something for our team to keep in mind for the future.

A short term term solution would be to refactor `focusTextInput` and `blurTextInput` to pull out the part that sets the `currentlyFocusedID` that we could call from `TextInput` directly from `_onFocus` and `_onBlur`.

# ^This short term term solution is what this commit is doing.

Changelog:
[General][Changed] TextInput no longer does an extra round trip to native on focus/blur

Reviewed By: RSNara

Differential Revision: D18278359

fbshipit-source-id: 417566f25075a847b0f4bac2888f92fbac934096
2019-11-04 14:42:44 -08:00
Peter Argany dfba3129f4 CoreFoundation memory management in RCTImageStoreManager
Summary:
I recently learned that CoreFoundation object lifecycle is not managed automatically by ARC.

RN appears to be leaking a few refs, this small stack of diffs cleans them up.

Changelog: [Internal][Fixed] Fixed memory management of CF objects in RCTImageStoreManager

Reviewed By: fkgozali

Differential Revision: D18308313

fbshipit-source-id: 35c1152753578825871c28e1070599cd409b3a34
2019-11-04 14:42:43 -08:00
Luna Wei 8e55e9ab1b TouchableNativeFeedback.android use codegenNativeCommands
Summary: Changelog: [Internal] Use `findHostInstance_DEPRECATED` for TouchableNativeFeedback

Reviewed By: TheSavior

Differential Revision: D18285029

fbshipit-source-id: 1c19c35e660519bee450e4fd37f18c03ec1883e0
2019-11-04 12:31:20 -08:00
Eli White 0799910705 React partial sync for 15ed22757...2cfa5ea92
Summary:
This sync includes these changes:

- **[2cfa5ea92](https://github.com/facebook/react/commit/2cfa5ea92 )**: Types: findHostInstance_DEPRECATED returns React.ElementRef<HostComponent<mixed>> (#17265) //<Eli White>//

Changelog:
[General][Changed] React partial sync for 15ed22757...2cfa5ea92

Reviewed By: lunaleaps

Differential Revision: D18302477

fbshipit-source-id: a8198ec7f39ab86aed2a1d3077187fc50d0f38e9
2019-11-04 12:22:53 -08:00
Eli White 88f64a5782 Slider: Inline default props
Summary:
Instead of defining the default props as a property on the forwardRef, we can just inline it into the destructure.

Changelog:
[Internal]

Reviewed By: yungsters

Differential Revision: D18296180

fbshipit-source-id: c9e85a9869648983a01d84c36a5c581b357b427f
2019-11-04 12:16:38 -08:00
Eli White f19112f46f Tighten Slider Flow type
Summary:
Changelog:
[Internal]

Reviewed By: yungsters

Differential Revision: D18295806

fbshipit-source-id: b2cb4d84bbcddbac83baaab9ea2af3e1c87150a9
2019-11-04 12:16:37 -08:00
Samuel Susla 1cfa1e6fa2 Remove -Wno-unguarded-availability from ReactInternal
Summary:
This will allow us to catch cases where we use iOS 10-only APIs on iOS 9

Changelog: [Internal]

Reviewed By: TheSavior, mmmulani

Differential Revision: D18275225

fbshipit-source-id: dc9c515415208db40750be997173ce5bd6eb494f
2019-11-04 12:03:10 -08:00
Eli White 8f6fa42503 TextInput: Remove legacy iOS implementation
Summary:
This implementation was replaced in January of 2018 by shergin. I believe everyone should have `RCTVirtualText` at this point, which should make this safe to remove.

Changelog:
[Internal][TextInput] Remove deprecated and unused legacyIOS implementation

Reviewed By: shergin

Differential Revision: D18296981

fbshipit-source-id: b5d5756e7bbc8141f1b826ab07c76a781ab03edc
2019-11-04 11:51:12 -08:00
Eli White 1804e7cbea Remove TextInput's `inputView` prop
Summary:
This if statement is older than June 2015. This prop is undocumented, not part of the flow type, not on our public docs, not in the flow type, not in typescript types, and I can't find any blog posts about it.

Changelog:
[Breaking][TextInput] Removing undocumented `inputView` prop. Use children instead.

Reviewed By: yungsters

Differential Revision: D18296894

fbshipit-source-id: 95373d24659e6f06e212095b57e8f6d713323c11
2019-11-04 11:51:12 -08:00
Peter Argany dc3b5ad275 Remove unneeded NSNotification center removeObserver
Summary:
A very common pattern I've seen in RN codebase:

     - (instancetype) init {
        [[NSNotificationCenter defaultCenter] addObserver:self ...]
      }

    - (void) dealloc {
       [[NSNotificationCenter defaultCenter] removeObserver:self ...]
     }

From Apple:

https://developer.apple.com/documentation/foundation/nsnotificationcenter/1413994-removeobserver?language=objc

> If your app targets iOS 9.0 and later or macOS 10.11 and later, you don't need to unregister an observer in its dealloc method.

RN targets iOS9+

Changelog: [Internal][Cleanup] Remove unneeded NSNotification center removeObserver

Reviewed By: shergin

Differential Revision: D18264235

fbshipit-source-id: 684e5f5555cec96b055b13cd83daaeb393f4fac9
2019-11-04 10:19:30 -08:00
Samuel Susla 56c7ae729a Migrate Picker from setNativeProps to Commands API
Summary:
We are moving away from `setNativeProps` in favour of commands API.

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D17765031

fbshipit-source-id: fcfe3fe68abb3e49e2dd7a102db598ade749acde
2019-11-04 08:29:52 -08:00
Samuel Susla 4eb8a951ff Use Switch command from JavaScript
Summary: Changelog: Switch on iOS now uses command instead of `setNativeProps`.

Reviewed By: lunaleaps

Differential Revision: D17714895

fbshipit-source-id: 0e8784fc1d0a57c563b0a4c038febdc0320af11e
2019-11-04 07:44:10 -08:00
Samuel Susla b6a23d8793 Add excludedPlatform option to CodeSchema
Summary:
Currently we generate Java ViewManager interfaces and C++ classes for iOS regardless whether the component is supported on platform or it isn't. This adds an option to exclude either iOS to Android in order to avoid this.

Changelog: In codegen it is now possible to exclude one or the other platform

Reviewed By: rickhanlonii

Differential Revision: D18217185

fbshipit-source-id: 1c569b92c92a5b991c96b0abdff6b8ed395e449f
2019-11-04 04:36:55 -08:00
Tim Yung e22946c25a Animated: Update Abstract Component Flow Type
Summary:
Updates the return type of `createAnimatedComponent` to reflect the new behavior (where we forward the ref to the internal component).

I also improved the type annotation for `Props` so that we can still enforce that only valid prop names are supplied. (We still do not check the prop values because we do not currently have a good strategy for typing the "animated versions" of those.)

Changelog:
[General] [Changed] - Flow types for Animated components now validates prop names and yields the new component instance.

Reviewed By: TheSavior

Differential Revision: D18290473

fbshipit-source-id: 8c629ab6aff009ebe6dabca1683c99a357869977
2019-11-03 18:02:00 -08:00
Tim Yung 66e72bb4e0 Animated: Forward Ref to Component
Summary:
Changes `createAnimatedComponent` so that a `ref` assigned to an Animated component will now be forwarded to the internal component. Previously, a ref to the internal component was accessed using the `getNode` method. The `getNode` method is now deprecated and will return the same `ref` but show a deprecation error.

Changelog:
[General] [Changed] - Refs on an Animated component are now the internal component. The `getNode` call has been deprecated.

Reviewed By: TheSavior

Differential Revision: D18290474

fbshipit-source-id: 5849809583a17624a89071db8be1282a12caedf3
2019-11-03 18:02:00 -08:00
Tim Yung 86d90c03eb Animated: Minor `createAnimatedComponent` Cleanup
Summary:
Some minor cleanup to `createAnimatedComponent`:

- Remove deprecated `propTypes`.
- Reorder lifecycle methods in rough order of execution.

Changelog:
[General] [Removed] - Removed `propTypes` from Animated components.

Reviewed By: TheSavior

Differential Revision: D18289773

fbshipit-source-id: f97d9ee4a2a42d210726267506de3b6b78860e8c
2019-11-03 11:59:53 -08:00
Tim Yung dcd63078bd Animated: Delete `__skipSetNativeProps_FOR_TESTS_ONLY`
Summary:
Deletes `__skipSetNativeProps_FOR_TESTS_ONLY` in favor of a `process.env_NODE_ENV` check (which will be eliminated from production builds).

Changelog:
[General] [Removed] Removed `__skipSetNativeProps_FOR_TESTS_ONLY` from Animated components.

Reviewed By: TheSavior

Differential Revision: D18289739

fbshipit-source-id: 7c1f7a29f2b88821d358227a07eec778773e418a
2019-11-03 11:59:53 -08:00
Tim Yung 25041142e5 RN: Cleanup Testing Output
Summary:
Cleans up all the Jest tests to minimize spurious console output.

Changelog:
[Internal]

Reviewed By: TheSavior

Differential Revision: D18289690

fbshipit-source-id: cdcecca879b3b85d3dccf9e0ab617ea7dc1e0777
2019-11-03 11:59:52 -08:00
Tim Yung a70987cee2 Animated: Remove `defaultProps` Parameter
Summary:
Simplifies `Animated` by removing `defaultProps` in favor of composition and a more isolated fix for scroll components.

Changelog:
[Breaking] Removed second defaultProps argument from createAnimatedComponent.

Reviewed By: TheSavior

Differential Revision: D18289648

fbshipit-source-id: 4e91c34297c3231f2bf691da74a7a624ca0b4f29
2019-11-03 11:59:52 -08:00
Tim Yung e802bd0ea9 RN: Prepare More Touchable Experiments
Summary:
Expands `TouchableWithoutFeedbackInjection` as `TouchableInjection` for use in testing out new implementations of all five `Touchable.Mixin` components.

Changelog:
[Internal]

Reviewed By: TheSavior

Differential Revision: D18278876

fbshipit-source-id: d511bdecefe38579f03a9d5ad52011f7cd71f4c0
2019-11-02 16:56:09 -07:00
Tim Yung 654d9d07c3 RN: View Type Refinement for Events
Summary:
Adds some missing props to the type definition for `View`.

Also, changed some of the callbacks to return `mixed`. (Sometime in the near future, we should align on this for event callbacks.)

Changelog:
[Changed] Revised View Event Callback Types

Reviewed By: TheSavior

Differential Revision: D18278877

fbshipit-source-id: a36d5c1c9b9aed6718bd2abb024700a08a9deaeb
2019-11-02 16:56:09 -07:00
Rick Hanlon 5a943ec235 LogBox - Fix for buttons forcing refresh on fatals
Summary:
Fixes an issue in LogBox that allowed users to try to dismiss warnings/errors when there was a fatal or syntax error up.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D18285678

fbshipit-source-id: 9d137fab63405c28b2bfa94a35c11c2f63b6d085
2019-11-01 21:42:42 -07:00
Ramanpreet Nara 38678f75b4 Fix podspecs
Summary:
I kept on running `USE_FRAMEWORKS=1 update-pods && open RNTesterPods.xcworkspace` and adding missing dependencies until `RNTesterPods` started compiling without failure.

**Note:** I made sure to only commit the podfile changes from `update-pods`, **without** `USE_FRAMEWORKS=1`.

Changelog:
[iOS][Fixed] - Fix all RN Podspecs

Reviewed By: fkgozali

Differential Revision: D18284535

fbshipit-source-id: 44d288ae0e52dd2cbbe26bebe7df73ce05644b5d
2019-11-01 19:34:46 -07:00
Rick Hanlon 62c79206ef Fast Refresh - Dismiss LogBox syntax errors
Summary:
This diff adds Fast Refresh support for dismissing LogBox syntax errors. We don't dismiss all errors because once a syntax error is fixed you'll still want to see the covered fatals, errors, and warnings.

If you actually full reload, then it falls back to the native redbox.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D18278889

fbshipit-source-id: f109ca1d6c34aa3eda6e434deca66f8ce5e02ce0
2019-11-01 16:08:49 -07:00
Rick Hanlon 0825c2b2e7 LogBox - Add syntax error handling
Summary:
This diff adds handling for syntax errors.

## Strategy
To do this we introduce a new log level type syntax, giving us these levels with semantics:
- `warn` - console warns, show collapsed, dismissible
- `error` - console errors, show collapsed, dismissible
- `fatal` - thrown exceptions, show expanded, not dismissible
- `syntax` - thrown exceptions for invalid syntax, show expanded, not dismissible

Syntax errors shows expanded, covers all other errors, and are only dismissible when the syntax error is fixed and updated with Fast Refresh. Once the syntax error is fixed, it reveals any previously covered fatals, errors, or warnings behind it

In many ways, this makes syntax errors the highest level error.

## Visuals
Syntax errors also have their own display formatting. Stack traces for syntax errors don't make sense, so we don't show them. Instead, we show the syntax error message and a code frame for the error.

The code frame is also updated so that is doesn't wrap and is horizontally scrollable, making it easier to read.

## Detecting syntax errors

To detect syntax errors we've updated `LogBoxData.addException` to call the parse function `parseLogBoxException`. This method will perform a regex on the error message to detect:

- file name
- location
- error message
- codeframe

If this regex fails for any reason to find all four parts, we'll fall back to a fatal. Over time we'll update this regex to be more robust and handle more cases we've missed.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D18278862

fbshipit-source-id: 59069aba38a27c44787e5248b2973c3a345c4a0a
2019-11-01 16:08:49 -07:00
Rick Hanlon eefece4be6 Hide stack frames when they're empty
Summary:
In the next diff we'll introduce syntax errors, which we don't show stackframes for since they don't make sense. This diff removes the Stack Frame section when there are no stack frames available.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D18278831

fbshipit-source-id: 0a6ad5c3b7fed76123b6ad3ccfc8f3f0b044bda2
2019-11-01 16:08:49 -07:00
Rick Hanlon f6b1fa3197 Add fatal handling
Summary:
This diff adds handling to fatal errors such as thrown exceptions by popping them full screen and not allowing the user to dismiss them. They say that they're "Fatal Errors" and explain that "Fatal errors require a reload".

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D18257185

fbshipit-source-id: ca051027b19c3cd2410ae59764d7b98a78f08dca
2019-11-01 16:08:48 -07:00
Samuel Susla a1c5e884ef Fix order of calls on Picker
Summary:
In previous implementation, `setNativeProps` was called before `render`. These two methods can change value of `selectedIndex` and it matters in which order they arrive in native.

This was fine in Paper because 1st selectedIndex is set from `setNativeProps` with wrong value and then correct value comes from props.

However in Fabric, 1st selectedIndex comes from props (this is the correct one), and 2nd comes from command which has the incorrect value.

changelog: [internal]

Reviewed By: TheSavior

Differential Revision: D18240118

fbshipit-source-id: dca897306d3e858b9175b2f81356c76f5a0f79e2
2019-11-01 12:11:54 -07:00
Ramanpreet Nara 7233ae4f11 Make RCTAppState TurboModule-compatible
Summary:
See title.

Changelog:
[iOS][Added] - Make RCTAppState TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D18142253

fbshipit-source-id: 5bd8afa6e3ee98f92aac3b2ebdfe63b9f7afc775
2019-11-01 12:06:21 -07:00
Ramanpreet Nara dc12676e3a Make RCTStatusBarManager TurboModule-compatible
Summary:
See title.

Changelog:
[iOS][Added] - Make RCTStatusBarManager TurboModule-compatible

Reviewed By: shergin

Differential Revision: D18130374

fbshipit-source-id: 3ec226bcff17e47ffd9eba05e32c1eb68d6135b2
2019-11-01 12:06:20 -07:00
Ramanpreet Nara a257083d2b Split NativeStatusBarManager into NativeStatusBarManager{Android,IOS}
Summary:
The `StatusBarManager` NativeModule does not have a uniform API on iOS and Android. In particular, the `setStyle` and the `setHidden` methods have an additional parameter on iOS:

```
/**
 *  - statusBarStyles can be:
 *    - 'default'
 *    - 'dark-content'
 *    - 'light-content'
 */
+setStyle: (statusBarStyle?: ?string, animated: boolean) => void;
/**
 *  - withAnimation can be: 'none' | 'fade' | 'slide'
 */
+setHidden: (hidden: boolean, withAnimation: string) => void;
```

If we keep the NativeModule spec the same between the two platforms, we'd have to keep the second parameter optional for both methods. This works for `setHidden`, because the second parameter is a string, and optional strings are allowed. However, for `setStyle`, the second parameter is a number, and we don't support optional numbers/booleans on Android in the NativeModule system. If we keep the optional number, then the following check triggers in our RedBox tests on iOS, which makes them fail: https://fburl.com/diffusion/b7adezd9.

So, since the two specs are sufficiently different, I figured that the easiest path forward is to split them apart.

Changelog:
[iOS][Changed] - Separated NativeStatusBarManager into NativeStatusBarManager{IOS,Android}

Reviewed By: PeteTheHeat

Differential Revision: D18214161

fbshipit-source-id: 6fd8b8c5f576244b5b90ee47faa7f50508c5e1d3
2019-11-01 12:06:20 -07:00
Tim Yung 548aad4ff1 RN: Delete Apple TV Props
Summary:
With tvOS (Apple TV) now residing in a separately maintained fork, this removes the residual props from React Native. This only includes the JavaScript changes. The Objective-C changes will come later.

Specifically, the following props have been removed:

- `isTVSelectable`
- `tvParallaxProperties`
- `tvParallaxShiftDistanceX`
- `tvParallaxShiftDistanceY`
- `tvParallaxTiltAngle`
- `tvParallaxMagnification`

Note that `hasTVPreferredFocus` is still being used by Android TV, so it remains.

Changelog:
[Removed] Apple TV View Props

Reviewed By: TheSavior

Differential Revision: D18266278

fbshipit-source-id: 9d1448bf2f434a74e6eb23c70d3a37971e406768
2019-11-01 08:49:26 -07:00
Tim Yung 95158ec692 RN: Export Focus / Blur / Mouse Events
Summary:
Exports these events in a canonical manner so that they can be used in future refactors.

Changelog:
[Internal]

Reviewed By: TheSavior

Differential Revision: D18257693

fbshipit-source-id: aac40277df8a88224c8df29caa04ffc9a6db0a22
2019-10-31 23:44:53 -07:00
Rick Hanlon 038353b89c LogBox - switch to array filter
Summary:
Fixes a bug for old versions of JSC that do not support `for of` syntax

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D18265611

fbshipit-source-id: 4643b6e2571c57ddd982661d188c3449f17a151e
2019-10-31 21:10:26 -07:00
Jacob Thornton a7437710d2 Fix for: You cannot blur a text-input if you tab to it. (#27038)
Summary:
I've been working on a new iOS experience with lots of text inputs and this has been driving me a bit nuts…

If you're in a scrollview with `keyboardShouldPersistTaps="handled"` and you tab through your text-inputs, you aren't able to tap outside of a given text-input to blur it (and dismiss the keyboard).

I wrote up a quick explanation and some repo steps here: https://snack.expo.io/BJBcKgrqB

The patch i came up with, after poking around for a little bit seems terrifying - so almost certainly not it. But if it's helpful at all - decided to just got ahead and submit it.

## Changelog

[iOS] [Fixed] - TextInput blur when tabbing in iOS simulator.
Pull Request resolved: https://github.com/facebook/react-native/pull/27038

Test Plan:
I tried to think of a way to test this in jest… but i didn't get very far sorry 😢

I did create a snack here so you can demo the issue: https://snack.expo.io/BJBcKgrqB

I also created two videos…

**Here's the text input not working when i try to blur it after tabbing in simulator**
![ezgif-1-dc85b405c760](https://user-images.githubusercontent.com/169705/67726290-8e5d2d00-f9a2-11e9-98c9-29c0b0bb25b9.gif)

**Here's it working after I applied this patch**
![ezgif-1-ed9f6b19653d](https://user-images.githubusercontent.com/169705/67726309-97e69500-f9a2-11e9-9992-c2a79d0bd408.gif)

Thanks!

Differential Revision: D18262867

Pulled By: TheSavior

fbshipit-source-id: 4087f3a27a7e6a146f7f84d7c6e9e8e2b6adc75d
2019-10-31 18:17:59 -07:00
Rick Hanlon a09ab64874 Don't pass through ignored warnings to console
Summary:
This diff check if warnings are ignored before calling through to the wrapped console.warn implementation below, thus preventing ignored logs from being sent to adb/metro/flipper and cleaning them up a bit.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18239936

fbshipit-source-id: 533beced3e66ad1a4d0810933862c63a0b88628c
2019-10-31 16:26:44 -07:00
Rick Hanlon 1807a6afee LogBox - Dismiss errors and warnings independently
Summary:
This diff makes the warning and error notifications independently dismissible

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18218937

fbshipit-source-id: 198b18d7f177fcb59506a4adfed5b1ce0a331aba
2019-10-31 16:26:43 -07:00
Rick Hanlon b2bafa06fa LogBox - Better error support
Summary:
This diff adds support for thrown exceptions to redboxes, and hides the native redbox when we show an error in LogBox.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18212064

fbshipit-source-id: 92031d554968bcb079f81568673ae85697c8f5ad
2019-10-31 16:26:43 -07:00
Rick Hanlon 6b783b4fb0 LogBox - Don't show native redbox for JS errors
Summary:
This diff switches the exception manager over to the reportException native module function on iOS and adds a new field `extraData.showRedbox` as a temporary hack to control hiding/showing native redboxes for LogBox.

Once LogBox is rolled out we'll remove this field, so we're hacking it into the available unused and untyped extraData bag, which will simplify gutting it in the future.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D18212047

fbshipit-source-id: f14e31d90359b7d455a73c2368ce010c28364a5c
2019-10-31 16:26:42 -07:00
Rick Hanlon 4265daa790 LogBox - Schedule logs to unblock rendering
Summary:
Currently if you land of a surface with a lot of logs, we're basically blocked until they stop. This diff schedules the log parsing in LogBox to free up the app to do other things.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D18203391

fbshipit-source-id: 35c5f03316a1106a3a48e7770d5bb59c62a3694f
2019-10-31 16:26:42 -07:00
Rick Hanlon 8524b6182d LogBox - Optimistically symbolicate
Summary:
This diff adds optimistic loading for symbolicated stack traces by so that we (almost) never show a loading state for stack traces. Because of this, we also remove the "Stack Trace" status except when it is loading or failed. Also refactored the related components to hooks 🎣

Changelog: [Internal]

Reviewed By: mmmulani

Differential Revision: D18110403

fbshipit-source-id: a93b0a63e1c9490fea73ca6ec7c5707670bdea53
2019-10-31 16:26:42 -07:00
David Vacca 67a1743e20 Enable codegen ViewConfig in production
Summary:
This diff enables the codegen ViewConfig in production, which have been running in Dev mode for 4+ months withouth any issue

Changelog: [Internal]

Reviewed By: rickhanlonii, ejanzer

Differential Revision: D18218546

fbshipit-source-id: cc74a89db1b1f8d9770a0b7dacb2fbfa6fd3a2d7
2019-10-31 12:09:04 -07:00
Eli White bb29cd92cc Partial React Sync for revisions 4eeee358e12c...2b18a13d2bf
Summary:
This sync includes the following commits:

- **[2b18a13d2](https://github.com/facebook/react/commit/2b18a13d2 )**: Revert "Dispatch commands to both UIManagers from both renderers (#17211)" (#17232) //<Eli White>//
- **[ab69a4d7e](https://github.com/facebook/react/commit/ab69a4d7e )**: Rename findHostInstance_deprecated to findHostInstance_DEPRECATED (#17228) //<Eli White>//
- **[d26ed2e42](https://github.com/facebook/react/commit/d26ed2e42 )**: Add findHostInstance_deprecated to the React Native Renderer (#17224) //<Eli White>//
- **[5ec25817c](https://github.com/facebook/react/commit/5ec25817c )**: Dispatch commands to both UIManagers from both renderers (#17211) //<Eli White>//
- **[f68f5fcee](https://github.com/facebook/react/commit/f68f5fcee )**: Update RN typings for a shim (#17138) //<Dan Abramov>//

Changelog:
[General][Changed] Partial React Sync for revisions 4eeee358e12c...2b18a13d2bf

Reviewed By: gaearon

Differential Revision: D18233299

fbshipit-source-id: 0adbc51d8a69de8b95f5efa4be011be88bc450aa
2019-10-31 12:00:55 -07:00
Eli White c5980a4b0f Move ReactNativeTypes-flowtest.js out of the Renderer folder
Summary:
The renderer folder gets replaced by react syncs but we don't want to lose this flow test. It would make sense to move this file into the React repo as it is trying to test `ReactNativeTypes.js` which lives there. However, the React repo is on Flow 0.72 which apparently doesn't catch this issue.

Changelog: [Internal]

(Note: this ignores all push blocking failures!)

Reviewed By: gaearon

Differential Revision: D18231354

fbshipit-source-id: 69f4617899c06118c74a8991f061e3bb3fdc88fb
2019-10-30 14:35:02 -07:00
Maurus Cuelenaere c2c4b43dfe Add Android support for fontVariant prop (#27006)
Summary:
Android was missing support for the `fontVariant` prop in TextViews, this PR adds that.

## Changelog

[Android] [Added] - Add Android support for fontVariant prop
Pull Request resolved: https://github.com/facebook/react-native/pull/27006

Test Plan:
Since I can't get RNTester to work locally (it crashes when loading `libyoga.so` on `No implementation found for long com.facebook.yoga.YogaNative.jni_YGConfigNew()`), I'll post some screenshots below of our app showing the difference.

We are using a slightly different [version](10cafcaa07) of this commit, since we're still on 0.60, but the gist remains the same when rebased on master.

Before:
![Screenshot_20191025-130325__01](https://user-images.githubusercontent.com/1682432/67566586-7b3f2880-f728-11e9-85c0-57667d645153.jpg)

After:
![Screenshot_20191025-130444__01](https://user-images.githubusercontent.com/1682432/67566599-842ffa00-f728-11e9-988a-1b12ee393b83.jpg)

Differential Revision: D18179642

Pulled By: mdvacca

fbshipit-source-id: 03a050aa76e7bafa0343354dfa778cf74af5abd2
2019-10-29 00:29:20 -07:00
Oleksandr Melnykov bcec1281c7 Use commands instead of setNativeProps for AndroidSwitch
Summary:
Fabric doesn't support setNativeProps, so we are using view commands instead.

Changelog: [Internal]

Reviewed By: JoshuaGross, TheSavior

Differential Revision: D17736672

fbshipit-source-id: bb0eee9330c01751829172bbc03bfd12b1e24cad
2019-10-28 17:47:03 -07:00
david dfb4f4af68 issue #18943 - SectionSeparatorComponent and ItemSeparatorComponent s… (#26933)
Summary:
SectionSeparatorComponent and ItemSeparatorComponent should displays in the correct place with an inverted list

This PR fix issue https://github.com/facebook/react-native/issues/18943
Currently, when using SectionSeparatorComponent and ItemSeparatorComponent with an inverted SectionList, the separators will display at the wrong place.
Please see issue https://github.com/facebook/react-native/issues/18943 for more information.

## Changelog
[General] [Fixed] - Fix separators displays in wrong places with the inverted list
Pull Request resolved: https://github.com/facebook/react-native/pull/26933

Test Plan:
before this fix, the following code will result in following screenshots:
```
import React from 'react';
import { StyleSheet, Text, SectionList, SafeAreaView } from 'react-native';

export default function App() {
  return (
    <SafeAreaView style={styles.container}>
      <SectionList
        style={{ width: '100%' }}
        sections={[
          {
            data: ['item 1', 'item 2', 'item 3', 'item 4', 'item 5', 'item 6', 'item 7']
          }
        ]}
        renderItem={({ item }) => <Text style={{ fontSize: 18, backgroundColor: 'greenyellow', width: '100%' }}>{item}</Text>}
        inverted
        SectionSeparatorComponent={() => <Text style={{ fontSize: 28, backgroundColor: 'fuchsia', width: '100%' }}>section separator</Text>}
        ItemSeparatorComponent={() => <Text style={{ fontSize: 12, backgroundColor: 'gold', width: '100%' }}>item separator</Text>}
        renderSectionHeader={()=><Text style={{ fontSize: 38, backgroundColor: 'lightpink', width: '100%' }}>section header</Text>}
        renderSectionFooter={()=><Text style={{ fontSize: 38, backgroundColor: 'lightpink', width: '100%' }}>section footer</Text>}
      />
    </SafeAreaView>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});
```
<img width="413" alt="螢幕快照 2019-10-21 下午12 23 36" src="https://user-images.githubusercontent.com/1477985/67176763-030df580-f3fe-11e9-938f-38939339bf5c.png">

after this fix, the separators will display in the right place
<img width="414" alt="螢幕快照 2019-10-21 下午12 23 51" src="https://user-images.githubusercontent.com/1477985/67176795-2042c400-f3fe-11e9-96f3-a8ea1cfb28a2.png">

Differential Revision: D18174225

Pulled By: cpojer

fbshipit-source-id: 30901e68f38326c69715514a09a7a5130a2332a0
2019-10-28 12:14:38 -07:00
Rick Hanlon 8cfa379503 LogBox - Update header to cycle around to begining
Summary:
This diff updates the header pagination logic so that it circles around to the beginning/end when reaching either end of the log list in the LogBox inspector.

It also changes the header message for a single log from "Logs" to "Log 1 of 1"

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18091621

fbshipit-source-id: 4d7e5e2cb0eb1a1ed09ca8ad318e6715d674648f
2019-10-28 10:10:55 -07:00
Rick Hanlon 3c525d5b17 LogBox - Display errors for notifications and inspector
Summary:
This diff adds and displays errors in LogBox. We will now toast both warnings and errors, open errors for inspection, and allow paginating through errors and warnings.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18091519

fbshipit-source-id: c155969dc505de5cfb0e95bb5a8221b9f8cfe4f7
2019-10-28 10:10:55 -07:00
Rick Hanlon c5aa26da41 Add log level to support errors
Summary:
This diff adds a level to LogBox logs so that we can store and display errors in later diffs

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18091101

fbshipit-source-id: 21661d28a7945bdcb56702e2a03ab3612c11fe35
2019-10-28 10:10:54 -07:00
Adam Ernst bdaab3c2e5 Run depslint on fb_plugin_apple_library rules
Summary: Changelog: [Internal]

Differential Revision: D18152380

fbshipit-source-id: f33f6cb2f6baeba0719a91c5189357be33a38f59
2019-10-26 13:47:15 -07:00
Kevin Gozali f15309fa15 Appearance: stop caching colorScheme in JS
Summary:
At times, the OS updates the color scheme without any active listener on RN side, e.g. if all RCTRootView's in iOS have been deallocated, no one will tell JS that the color scheme changes. So let's just always ask native side for the latest value.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D18117334

fbshipit-source-id: e8564fb284c5720061592ba72e5b4907e5b48853
2019-10-24 11:09:10 -07:00
Kacie Bawiec 85ac9cf6c7 Flow type Animated.View
Summary:
Add flow typing to `Animated.View`.

Changelog: [Internal]

Reviewed By: TheSavior

Differential Revision: D18050607

fbshipit-source-id: 454ef20715527c3c809e2fa4cfb2e1a198d6a3e0
2019-10-23 11:43:28 -07:00
Emily Janzer e7f6210d5d Don't attempt to connect to React devtools every 2s
Summary:
When testing out the NetworkOverlay, I noticed that we were creating a lot of WebSocket connections for localhost:8097. Rick found that this is because we're trying to connect to React devtools every 2 seconds: https://github.com/facebook/react/blob/master/packages/react-devtools-core/src/backend.js#L67 and it appears we create a new WebSocket every time.

Dan suggested that we use opening the dev menu as a trigger for attempting to connect to React devtools. This diff uses RCTNativeAppEventEmitter to emit an event from native when the dev menu/dialog is shown, and listening to that event in JS to attempt to connect to devtools.

I'm also making the change of passing in a websocket instead of just passing in the host + port; this way it will only attempt to connect once on each call to `connectToDevTools` (otherwise, we would attempt to reconnect every 2 seconds as soon as the dev menu is opened, and then the next time the menu is opened we'd so start that *again*, and so on - I could have it keep track of whether it's already connecting and avoid doing it again, but this is easier and should be sufficient, I think).

We should probably also update the suggested troubleshooting tips on the devtools page to reflect this change, so that people don't get confused.

Changelog: [General] [Fixed] Fix issue where we attempt to connect to React devtools every 2 seconds

Reviewed By: mmmulani

Differential Revision: D17919808

fbshipit-source-id: 4658d995c274574d22f2f54ea06d7f29ef2f54dc
2019-10-23 10:30:43 -07:00
Moti Zilberman 99d229e186 Make deepDiffer behavior with function inputs configurable, add logging
Summary: Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D17951644

fbshipit-source-id: 34bff1937a6157b049193359cb0ad346c48287a6
2019-10-23 00:58:56 -07:00
Emily Janzer c10c147bcc Fix a parameter type in NativeNetworkingAndroidSpec
Summary:
`responseType` should be a string, not an Object (which gets converted to a NativeMap by TM).

Changelog: [General] [Fixed] Fix the flow type for NativeNetworkingModule

Reviewed By: fkgozali

Differential Revision: D18019418

fbshipit-source-id: 316470ca82241223eafb5b05a54fc2bbf3074821
2019-10-22 19:34:40 -07:00
Luna Wei 6ba2769f0f Separate ScrollViewCommands
Summary: Changelog: [Internal] Move out ScrollView commands to prevent circular dependency

Reviewed By: TheSavior

Differential Revision: D18065033

fbshipit-source-id: fa4f69ec6fd565bc7b7f4bd085ed44e1289c5246
2019-10-22 19:03:43 -07:00
Luna Wei b6343408f9 Back out "Back out "Convert scrollresponder dipatches to native commands""
Summary:
Changelog: [Internal] Convert scrollTo, scrollToEnd, flashScrollIndicators to use native commands

This was reverted because of a circular dependency that was found in AMA. See D18065033 for fixing the circular dependency

Reviewed By: TheSavior

Differential Revision: D18063703

fbshipit-source-id: 7bd0125833f4f9e9e2f227732af0d6e38f009c06
2019-10-22 19:03:43 -07:00
Ramanpreet Nara 002d3c179d Retain cropData object in ImageEditingManager.cropImage
Summary:
All struct args are passed into NativeModule methods via references. If blocks access those references, we don't move those references to the heap. This means that by the time that the block accesses the struct arg, it could be freed. This can crash the program.

The solution is simple: we copy the struct arg, and access the copy in the block. This ensures that the block will make a copy, which prevents the underlying data structures from being released by the time that the block accesses the struct arg.

Changelog:
[iOS][Fixed] - Retain cropData struct arg in ImageEditingManager.cropImage call

Differential Revision: D18076026

fbshipit-source-id: 1a7bb602606ff1afac38ad5451662c82fa86f205
2019-10-22 17:16:33 -07:00
Panagiotis Vekris 94845b5783 Suppress private property accesses
Summary: Changelog: [Internal]

Reviewed By: rijn

Differential Revision: D18055795

fbshipit-source-id: c48e1b7c14dc052b9cebc48037ac745dd2890969
2019-10-22 16:55:17 -07:00
Rick Hanlon cc056907cf Clean up API for LogBoxLogParser
Summary:
This diff cleans up two functions from:

```
LogBoxLogData.add({args: ['A']});
LogBoxLogParser({args: ['A']});
```

to:

```
LogBoxLogData.add(['A']);
LogBoxLogParser.parseLog(['A']);
```

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18056462

fbshipit-source-id: be6108069fc24b1f25d1382ad31c314183c793f8
2019-10-22 14:13:20 -07:00
Rick Hanlon 41b0d0a672 LogBox - Clean up and test message substitutions
Summary:
This diff cleans up some of the message substitution logic and adds unit tests

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18056241

fbshipit-source-id: 6173961c049071ab8aeff6cd273bd3590ee21e60
2019-10-22 14:13:19 -07:00
Rick Hanlon c55aa1dd8c LogBox - Change count from grouping number to total count
Summary:
Previously we were should the count for the group (similar to how Chrome show the count on logs). This makes it difficult (impossible) to know how many logs are in the console without opening up the inspector.

This diff changes it so that the count shows the total number of warnings in the console instead.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18056028

fbshipit-source-id: c94a446708fb0885962e5c7dde75300cbedbab9b
2019-10-22 14:13:19 -07:00
Rick Hanlon fb8e6610e5 LogBox - remove ignored logs as perf improvement
Summary:
This diff improves LogBox performance by not storing and updating logs that are ignored.

Previous we stored all logs, including ignored, as a set. This was so that later, when we show a list of all logs, we would be able to show the ignored logs as well if toggled on. We stored the logs as:

```
const logs = new Set([
  {
    message: "Not ignored",
    ignored: false,
  },
  {
    message: "Ignored",
    ignored: true,
  },
  // 100s more ignored logs
]);
```

But it turns out, we can have hundreds of ignored logs within seconds in some parts of the app. This means we we're re-rendering the LogBoxContainer hundreds of times with a filter on this set to filter out the ignored logs, just to change none of the content.

Now we store as:

```
const logs = new Set([
  {
    message: "Not ignored",
  },
]);
```

Later, when we want to show ignored logs, we'll store these separately.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18055799

fbshipit-source-id: f5e21f66bb4ab6137d5d3908e8c03e119e3805d5
2019-10-22 14:13:18 -07:00
Rick Hanlon 1801dbd333 LogBox - Better detection for component stack traces
Summary:
In YellowBox we were parsing the component stack trace in a narrow set of use cases, which are commonly missed (I see this working ~50% of the time). That seems to be overly cautious. In LogBox, since there's a nice UI for component stack traces, let's be more aggressive about finding the component stack and we can address it with feedback if we find that there are real issues with this strategy in practice

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D18053389

fbshipit-source-id: 48f116e2bd3f8cc43d53d3668fd6d5b8d7cba2a4
2019-10-22 14:13:18 -07:00
Moti Zilberman 468d1a2d2e Render collapsed frames in RedBox
Summary:
Renders frames in RedBox in a greyed-out style when their `collapse` field is set to `true`. This avoids outright hiding information in the stack trace while still drawing attention to frames that are likely to be more meaningful.

Changelog: [General] [Changed] - Render collapsed JavaScript frames in RedBox

Reviewed By: rickhanlonii

Differential Revision: D18039438

fbshipit-source-id: 527588f11c0bff495842be7036cd1293bab65eb9
2019-10-22 11:05:36 -07:00
Luna Wei 76ab5062e9 Use queryCache in image
Summary:
Changelog: [iOS][internal] -  Use ImageLoader's `queryCache` in image.ios.js. See D17714521 for native definition

Background:
ImageViewManager is a ViewManager. But we are loading and calling this method as if it is a NativeModule
```
const {ImageViewManager} = NativeModules.
```

This change calls the new method on the actual native module instead of the view manager. This is consistent with the existing behavior on android.

Reviewed By: zackargyle, TheSavior

Differential Revision: D17714520

fbshipit-source-id: b67a62d880978d6b94228cbff8b7e49c54dc44cc
2019-10-22 10:36:32 -07:00
Luna Wei 0167dff209 Use prefetchImage method in Image
Summary:
Changelog: - [iOS][Internal]  Use ImageLoader's `prefetchImage` in image.ios.js. See D17714519 for native definition

Background:
ImageViewManager is a ViewManager. But we are loading and calling this method as if it is a NativeModule
```
const {ImageViewManager} = NativeModules.
```

This change calls the new method on the actual native module instead of the view manager. This is consistent with the existing behavior on android.

Reviewed By: zackargyle, TheSavior

Differential Revision: D17704732

fbshipit-source-id: 510cb8f4a5609258414d3e9d98f57b50e80305c5
2019-10-22 10:36:32 -07:00
Luna Wei 92c14f1562 Use ImageLoader for getSizeWithHeaders
Summary:
Changelog: - [iOS][Internal]  Use ImageLoader's `getSizeWithHeaders` in image.ios.js. See D17693907 for native definition

Background:
ImageViewManager is a ViewManager. But we are loading and calling this method as if it is a NativeModule
```
const {ImageViewManager} = NativeModules.
```

This change calls the new method on the actual native module instead of the view manager. This is consistent with the existing behavior on android.

Reviewed By: JoshuaGross, TheSavior

Differential Revision: D17704091

fbshipit-source-id: 916ae82fd6f302532f04c1fa590eed8cdd5f63a8
2019-10-22 10:36:32 -07:00
Luna Wei 7455ae48b3 Use ImageLoader native module
Summary:
Changelog: [Internal][iOS] Use ImageLoader's `getSize` in image.ios.js. See D17607364 for native definition

Background:
ImageViewManager is a ViewManager. But we are loading and calling this method as if it is a NativeModule
```
const {ImageViewManager} = NativeModules.
```

This change calls the new method on the actual native module instead of the view manager. This is consistent with the existing behavior on android.

Reviewed By: TheSavior

Differential Revision: D17607363

fbshipit-source-id: 771e60c54d2c311dee8647ea341a530302895a85
2019-10-22 10:36:31 -07:00
Moti Zilberman 8bc02fdd52 Remove framesToPop support from ExceptionsManager and parseErrorStack
Summary:
Removes support for the non-standard `framesToPop` error property from React Native. Redboxes will now ignore this field. The way to skip uninformative frames in stack traces going forward is to use Metro's `customizeFrame` config option, for which the React Native CLI ships useful defaults (see: https://github.com/react-native-community/cli/pull/596, https://github.com/react-native-community/cli/pull/780)

Changelog: [General] [Removed] - Remove support for framesToPop from ExceptionsManager

Reviewed By: rickhanlonii

Differential Revision: D17877444

fbshipit-source-id: 04aa332c45ad35a99ae20e05fb87b34c91a557ab
2019-10-22 04:09:49 -07:00
Rick Hanlon fa1949dd64 Add global.__reactExperimentalLogBox
Summary:
Adds a global setting to enable LogBox `global.__reactExperimentalLogBox`

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D17966004

fbshipit-source-id: 4d373b2ed12a1eed4e119ba9ebed1d090f8f3121
2019-10-21 21:08:03 -07:00
Rick Hanlon b08d972084 Add UI tests for LogBox
Summary:
Adds tests for `LogBox/UI`

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D17965863

fbshipit-source-id: ffb8c669cf5b1a9fa537f725523db80d3bc4fc77
2019-10-21 21:08:03 -07:00
Rick Hanlon c2832f2355 Add data tests for LogBox
Summary:
Adds tests for `LogBox/Data`

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D17965799

fbshipit-source-id: 708c62c1c886e65f4cc48f5fd22aaea3190f5512
2019-10-21 21:08:03 -07:00
Rick Hanlon 7d4121da02 Add LogBox for warnings
Summary:
# Overview

This diff adds the initial LogBox redesign implementing only Warnings for now. The following diffs include the tests for this, as well as a way to enable an experimental flag to opt-in.

Changelog: [Internal]

## Changes

To init LogBox, we've taken the core of YellowBox and rewritten it entirely.

Differences from Yellowbox include:
- Data model re-written
  - More performant
  - Allows a future listing of logs in order
  - Allows a future toggle to show ignored logs
  - Moves category into a property
  - Groups by the same sequential message (as chrome does) instead of by category
  - Does not store dupes of the same messages, only a count
- UI revamp
  - Color and design refresh
  - Does not spam UI with logs
  - Only shows the most recent log
  - Dismiss all button is always in one place
  - Allows navigating through all of the warnings in the list, not just ones in the same category
  - Collapses message to 5 lines (tap to expand)
  - Collapses unrelated stack frames (tap to expand)
  - Moves React stack to it's own section
  - Formats React Stack like a stack frame
  - Collapses any React frames over 3 deep (tap to expand)
  - Adds a "Meta" information (to be expanded on later)
  - De-emphasizes the source map indicator
- Better Engineering
  - Rewrote almost all components to hooks (will follow up with the rest)
  - Added more tests for Data files
  - Added testes for UI components (previously there were none)
  - Refactored some imperative render code to declarative

## Known Problems

- The first major problem is that in the collapsed state (which is meant to model the FBLogger on Comet) does not show the user how many logs are in the console (only the count of the current log).
- The way we're doing symbolication and navigation is slow. We will follow up with perf improvements
- The React Stack logic is too simple and missed cases
- We need to get properly scaled images for the close button

## What's next

Next up we'll be:
- Move over Moti's improvements to filtering and YellowBox changes since I started this
- Adding in Errors, and not using the native redbox when LogBox is available
- Adding in a list of all errors and a way to navigate to it
- Adding in Logs, so users can see console.log in the app
- Make React stack frames clickable
- And many more

Reviewed By: cpojer

Differential Revision: D17965726

fbshipit-source-id: 2f28584ecb7e3ca8d3df034ea1e1a4a50e018c02
2019-10-21 21:08:02 -07:00
Yuanzhe Bian e515947dfe Back out "Convert scrollresponder dipatches to native commands"
Summary:
Revert D17983169 since it causes instant crash on AMA

Changelog: [Internal] Revert D17983169

Differential Revision: D18054783

fbshipit-source-id: 2b0957ee266dc034336eb157a5a343d051563389
2019-10-21 19:43:05 -07:00
Panagiotis Vekris e6a9f56c04 Rename exported class instances
Summary: Changelog: [Internal]

Reviewed By: TheSavior

Differential Revision: D18041015

fbshipit-source-id: a13b6c0fa064fb47f450a9f1c5304e3b896afe31
2019-10-21 19:11:50 -07:00
Ramanpreet Nara 32b2020031 Make RCTImageEditingManager and RCTImageStoreManager TurboModule-compatible
Summary:
**Note:** The specs for these NativeModules live within FBInternal. I just made `fbsource//xplat/js:FBReactNativeSpec` depend on the internal specs.

Changelog: [iOS][Added] Make RCTImageEditingManager and RCTImageStoreManager TurboModule-compatible

Reviewed By: shergin

Differential Revision: D17969820

fbshipit-source-id: c02bdb2e6e62ead98c64c49956d58ca80449892f
2019-10-21 17:15:33 -07:00
Ramanpreet Nara c8701b6b36 Make RCTLocalAssetImageLoader and RCTGIFImageDecoder TurboModule-compatible
Summary:
Couldn't make RCTImageEditingManager and RCTImageStoreManager TurboModule-compatible because their specs live in fb-internal code. I will tackle them in a subsequent diff. See T54946472.

Changelog: [iOS][Added] Make RCTLocalAssetImageLoader and RCTGIFImageDecoder TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D17936483

fbshipit-source-id: 2266c9ea1ca7ecd52717d9a963e39245da312312
2019-10-21 17:15:33 -07:00
Ramanpreet Nara d8fda74c24 Move RCTImage NativeModules back to RCTImage
Summary:
In D16805827, I moved `RCTImageLoader`, `RCTImageStoreManager`, and `RCTImageEditingManager` to `CoreModules`. This was necessary to turn `RCTImageLoader` into a TurboModule. However, after D17671288 landed, it's no longer necessary to have OSS NativeModules in `CoreModules`. Therefore, I'm moving these NativeModules back to `RCTImage`.

Changelog: [iOS][Fixed] Move RCTImage NativeModules back to RCTImage

Reviewed By: shergin

Differential Revision: D17921612

fbshipit-source-id: 8ae36d2dc8deaf704313cbe2479bfa011ebcbfbc
2019-10-21 17:15:32 -07:00
Peter Argany 06599b3e59 Fix bug in iOS13 nested text rendering
Summary:
This fixes a bug reported by Oculus and OSS.

https://github.com/facebook/react-native/issues/26577

When rendering images nested in a `<Text/>` node, on the native side, `RCTTextShadowView` adds an empty NSTextAttachment to the attributed string to add some extra space. The image is then overlaid in the empty space  . This all works fine and dandy on iOS12 and below.

Starting in iOS13, an empty NSTextAttachment doesn't render as blank space. It renders as the "missing image" white page. When the real image is overlaid on the white page, it looks super broken. See github issue and test plan for examples.

This fix is to assign an empty image to `NSTextAttachment`. I tried seeing if there was any other attribute we could use to just add white space to an attributed string, but this seems like the best one.

Changelog: [iOS][Fixed] Fixed bug rendering nested text on iOS13

Reviewed By: xyin96

Differential Revision: D18048277

fbshipit-source-id: 711cee96934fc1937d694621a4417c152dde3a31
2019-10-21 16:31:05 -07:00
Luna Wei d61b381320 Convert scrollresponder dipatches to native commands
Summary: Changelog: [Internal] Convert scrollTo, scrollToEnd, flashScrollIndicators to use native commands

Reviewed By: TheSavior

Differential Revision: D17983169

fbshipit-source-id: 91bb3e6f0890f15717f0a8c15a8b65613856a71d
2019-10-21 11:34:55 -07:00
Rick Hanlon 42ac240bce Don't wrap console methods for metro logging in Chrome debugger (#26883)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/26883

This diff fixes an issue reported in https://github.com/facebook/react-native/issues/26788 where logs in the Chrome console were showing a different location than previous versions.

In the change here, we stop wrapping the console functions to attach the metro websocket in any environment that isn't a native app environment. We do this by checking `global.nativeLoggingHook` which is bound only by native apps and not environments like the Chrome DevTools.

Changelog: [General][Fixed] - Fix wrong lines logging in Chrome debugger

Reviewed By: cpojer, gaearon

Differential Revision: D17951707

fbshipit-source-id: f045ea9abaa8aecc6afb8eca7db9842146a3d872
2019-10-21 10:05:40 -07:00
Dan Abramov a7e5a0a3dd React sync for revisions 85d05b3...4eeee35
Summary:
This sync includes the following changes:
- **[4eeee358e](https://github.com/facebook/react/commit/4eeee358e )**: [SuspenseList] Store lastEffect before rendering (#17131) //<Sebastian Markbåge>//
- **[4fb5bf61d](https://github.com/facebook/react/commit/4fb5bf61d )**: [react-interactions] Fix focus-visible heuristic (#17124) //<Nicolas Gallagher>//
- **[8facc0537](https://github.com/facebook/react/commit/8facc0537 )**: [react-interactions] Allow event.preventDefault on LegacyPress responder (#17113) //<Dominic Gannaway>//
- **[7cec15155](https://github.com/facebook/react/commit/7cec15155 )**: Remove prefixed concurrent APIs from www build (#17108) //<Andrew Clark>//
- **[ed5f010ae](https://github.com/facebook/react/commit/ed5f010ae )**: Client render Suspense content if there's no boundary match (#16945) //<Sebastian Markbåge>//
- **[916937563](https://github.com/facebook/react/commit/916937563 )**: [react-interactions] Add onFocusWithin event to FocusWithin responder (#17115) //<Dominic Gannaway>//
- **[d7feeb25a](https://github.com/facebook/react/commit/d7feeb25a )**: unstable_createRoot -> createRoot in test (#17107) //<Andrew Clark>//
- **[6ff23f2a5](https://github.com/facebook/react/commit/6ff23f2a5 )**: Change retry priority to "Never" for dehydrated boundaries (#17105) //<Sebastian Markbåge>//
- **[3ac0eb075](https://github.com/facebook/react/commit/3ac0eb075 )**: Modify Babel React JSX Duplicate Children Fix (#17101) //<Luna Ruan>//
- **[43562455c](https://github.com/facebook/react/commit/43562455c )**: Temporary patch www fork with prefixed APIs (#17103) //<Andrew Clark>//
- **[9123c479f](https://github.com/facebook/react/commit/9123c479f )**: Enable concurrent APIs in all experimental forks (#17102) //<Andrew Clark>//
- **[30c5daf94](https://github.com/facebook/react/commit/30c5daf94 )**: Remove concurrent apis from stable (#17088) //<Andrew Clark>//
- **[4cb399a43](https://github.com/facebook/react/commit/4cb399a43 )**: [react-interactions] Modify Scope query mechanism (#17095) //<Dominic Gannaway>//
- **[e7704e22a](https://github.com/facebook/react/commit/e7704e22a )**: [babel-plugin-react-jsx] Avoid duplicate "children" key in props object (#17094) //<Dominic Gannaway>//
- **[fdba0e5ce](https://github.com/facebook/react/commit/fdba0e5ce )**: Fixed a bug with illegal invocation for Trusted Types (#17083) //<Krzysztof Kotowicz>//
- **[d364d8555](https://github.com/facebook/react/commit/d364d8555 )**: Set up experimental builds (#17071) //<Andrew Clark>//
- **[d5b54d0c3](https://github.com/facebook/react/commit/d5b54d0c3 )**: [SuspenseList] Fix bugs with dropped Promises (#17082) //<Sebastian Markbåge>//
- **[75955bf1d](https://github.com/facebook/react/commit/75955bf1d )**: Pass prod error messages directly to constructor (#17063) //<Andrew Clark>//
- **[0ac8e563d](https://github.com/facebook/react/commit/0ac8e563d )**: [react-interactions] Add getInstanceFromNode support to TestHostRenderer (#17065) //<Dominic Gannaway>//
- **[22b2642a5](https://github.com/facebook/react/commit/22b2642a5 )**: DevTools test shell tweaks (#17054) //<Brian Vaughn>//
- **[4be45be5f](https://github.com/facebook/react/commit/4be45be5f )**: Stop warning about setNativeProps being deprecated (#17045) //<Eli White>//
- **[b71ab61c8](https://github.com/facebook/react/commit/b71ab61c8 )**: [react-interactions] Adds more experimental Scope API methods (#17042) //<Dominic Gannaway>//
- **[5a71cbe7a](https://github.com/facebook/react/commit/5a71cbe7a )**: Remove unused export //<Andrew Clark>//
- **[71d012ecd](https://github.com/facebook/react/commit/71d012ecd )**: Remove dormant createBatch experiment (#17035) //<Andrew Clark>//
- **[cd1b167ad](https://github.com/facebook/react/commit/cd1b167ad )**: [Scheduler Profiler] Use microsecond precision (#17010) //<Andrew Clark>//
- **[55731fd8c](https://github.com/facebook/react/commit/55731fd8c )**: [react-interactions] Refine a11y component flow types (#17032) //<Dominic Gannaway>//
- **[a011aacaf](https://github.com/facebook/react/commit/a011aacaf )**: [react-interactions] Remove FB builds of a11y components (#17030) //<Dominic Gannaway>//
- **[fff5b1ca7](https://github.com/facebook/react/commit/fff5b1ca7 )**: [react-interactions] Add FocusTable colSpan support (#17019) //<Dominic Gannaway>//
- **[4bc52ef0d](https://github.com/facebook/react/commit/4bc52ef0d )**: Revert "update hideOrUnhideAllChildren to hide portals that aren't wrapped in a host component (#16992)" (#17011) //<Luna Ruan>//
- **[3a2b5f148](https://github.com/facebook/react/commit/3a2b5f148 )**: [Selective Hydration] ReactDOM.unstable_scheduleHydration(domNode) (#17004) //<Sebastian Markbåge>//
- **[26ba38ae4](https://github.com/facebook/react/commit/26ba38ae4 )**: [EnterLeaveEventPlugin] Fix bug when dealing with unhandled DOM nodes (#17006) //<Dominic Gannaway>//
- **[d256f88ac](https://github.com/facebook/react/commit/d256f88ac )**: Update local version numbers for 16.10.2 release //<Andrew Clark>//
- **[a8b8ffb89](https://github.com/facebook/react/commit/a8b8ffb89 )**: DevTools v4.1.3 -> v4.2.0 //<Brian Vaughn>//
- **[0545f366d](https://github.com/facebook/react/commit/0545f366d )**: Added trace updates feature (DOM only) (#16989) //<Brian Vaughn>//
- **[e09097a75](https://github.com/facebook/react/commit/e09097a75 )**: chore: upgrade to jest 24 (#15778) //<Simen Bekkhus>//
- **[5943b1da6](https://github.com/facebook/react/commit/5943b1da6 )**: Fixing grammatical errors in error message (#16973) //<Rane Wallin>//
- **[4c5698400](https://github.com/facebook/react/commit/4c5698400 )**: [react-interactions] Remove context.setTimeout & context.clearTimeout (#17000) //<Dominic Gannaway>//
- **[b33633d93](https://github.com/facebook/react/commit/b33633d93 )**: [react-interactions] Repurpose React a11y modules (#16997) //<Dominic Gannaway>//
- **[de2edc268](https://github.com/facebook/react/commit/de2edc268 )**: update hideOrUnhideAllChildren to hide portals that aren't wrapped in a host component (#16992) //<Luna Ruan>//
- **[bb680a090](https://github.com/facebook/react/commit/bb680a090 )**: [Selective Hydration] Prioritize the last continuous target (#16937) //<Sebastian Markbåge>//
- **[10277cc5b](https://github.com/facebook/react/commit/10277cc5b )**: Remove unused canonical check in fiber host component (#16914) //<Eli White>//
- **[ab1a4f249](https://github.com/facebook/react/commit/ab1a4f249 )**: Move eventSystemFlags to last argument in event plugin extractors (#16978) //<Nicolas Gallagher>//
- **[f6efb224b](https://github.com/facebook/react/commit/f6efb224b )**: [react-interactions] Tap cancels on second pointerdown (#16936) //<Nicolas Gallagher>//
- **[34457729a](https://github.com/facebook/react/commit/34457729a )**: [react-interactions] Add allowModifiers flag to FocusList + FocusTable (#16971) //<Dominic Gannaway>//
- **[b34f042e5](https://github.com/facebook/react/commit/b34f042e5 )**: Fix mouseenter handlers fired twice (#16928) //<Rango Yuan>//
- **[2c8832075](https://github.com/facebook/react/commit/2c8832075 )**: React DevTools v4.1.2 -> v.4.1.3 //<Brian Vaughn>//
- **[6c73a1e77](https://github.com/facebook/react/commit/6c73a1e77 )**: Updated DevTools CHANGELOG //<Brian Vaughn>//
- **[6a3de7a41](https://github.com/facebook/react/commit/6a3de7a41 )**: [DevTools] postMessage target origin needs to be '*' for local files (#16953) //<David Huang>//
- **[ac8e8b327](https://github.com/facebook/react/commit/ac8e8b327 )**: [react-interactions] Add tab handling to FocusList (#16958) //<Dominic Gannaway>//
- **[10c7dfe3b](https://github.com/facebook/react/commit/10c7dfe3b )**: [react-interactins] FocusTable tabScope handling+tabIndex control (#16922) //<Dominic Gannaway>//
- **[d3622d0f9](https://github.com/facebook/react/commit/d3622d0f9 )**: chore: updated comment message (#16949) //<Kirankumar Ambati>//
- **[2a264a9db](https://github.com/facebook/react/commit/2a264a9db )**: Update local version numbers for 16.10.1 release //<Andrew Clark>//
- **[d8a76ad58](https://github.com/facebook/react/commit/d8a76ad58 )**: Allow Suspense Mismatch on the Client to Silently Proceed (#16943) //<Sebastian Markbåge>//
- **[9d637844e](https://github.com/facebook/react/commit/9d637844e )**: Remove enableUserBlockingEvents flag (#16882) //<Sebastian Markbåge>//
- **[fe31cc710](https://github.com/facebook/react/commit/fe31cc710 )**: [Selective Hydration] Increase priority for non-synchronous discrete events and retries (#16935) //<Sebastian Markbåge>//
- **[b55067961](https://github.com/facebook/react/commit/b55067961 )**: Fixed typo in DevTools CHANGELOG //<Brian Vaughn>//
- **[5184346da](https://github.com/facebook/react/commit/5184346da )**: DevTools v4.1.1 -> v4.1.2 //<Brian Vaughn>//
- **[d4278663c](https://github.com/facebook/react/commit/d4278663c )**: Replaced === check with Object.is() to support values like NaN (#16934) //<Brian Vaughn>//
- **[d1121c017](https://github.com/facebook/react/commit/d1121c017 )**: [react-interactions] Fix virtual click heuristic (#16915) //<Nicolas Gallagher>//
- **[93f5f11b7](https://github.com/facebook/react/commit/93f5f11b7 )**: Update local version numbers for 16.10 release //<Andrew Clark>//
- **[c8dc7a926](https://github.com/facebook/react/commit/c8dc7a926 )**: expose isHydrating (#16909) //<Luna Ruan>//
- **[db8afe4f6](https://github.com/facebook/react/commit/db8afe4f6 )**: Add HostComponent type to ReactNative (#16898) //<Eli White>//
- **[fad510210](https://github.com/facebook/react/commit/fad510210 )**: [bugfix] Fix false positive render phase update (#16907) //<Andrew Clark>//
- **[a9cd9a765](https://github.com/facebook/react/commit/a9cd9a765 )**: DevTools v4.1.0 -> v4.1.1 //<Brian Vaughn>//
- **[b6606ecba](https://github.com/facebook/react/commit/b6606ecba )**: DevTools shows unsupported renderer version dialog (#16897) //<Brian Vaughn>//
- **[84e83db1e](https://github.com/facebook/react/commit/84e83db1e )**: Updated DevTools CHANGELOG //<Brian Vaughn>//
- **[b9811ed5b](https://github.com/facebook/react/commit/b9811ed5b )**: [react-interactions] Add wrapping support to FocusList/FocusTable (#16903) //<Dominic Gannaway>//
- **[49b0cb6db](https://github.com/facebook/react/commit/49b0cb6db )**: Moving backend injection to the content script (#16900) //<David Huang>//
- **[3694a3b5e](https://github.com/facebook/react/commit/3694a3b5e )**: Selective Hydration (#16880) //<Sebastian Markbåge>//
- **[4bb0e96b4](https://github.com/facebook/react/commit/4bb0e96b4 )**: [react-interactions] FocusTable key press bound propgataion (#16895) //<Dominic Gannaway>//
- **[fa1a32622](https://github.com/facebook/react/commit/fa1a32622 )**: Update useEditableValue hook to sync external value changes (#16878) //<Brian Vaughn>//
- **[57bf275fb](https://github.com/facebook/react/commit/57bf275fb )**: [devtools] Add support for React Scope symbol/number (#16893) //<Dominic Gannaway>//
- **[7c3bd08b3](https://github.com/facebook/react/commit/7c3bd08b3 )**: [react-interactions] Add more documentation for a11y components (#16894) //<Dominic Gannaway>//
- **[a06d181af](https://github.com/facebook/react/commit/a06d181af )**: Include tag in begin/complete invariant (#16881) //<Sebastian Markbåge>//
- **[0d8c0cd09](https://github.com/facebook/react/commit/0d8c0cd09 )**: These flags are hard coded in our internal config (#16883) //<Sebastian Markbåge>//
- **[d6d83d706](https://github.com/facebook/react/commit/d6d83d706 )**: [react-interactions] Add Portal propagation configuration (#16889) //<Dominic Gannaway>//
- **[d0ebde77f](https://github.com/facebook/react/commit/d0ebde77f )**: [react-interactions] Add initial docs explaining React Scopes (#16892) //<Dominic Gannaway>//
- **[32e5c97d1](https://github.com/facebook/react/commit/32e5c97d1 )**: [React Native] Improve errors for invalid ViewConfig getter functions (#16879) //<Joshua Gross>//
- **[ebc299fc2](https://github.com/facebook/react/commit/ebc299fc2 )**: [react-interactions] TabFocus -> FocusManager (#16874) //<Dominic Gannaway>//
- **[793f176da](https://github.com/facebook/react/commit/793f176da )**: [react-interactions] Make FocusList bundle (#16876) //<Dominic Gannaway>//
- **[68a87eee5](https://github.com/facebook/react/commit/68a87eee5 )**: [react-interactions] Add FocusList component (#16875) //<Dominic Gannaway>//
- **[18d2e0c03](https://github.com/facebook/react/commit/18d2e0c03 )**: Warning system refactoring (part 1) (#16799) //<Jessica Franco>//
- **[8b580a89d](https://github.com/facebook/react/commit/8b580a89d )**: Idle updates should not be blocked by hidden work (#16871) //<Andrew Clark>//
- **[c5e7190ed](https://github.com/facebook/react/commit/c5e7190ed )**: [react-interactions] Press with useRef instead of useState (#16870) //<Nicolas Gallagher>//
- **[911104a12](https://github.com/facebook/react/commit/911104a12 )**: DevTools CHANGELOG update //<Brian Vaughn>//
- **[bce2ac63a](https://github.com/facebook/react/commit/bce2ac63a )**: Revert change to backend injection method from PR #16752 (#16864) //<Brian Vaughn>//
- **[9b3cde9b6](https://github.com/facebook/react/commit/9b3cde9b6 )**: Fix DevTools v4.1 editable hook regression (#16867) //<Brian Vaughn>//
- **[1a6294d3e](https://github.com/facebook/react/commit/1a6294d3e )**: [react-interaction] Refactor a11y components more (#16866) //<Dominic Gannaway>//
- **[1758b3f7b](https://github.com/facebook/react/commit/1758b3f7b )**: [react-interactions] Add no-op stopPropagation + preventDefault to Press (#16868) //<Dominic Gannaway>//
- **[013b7ad11](https://github.com/facebook/react/commit/013b7ad11 )**: [suspense][error handling] Inline renderRoot and fix error handling bug (#16801) //<Andrew Clark>//
- **[0a527707c](https://github.com/facebook/react/commit/0a527707c )**: Event Replaying (#16725) //<Sebastian Markbåge>//
- **[a87d245fc](https://github.com/facebook/react/commit/a87d245fc )**: [work loop] Prevent work loop from being inlined (#16865) //<Andrew Clark>//
- **[312b462d5](https://github.com/facebook/react/commit/312b462d5 )**: [react-interactions] Improve consistency of Tap responder (#16837) //<Nicolas Gallagher>//
- **[70754f10d](https://github.com/facebook/react/commit/70754f10d )**: [react-interaction] Tweak Focus Table component (#16862) //<Dominic Gannaway>//
- **[d7f6dd5a8](https://github.com/facebook/react/commit/d7f6dd5a8 )**: [react-interactions] Fix typo in FocusTable (#16860) //<Dominic Gannaway>//
- **[cef47cbc0](https://github.com/facebook/react/commit/cef47cbc0 )**: Rename experimental react-ui => react-interactions (#16842) //<Dan Abramov>//
- **[57a5805a9](https://github.com/facebook/react/commit/57a5805a9 )**: [react-ui] Add preventDefault+stopPropagation to Keyboard + update Focus components (#16833) //<Dominic Gannaway>//
- **[08b51aa38](https://github.com/facebook/react/commit/08b51aa38 )**: Added React DevTools v4.1.0 release date to CHANGELOG //<Brian Vaughn>//
- **[b5cebedfb](https://github.com/facebook/react/commit/b5cebedfb )**: React DevTools version bump 4.0.6 -> 4.1.0 //<Brian Vaughn>//
- **[fd870e6b6](https://github.com/facebook/react/commit/fd870e6b6 )**: [react-ui/events] Tap responder API changes (#16827) //<Nicolas Gallagher>//
- **[4ddcb8e13](https://github.com/facebook/react/commit/4ddcb8e13 )**: [DevTools] Remove Welcome dialog (#16834) //<Dan Abramov>//
- **[924a30578](https://github.com/facebook/react/commit/924a30578 )**: [react-ui] Remove event object warnings (#16822) //<Dominic Gannaway>//
- **[a5df18a9e](https://github.com/facebook/react/commit/a5df18a9e )**: prevent firefox marking required textareas invalid (#16578) //<halvves>//
- **[f818af9b0](https://github.com/facebook/react/commit/f818af9b0 )**: [Fresh] Always remount classes (#16823) //<Dan Abramov>//
- **[6ecfa90eb](https://github.com/facebook/react/commit/6ecfa90eb )**: [React Native] Fix for view config registrations (#16821) //<Ricky>//
- **[18cb59050](https://github.com/facebook/react/commit/18cb59050 )**: [react-core] Do not null fiber.sibling in detachFiber (#16820) //<Dominic Gannaway>//
- **[d862f0ea5](https://github.com/facebook/react/commit/d862f0ea5 )**: Optimize objectIs (#16212) //<Kuba Juszczyk>//
- **[d1c255586](https://github.com/facebook/react/commit/d1c255586 )**: [react-devtools-shared] Added string type check for object name prop in getDisplayName function (#16798) //<Pavlo Tymchuk>//
- **[70dcdd265](https://github.com/facebook/react/commit/70dcdd265 )**: Updated pending CHANGELOG for DevTools //<Brian Vaughn>//
- **[8f1533f4d](https://github.com/facebook/react/commit/8f1533f4d )**: [react-ui] Fix bundle name [hotfix] (#16811) //<Dominic Gannaway>//
- **[7c802de79](https://github.com/facebook/react/commit/7c802de79 )**: [react-a11y] Add react-ui/accessibility to bundle build (#16804) //<Dominic Gannaway>//
- **[901139c29](https://github.com/facebook/react/commit/901139c29 )**: [scheduler][profiler] Start time of delayed tasks (#16809) //<Andrew Clark>//
- **[f40ceb001](https://github.com/facebook/react/commit/f40ceb001 )**: [react-ui] FocusGrid -> ReactFocusTable + tweaks and fixes (#16806) //<Dominic Gannaway>//
- **[2f1e8c5f7](https://github.com/facebook/react/commit/2f1e8c5f7 )**: [react-core] Clear more properties in detachFiber (#16807) //<Dominic Gannaway>//
- **[8e0c57412](https://github.com/facebook/react/commit/8e0c57412 )**: Follow-up to initial Trusted Types support (#16795) //<Dan Abramov>//
- **[3af05de1a](https://github.com/facebook/react/commit/3af05de1a )**: [react-ui] usePress from useKeyboard and useTap (#16772) //<Nicolas Gallagher>//
- **[494300b36](https://github.com/facebook/react/commit/494300b36 )**: [react-ui] Move experimental event+a11y work to react-ui package (#16794) //<Dominic Gannaway>//
- **[9691eb273](https://github.com/facebook/react/commit/9691eb273 )**: [react-events] Keyboard support for virtual clicks (#16780) //<Nicolas Gallagher>//
- **[b8d079b41](https://github.com/facebook/react/commit/b8d079b41 )**: Add trusted types to react on client side (#16157) //<Emanuel Tesař>//
- **[cdbfa5044](https://github.com/facebook/react/commit/cdbfa5044 )**: fix typo inteval -> interval & continutation -> continuation (#16760) //<Heaven>//
- **[45b6443c9](https://github.com/facebook/react/commit/45b6443c9 )**: Spelling is fundamental (#16782) //<Andrew Clark>//
- **[45898d0be](https://github.com/facebook/react/commit/45898d0be )**: [Scheduler] Prevent event log from growing unbounded (#16781) //<Andrew Clark>//
- **[87eaa90ef](https://github.com/facebook/react/commit/87eaa90ef )**: [react-events] Keyboard calls preventDefault on 'click' events (#16779) //<Nicolas Gallagher>//
- **[0c0b30b8c](https://github.com/facebook/react/commit/0c0b30b8c )**: Remove unnecessary interaction tracing ping wrapper (#16777) //<Brian Vaughn>//
- **[137ea783b](https://github.com/facebook/react/commit/137ea783b )**: Re-enable risky work loop changes (#16771) //<Andrew Clark>//
- **[d6f6b951e](https://github.com/facebook/react/commit/d6f6b951e )**: Support disabling interaction tracing for suspense promises (#16776) //<Brian Vaughn>//
- **[b4b8a349a](https://github.com/facebook/react/commit/b4b8a349a )**: [react-interactions] Add experimental FocusGrid API (#16766) //<Dominic Gannaway>//
- **[a7dabcb60](https://github.com/facebook/react/commit/a7dabcb60 )**: Revert "Re-arrange slightly to prevent refactor hazard (#16743)" (#16769) //<Andrew Clark>//
- **[4b0b556dc](https://github.com/facebook/react/commit/4b0b556dc )**: [react-interactions] Refactor TabFocusController (#16768) //<Dominic Gannaway>//
- **[fb39f6292](https://github.com/facebook/react/commit/fb39f6292 )**: Added upcoming changes to DevTools CHANGELOG //<Brian Vaughn>//
- **[ba932a5ad](https://github.com/facebook/react/commit/ba932a5ad )**: fix: inspect ClassComponent.render instead of constructor, fixes #16749 (#16759) //<Anton Korzunov>//
- **[35a202d0e](https://github.com/facebook/react/commit/35a202d0e )**: [react-events] Ensure we restore currentInstance + currentTimers (#16758) //<Dominic Gannaway>//
- **[3717c25a7](https://github.com/facebook/react/commit/3717c25a7 )**: [react-interactions] More Tab Focus control handling (#16751) //<Dominic Gannaway>//
- **[0a2215cc0](https://github.com/facebook/react/commit/0a2215cc0 )**: [Scheduler][www] Put profiling feature behind flag (#16757) //<Andrew Clark>//
- **[efa780d0a](https://github.com/facebook/react/commit/efa780d0a )**: Removed DT inject() script since it's no longer being used //<Brian Vaughn>//
- **[4290967d4](https://github.com/facebook/react/commit/4290967d4 )**: Merge branch 'tt-compat' of https://github.com/onionymous/react into onionymous-tt-compat //<Brian Vaughn>//
- **[f09854a9e](https://github.com/facebook/react/commit/f09854a9e )**: Moved inline comment. //<Brian Vaughn>//
- **[776d1c69b](https://github.com/facebook/react/commit/776d1c69b )**: Lint fixes //<Stephanie Ding>//
- **[2e75000f4](https://github.com/facebook/react/commit/2e75000f4 )**: Removed done(), added some comments explaining the change //<Stephanie Ding>//
- **[8a6cd3cd1](https://github.com/facebook/react/commit/8a6cd3cd1 )**: remove ability to inject arbitrary scripts //<Stephanie Ding>//
- **[d51f062d0](https://github.com/facebook/react/commit/d51f062d0 )**: Formatting changes //<Stephanie Ding>//
- **[85c721101](https://github.com/facebook/react/commit/85c721101 )**: Moved injection logic to content script //<Stephanie Ding>//
- **[788036c7e](https://github.com/facebook/react/commit/788036c7e )**: Moved backend injection logic to content script //<Stephanie Ding>//
- **[c93038fab](https://github.com/facebook/react/commit/c93038fab )**: Moved backend injection logic to content script //<Stephanie Ding>//
- **[3a49dff38](https://github.com/facebook/react/commit/3a49dff38 )**: [react-events] Use context.objectAssign in Tap responder (#16748) //<Dominic Gannaway>//
- **[56114a4b2](https://github.com/facebook/react/commit/56114a4b2 )**: Change `trackedTouchCount` console.error to warn (#16750) //<Matt Kane>//
- **[ae724be7b](https://github.com/facebook/react/commit/ae724be7b )**: [react-interactions] Add TabFocusContainer and TabbableScope UI components (#16732) //<Dominic Gannaway>//
- **[ab4951fc0](https://github.com/facebook/react/commit/ab4951fc0 )**: Re-arrange slightly to prevent refactor hazard (#16743) //<Andrew Clark>//
- **[b0a8a3e04](https://github.com/facebook/react/commit/b0a8a3e04 )**: Mark root as already hydrated after committing (#16739) //<Sebastian Markbåge>//
- **[e04f4259c](https://github.com/facebook/react/commit/e04f4259c )**: Handle SuspenseListComponent getting retried (#16745) //<Sebastian Markbåge>//
- **[2c98af77c](https://github.com/facebook/react/commit/2c98af77c )**: DevTools: Props editing interface tweaks (#16740) //<Brian Vaughn>//
- **[2ce5801c2](https://github.com/facebook/react/commit/2ce5801c2 )**: Added upcoming changes to DevTools CHANGELOG //<Brian Vaughn>//
- **[709baf1fe](https://github.com/facebook/react/commit/709baf1fe )**: [DevTools] Support for adding props | Improved state/props value editing  (#16700) //<Hristo Kanchev>//
- **[4ef6387d6](https://github.com/facebook/react/commit/4ef6387d6 )**: [DevTools] [Context] Legacy Context (#16617) //<Hristo Kanchev>//
- **[c317fc273](https://github.com/facebook/react/commit/c317fc273 )**: Correct link for troubleshooting react-dev-tools (#16690) (#16708) //<Liad Yosef>//
- **[41a78cd85](https://github.com/facebook/react/commit/41a78cd85 )**: [react-events] Tap: add maximumDistance prop (#16689) //<Nicolas Gallagher>//
- **[240040078](https://github.com/facebook/react/commit/240040078 )**: react-refresh@0.4.2 //<Dan Abramov>//
- **[ba6bb0fcc](https://github.com/facebook/react/commit/ba6bb0fcc )**: [Fresh] Hash signatures (#16738) //<Dan Abramov>//
- **[fd3e8cb0a](https://github.com/facebook/react/commit/fd3e8cb0a )**: [react-events] Remove stopPropagation (Press) + use document for delegation (#16730) //<Dominic Gannaway>//
- **[38c03ce00](https://github.com/facebook/react/commit/38c03ce00 )**: Fix typo in commet (#16727) //<Heaven>//
- **[4905590e1](https://github.com/facebook/react/commit/4905590e1 )**: Fixed font family issue in FF. (#16701) //<Hristo Kanchev>//
- **[35f447ddb](https://github.com/facebook/react/commit/35f447ddb )**: Remove console.log from copyWithSet (#16716) //<Daniel Lo Nigro>//
- **[440cbf2ee](https://github.com/facebook/react/commit/440cbf2ee )**: Let's schedule the passive effects even earlier (#16714) //<Sebastian Markbåge>//
- **[cc2492ccf](https://github.com/facebook/react/commit/cc2492ccf )**: Schedule passive callbacks before layout effects are invoked (#16713) //<Sebastian Markbåge>//
- **[031eba789](https://github.com/facebook/react/commit/031eba789 )**: [react-events] Tap: change order of events (#16694) //<Nicolas Gallagher>//
- **[f26fe8c0a](https://github.com/facebook/react/commit/f26fe8c0a )**: [react-events] Keyboard: fix callback return types (#16693) //<Nicolas Gallagher>//
- **[9444c876d](https://github.com/facebook/react/commit/9444c876d )**: Remove wrong copy-paste code in test (#16695) //<Heaven>//
- **[b260bef39](https://github.com/facebook/react/commit/b260bef39 )**: [Fresh] Add skipEnvCheck option to Babel plugin (#16688) //<Dan Abramov>//
- **[2f1588185](https://github.com/facebook/react/commit/2f1588185 )**: react-refresh@0.4.1 //<Dan Abramov>//
- **[9044bb0fa](https://github.com/facebook/react/commit/9044bb0fa )**: [Fresh] Fix a crash with implicit arrow return (#16687) //<Dan Abramov>//
- **[21d79ce04](https://github.com/facebook/react/commit/21d79ce04 )**: Add FreshRuntime WWW bundle, remove ESLint (#16684) //<Dan Abramov>//
- **[206d61f72](https://github.com/facebook/react/commit/206d61f72 )**: fix typos on react-devtools comments (#16681) //<Alex Rohleder>//
- **[61836fba2](https://github.com/facebook/react/commit/61836fba2 )**: Fix typo: wnless -> unless (#16680) //<Heaven>//
- **[e11bf42ce](https://github.com/facebook/react/commit/e11bf42ce )**: Check for Suspense boundary in a root Container (#16673) //<Sebastian Markbåge>//
- **[962dfc2c3](https://github.com/facebook/react/commit/962dfc2c3 )**: Remove experimental scheduler flags (#16672) //<Dan Abramov>//
- **[ff006451a](https://github.com/facebook/react/commit/ff006451a )**: [react-events] Fix isTargetWithinNode type (#16671) //<Nicolas Gallagher>//
- **[040ca0fad](https://github.com/facebook/react/commit/040ca0fad )**: Enable MessageLoop implementation by default (#16408) //<Dan Abramov>//
- **[d96f478f8](https://github.com/facebook/react/commit/d96f478f8 )**: use-subscription tearing fix (#16623) //<Brian Vaughn>//
- **[79e46b677](https://github.com/facebook/react/commit/79e46b677 )**: updated flags from false to dicated on www (#16647) //<Luna Ruan>//
- **[8d7c733f1](https://github.com/facebook/react/commit/8d7c733f1 )**: [Partial Hydration] Don't invoke listeners on parent of dehydrated event target (#16591) //<Sebastian Markbåge>//
- **[9ce8711d5](https://github.com/facebook/react/commit/9ce8711d5 )**: [react-events] Tap responder (#16628) //<Nicolas Gallagher>//
- **[e86146e71](https://github.com/facebook/react/commit/e86146e71 )**: [react-events] Refine executeUserEventHandler (#16662) //<Dominic Gannaway>//
- **[c66edb9f8](https://github.com/facebook/react/commit/c66edb9f8 )**: [react-events] Refactor getCurrentTarget to getResponderNode (#16660) //<Dominic Gannaway>//
- **[9ff60ff16](https://github.com/facebook/react/commit/9ff60ff16 )**: [react-events] Fix Scope listener issue (#16658) //<Dominic Gannaway>//
- **[7126a37bf](https://github.com/facebook/react/commit/7126a37bf )**: [react-events] Keyboard responder propagation handling (#16657) //<Dominic Gannaway>//
- **[539640d89](https://github.com/facebook/react/commit/539640d89 )**: [react-events] Various core tweaks for event responder system (#16654) //<Dominic Gannaway>//
- **[af032764a](https://github.com/facebook/react/commit/af032764a )**: [react-events] Adds preventKeys support to Keyboard responder (#16642) //<Dominic Gannaway>//
- **[f705e2bac](https://github.com/facebook/react/commit/f705e2bac )**: Updated pending CHANGELOG for DevTools //<Brian Vaughn>//
- **[77bb10239](https://github.com/facebook/react/commit/77bb10239 )**: [DevTools] [Profiler]: Save profile now working in Firefox (#16612) //<Hristo Kanchev>//
- **[92f094d86](https://github.com/facebook/react/commit/92f094d86 )**: fix typo: oncurrent - concurrent (#16633) //<Heaven>//
- **[46f912fd5](https://github.com/facebook/react/commit/46f912fd5 )**: [react-core] Add more support for experimental React Scope API (#16621) //<Dominic Gannaway>//
- **[f962feb88](https://github.com/facebook/react/commit/f962feb88 )**: Updated extensions build-from-source instructions in README //<Brian Vaughn>//
- **[4e544cffe](https://github.com/facebook/react/commit/4e544cffe )**: [react-events] Split out mixed event responder tests (#16608) //<Dominic Gannaway>//
- **[f61138e06](https://github.com/facebook/react/commit/f61138e06 )**: Use renderToStaticMarkup for tests (#16516) //<Gerald Monaco>//
- **[980112b14](https://github.com/facebook/react/commit/980112b14 )**: rephrase comment (#16559) //<James George>//
- **[8a7c2e50f](https://github.com/facebook/react/commit/8a7c2e50f )**: Remove duplicate character in regex group (#16572) //<Bas Peeters>//
- **[557d472fe](https://github.com/facebook/react/commit/557d472fe )**: add <thead>, <tfoot> to table > tr warning (#16535) //<Tom Quirk>//
- **[bd79be9b6](https://github.com/facebook/react/commit/bd79be9b6 )**: [react-core] Add experimental React Scope component API (#16587) //<Dominic Gannaway>//
- **[996acf903](https://github.com/facebook/react/commit/996acf903 )**: Updated DevTools extension build script to work when run remotely (#16603) //<Brian Vaughn>//
- **[34aaec6f9](https://github.com/facebook/react/commit/34aaec6f9 )**: [react-events] Ensure screen reader virtual clicks support preventDefault (#16600) //<Dominic Gannaway>//
- **[01fb68b9b](https://github.com/facebook/react/commit/01fb68b9b )**: Don't ignore dependencies for render phase update (#16574) //<Dan Abramov>//
- **[b034ac6d3](https://github.com/facebook/react/commit/b034ac6d3 )**: Merge branch 'master' into devtools-v4-merge //<Brian Vaughn>//
- **[f51253775](https://github.com/facebook/react/commit/f51253775 )**: Babel Transform JSX to React.jsx/React.jsxDEV Plugin (#16432) //<Luna Ruan>//
- **[cb15f18dc](https://github.com/facebook/react/commit/cb15f18dc )**: [react-events] Improve mock event object accuracy (#16590) //<Nicolas Gallagher>//
- **[bc8b15332](https://github.com/facebook/react/commit/bc8b15332 )**: Updated README docs, example screenshots, etc //<Brian Vaughn>//
- **[7153dd516](https://github.com/facebook/react/commit/7153dd516 )**: Fixed a StyleEditor variable resolution regression //<Brian Vaughn>//
- **[33d439f8f](https://github.com/facebook/react/commit/33d439f8f )**: Merge branch 'master' into devtools-v4-merge //<Brian Vaughn>//
- **[4ef269606](https://github.com/facebook/react/commit/4ef269606 )**: [react-events] Support screen reader virtual clicks (#16584) //<Dominic Gannaway>//
- **[fb316787c](https://github.com/facebook/react/commit/fb316787c )**: Removed unused Chrome Flow types //<Brian Vaughn>//
- **[8e1434e80](https://github.com/facebook/react/commit/8e1434e80 )**: Added FB copyright header //<Brian Vaughn>//
- **[49b0f87d1](https://github.com/facebook/react/commit/49b0f87d1 )**: Suppress act/renderer warning for DevTools tests //<Brian Vaughn>//
- **[8c684bf7e](https://github.com/facebook/react/commit/8c684bf7e )**: Removed forked DevTools Flow types //<Brian Vaughn>//
- **[9a016c0c2](https://github.com/facebook/react/commit/9a016c0c2 )**: Removed outdated snapshot //<Brian Vaughn>//
- **[896c993ad](https://github.com/facebook/react/commit/896c993ad )**: Fixed remaining DevTools broken tests by fixing a hydration/spread bug //<Brian Vaughn>//
- **[e3cc42be9](https://github.com/facebook/react/commit/e3cc42be9 )**: Fix Console patching test by resetting modules //<Brian Vaughn>//
- **[177f357d9](https://github.com/facebook/react/commit/177f357d9 )**: Updated DevTools test setup to no longer mock test renerer //<Brian Vaughn>//
- **[a48593a8d](https://github.com/facebook/react/commit/a48593a8d )**: Iterating on DevTools tests: Trying to run tests against pre-build react-dom and react-test-renderers //<Brian Vaughn>//
- **[ee4806f47](https://github.com/facebook/react/commit/ee4806f47 )**: Fixed flushing problem with tests //<Brian Vaughn>//
- **[9d4fd7a24](https://github.com/facebook/react/commit/9d4fd7a24 )**: Merged changes from 4.0.5 -> 4.0.6 from DevTools fork //<Brian Vaughn>//
- **[a39d9c3df](https://github.com/facebook/react/commit/a39d9c3df )**: 4.0.5 -> 4.0.6 //<Brian Vaughn>//
- **[84b492f34](https://github.com/facebook/react/commit/84b492f34 )**: Polyfill Symbol usage //<Brian Vaughn>//
- **[c00a92064](https://github.com/facebook/react/commit/c00a92064 )**: Merge branch 'master' into devtools-v4-merge //<Brian Vaughn>//
- **[0da7bd060](https://github.com/facebook/react/commit/0da7bd060 )**: React DevTools CHANGELOG entry for 4.0.6 //<Brian Vaughn>//
- **[fc8077207](https://github.com/facebook/react/commit/fc8077207 )**: [react-events] Ensure updateEventListeners updates in commit phase (#16540) //<Dominic Gannaway>//
- **[0f6e3cd61](https://github.com/facebook/react/commit/0f6e3cd61 )**: [Scheduler] Profiler Features (second try) (#16542) //<Dan Abramov>//
- **[474b650ca](https://github.com/facebook/react/commit/474b650ca )**: [react-events] Rename hook exports (#16533) //<Nicolas Gallagher>//
- **[2f03aa6ee](https://github.com/facebook/react/commit/2f03aa6ee )**: [react-events] Fix middle-click for Press (#16546) //<Nicolas Gallagher>//
- **[16c340863](https://github.com/facebook/react/commit/16c340863 )**: Only warn in case the fourth argument is a function (#16543) //<Bruno Scopelliti>//
- **[05f5192e8](https://github.com/facebook/react/commit/05f5192e8 )**: [Partial Hydration] Dispatching events should not work until hydration commits (#16532) //<Sebastian Markbåge>//
- **[8a01b50fc](https://github.com/facebook/react/commit/8a01b50fc )**: eslint-plugin-react-hooks@2.0.1 //<Dan Abramov>//
- **[3ed289b3b](https://github.com/facebook/react/commit/3ed289b3b )**: Clear canceled task node early (#16403) //<Dan Abramov>//
- **[067282905](https://github.com/facebook/react/commit/067282905 )**: Bump ESLint plugin to 2.0 (#16528) //<Dan Abramov>//
- **[2559111c2](https://github.com/facebook/react/commit/2559111c2 )**: [react-events] Rely on 'buttons' rather than 'button' (#16479) //<Nicolas Gallagher>//
- **[c433fbb59](https://github.com/facebook/react/commit/c433fbb59 )**: Revert "Revert "[ESLint] Forbid top-level use*() calls (#16455)"" (#16525) //<Dan Abramov>//
- **[507f0fb37](https://github.com/facebook/react/commit/507f0fb37 )**: Revert "[ESLint] Forbid top-level use*() calls (#16455)" (#16522) //<Sunil Pai>//
- **[66c9fedc3](https://github.com/facebook/react/commit/66c9fedc3 )**: Flow fixes //<Brian Vaughn>//
- **[2e549efae](https://github.com/facebook/react/commit/2e549efae )**: Moved DevTools custom Flow definitions //<Brian Vaughn>//
- **[4da836af7](https://github.com/facebook/react/commit/4da836af7 )**: Merged changes from 4.0.0 -> 4.0.5 from DevTools fork //<Brian Vaughn>//
- **[5441b094a](https://github.com/facebook/react/commit/5441b094a )**: 4.0.4 -> 4.0.5 //<Brian Vaughn>//
- **[d2456c757](https://github.com/facebook/react/commit/d2456c757 )**: Fixed standalone target not properly serving backend over localhost:8097 //<Brian Vaughn>//
- **[3c6a21946](https://github.com/facebook/react/commit/3c6a21946 )**: 4.0.3 -> 4.0.4 //<Brian Vaughn>//
- **[95ca07955](https://github.com/facebook/react/commit/95ca07955 )**: Fixed standalone bug that prevented backend from being served over localhost:8097 //<Brian Vaughn>//
- **[95ffd3ccf](https://github.com/facebook/react/commit/95ffd3ccf )**: 4.0.2 -> 4.0.3 //<Brian Vaughn>//
- **[2bcc6c6d0](https://github.com/facebook/react/commit/2bcc6c6d0 )**: 4.0.1 -> 4.0.2 //<Brian Vaughn>//
- **[c100cc7b3](https://github.com/facebook/react/commit/c100cc7b3 )**: 4.0.0 -> 4.0.1 //<Brian Vaughn>//
- **[0763c48ed](https://github.com/facebook/react/commit/0763c48ed )**: Bumped all versions to 4.0.0 //<Brian Vaughn>//
- **[732f3a6ef](https://github.com/facebook/react/commit/732f3a6ef )**: 4.0.0-alpha.9 -> 4.0.0-alpha.10 //<Brian Vaughn>//
- **[db9e5c971](https://github.com/facebook/react/commit/db9e5c971 )**: Updated all GitHub links to point to React repo //<Brian Vaughn>//
- **[833f20634](https://github.com/facebook/react/commit/833f20634 )**: Merge branch 'master' into devtools-v4-merge //<Brian Vaughn>//
- **[efa5dbe7a](https://github.com/facebook/react/commit/efa5dbe7a )**: Update CHANGELOG.md (#16439) //<bbolek>//
- **[da0a47bec](https://github.com/facebook/react/commit/da0a47bec )**: fix typo in CHNAGELOG.md (#16447) //<Heaven>//
- **[69aafbf4d](https://github.com/facebook/react/commit/69aafbf4d )**: Fix spelling in react-devtools CHANGELOG.md (#16448) //<Morgan McCauley>//
- **[c80678c76](https://github.com/facebook/react/commit/c80678c76 )**: Add "hydrationOptions" behind the enableSuspenseCallback flag (#16434) //<Sebastian Markbåge>//
- **[2d68bd096](https://github.com/facebook/react/commit/2d68bd096 )**: Fix message loop behavior when host callback is cancelled (#16407) //<Dan Abramov>//
- **[96eb703bb](https://github.com/facebook/react/commit/96eb703bb )**: [ESLint] Forbid top-level use*() calls (#16455) //<Dan Abramov>//
- **[56f93a7f3](https://github.com/facebook/react/commit/56f93a7f3 )**: Throw on unhandled SSR suspending (#16460) //<Dan Abramov>//
- **[dce430ad9](https://github.com/facebook/react/commit/dce430ad9 )**: [Flare] Rework the responder dispatching/batching mechanism (#16334) //<Dominic Gannaway>//
- **[6ae6a7c02](https://github.com/facebook/react/commit/6ae6a7c02 )**: Updated React DevTools changelog for 4.0.5 //<Brian Vaughn>//
- **[56d1b0fb5](https://github.com/facebook/react/commit/56d1b0fb5 )**: [react-events] DOM event testing library (#16433) //<Nicolas Gallagher>//
- **[e89c19d16](https://github.com/facebook/react/commit/e89c19d16 )**: Added DevTools 4.0.4 CHANGELOG entry //<Brian Vaughn>//
- **[d97af798d](https://github.com/facebook/react/commit/d97af798d )**: Updated DevTools CHANLOGE to add an unreleased change //<Brian Vaughn>//
- **[21e793fb4](https://github.com/facebook/react/commit/21e793fb4 )**: Added 4.0.1, 4.0.2, and 4.0.3 changelog entries (#16438) //<Brian Vaughn>//
- **[c1d3f7f1a](https://github.com/facebook/react/commit/c1d3f7f1a )**: [DevTools Changelog] Add a note on 4.0.2 //<Dan Abramov>//
- **[6f86294e6](https://github.com/facebook/react/commit/6f86294e6 )**: [DevTools Changelog] Add a note about restoring selection (#16409) //<Dan Abramov>//
- **[600c57a9b](https://github.com/facebook/react/commit/600c57a9b )**: Added OVERVIEW.md and updated CHANGELOG to point to it (#16405) //<Brian Vaughn>//
- **[9b5985b3c](https://github.com/facebook/react/commit/9b5985b3c )**: Added release date to DevTools CHANGELOG //<Brian Vaughn>//
- **[ebd1f5ddb](https://github.com/facebook/react/commit/ebd1f5ddb )**: [react-events] Press: improve test coverage (#16397) //<Nicolas Gallagher>//
- **[85fbe3be3](https://github.com/facebook/react/commit/85fbe3be3 )**: Merge branch 'master' into devtools-v4-merge //<Brian Vaughn>//
- **[a9304e79d](https://github.com/facebook/react/commit/a9304e79d )**: Add DevTools package placeholder package.json //<Brian Vaughn>//
- **[6edff8f5e](https://github.com/facebook/react/commit/6edff8f5e )**: Added CHANGELOG and READMEs for DevTools v4 NPM packages (#16404) //<Brian Vaughn>//
- **[7ce229d3b](https://github.com/facebook/react/commit/7ce229d3b )**: Made some incremental progress on Jest tests //<Brian Vaughn>//
- **[41db902ed](https://github.com/facebook/react/commit/41db902ed )**: Removed unused __TEST__ files //<Brian Vaughn>//
- **[a473dca59](https://github.com/facebook/react/commit/a473dca59 )**: Merge branch 'master' into devtools-v4-merge //<Brian Vaughn>//
- **[4ba141230](https://github.com/facebook/react/commit/4ba141230 )**: Revert "[Scheduler] Profiling features (#16145)" (#16392) //<Dan Abramov>//
- **[407816725](https://github.com/facebook/react/commit/407816725 )**: Removed (no longer necessary) node->node-events mapping //<Brian Vaughn>//
- **[d7ca8847f](https://github.com/facebook/react/commit/d7ca8847f )**: Add build-info.json to package files array for non-private DT packages //<Brian Vaughn>//
- **[39209dc5b](https://github.com/facebook/react/commit/39209dc5b )**: Update react-devtools-inline to embed react-debug-tools since it's not published yet //<Brian Vaughn>//
- **[45dff31a7](https://github.com/facebook/react/commit/45dff31a7 )**: Patched up react-devtools-core Webpack configs //<Brian Vaughn>//
- **[58b39c60d](https://github.com/facebook/react/commit/58b39c60d )**: Fixed web extensions //<Brian Vaughn>//
- **[30b8ef375](https://github.com/facebook/react/commit/30b8ef375 )**: Iterated on Webpack configs until I got the inline and shell packages seemingly working //<Brian Vaughn>//
- **[44e410900](https://github.com/facebook/react/commit/44e410900 )**: Merged master (with events -> legacy-events package rename) //<Brian Vaughn>//
- **[b1a03dfdc](https://github.com/facebook/react/commit/b1a03dfdc )**: Rename legacy "events" package to "legacy-events" (#16388) //<Brian Vaughn>//
- **[9e64bf18e](https://github.com/facebook/react/commit/9e64bf18e )**: [eslint-plugin-react-hooks] Fixed crash when referencing arguments in arrow functions. (#16356) //<Hristo Kanchev>//
- **[e308a037b](https://github.com/facebook/react/commit/e308a037b )**: chore: make tests compatible with Jest 24 (#15779) //<Simen Bekkhus>//
- **[5fa99b5aa](https://github.com/facebook/react/commit/5fa99b5aa )**: chore: add eslint-plugin-jest's valid-expect rule (#16332) //<Simen Bekkhus>//
- **[a34ca7bce](https://github.com/facebook/react/commit/a34ca7bce )**: [Scheduler] Profiling features (#16145) //<Andrew Clark>//
- **[56636353d](https://github.com/facebook/react/commit/56636353d )**: Partial support for React.lazy() in server renderer. (#16383) //<Lee Byron>//
- **[6fbe63054](https://github.com/facebook/react/commit/6fbe63054 )**: [Partial Hydration] Attempt hydration at a higher pri first if props/context changes (#16352) //<Sebastian Markbåge>//
- **[e0a521b02](https://github.com/facebook/react/commit/e0a521b02 )**: Make component stack last argument for deprecation warnings (#16384) //<Dan Abramov>//
- **[1fd3906e9](https://github.com/facebook/react/commit/1fd3906e9 )**: Remove "Waiting for async callback" User Timing measurement (#16379) //<Dan Abramov>//
- **[89bbffed6](https://github.com/facebook/react/commit/89bbffed6 )**: Cleanup Babel PR (ReactFreshPlugin) (#16340) //<lunaruan>//
- **[441d014ce](https://github.com/facebook/react/commit/441d014ce )**: Cleaned up some extnesions build script stuff //<Brian Vaughn>//
- **[380da5fcc](https://github.com/facebook/react/commit/380da5fcc )**: Moved OVERVIEW //<Brian Vaughn>//
- **[b73e293cc](https://github.com/facebook/react/commit/b73e293cc )**: Moved CHANGELOG //<Brian Vaughn>//
- **[ac2e861fb](https://github.com/facebook/react/commit/ac2e861fb )**: Fixed a bunch of Lint issues //<Brian Vaughn>//
- **[51626ae2f](https://github.com/facebook/react/commit/51626ae2f )**: Prettier //<Brian Vaughn>//
- **[f7afe1b86](https://github.com/facebook/react/commit/f7afe1b86 )**: Moved shell fixture into packages/react-devtools-shell //<Brian Vaughn>//
- **[183f96f2a](https://github.com/facebook/react/commit/183f96f2a )**: Prettier //<Brian Vaughn>//
- **[edc46d7be](https://github.com/facebook/react/commit/edc46d7be )**: Misc Flow and import fixes //<Brian Vaughn>//
- **[08743b1a8](https://github.com/facebook/react/commit/08743b1a8 )**: Reorganized folders into packages/* //<Brian Vaughn>//
- **[ec7ef50e8](https://github.com/facebook/react/commit/ec7ef50e8 )**: Reorganized things again into packages //<Brian Vaughn>//
- **[65b93cd16](https://github.com/facebook/react/commit/65b93cd16 )**: Merge remote-tracking branch 'devtools-merge/master' into devtools-v4-merge //<Brian Vaughn>//
- **[6eb04b2b1](https://github.com/facebook/react/commit/6eb04b2b1 )**: 4.0.0-alpha.8 -> 4.0.0-alpha.9 //<Brian Vaughn>//
- **[8001b6432](https://github.com/facebook/react/commit/8001b6432 )**: Fixed raw-loader + Jest problem //<Brian Vaughn>//
- **[2eb3f4e9b](https://github.com/facebook/react/commit/2eb3f4e9b )**: README typofix //<Brian Vaughn>//
- **[2015a39c2](https://github.com/facebook/react/commit/2015a39c2 )**: 4.0.0-alpha.7 -> 4.0.0-alpha.8 //<Brian Vaughn>//
- **[e015e3d93](https://github.com/facebook/react/commit/e015e3d93 )**: Added not about sync/batched root API being required //<Brian Vaughn>//
- **[baac1dcc5](https://github.com/facebook/react/commit/baac1dcc5 )**: Inline package tweaks: * Ignore messages from the DevTools browser extension. * Cleanup/clarify README //<Brian Vaughn>//
- **[dc8580e64](https://github.com/facebook/react/commit/dc8580e64 )**: New NPM package react-devtools-inline (#363) //<Brian Vaughn>//
- **[db8542ad9](https://github.com/facebook/react/commit/db8542ad9 )**: Refactor inspect/select logic so that $r contains hooks data (#364) //<Brian Vaughn>//
- **[62e5fd57a](https://github.com/facebook/react/commit/62e5fd57a )**: NPM package versions 4.0.0-alpha.5 -> 4.0.0-alpha.6 //<Brian Vaughn>//
- **[4f8b7864e](https://github.com/facebook/react/commit/4f8b7864e )**: Add "Welcome to the new DevTools" notification //<Brian Vaughn>//
- **[3b2905b69](https://github.com/facebook/react/commit/3b2905b69 )**: NPM package versions 4.0.0-alpha.4 -> 4.0.0-alpha.5 //<Brian Vaughn>//
- **[7385de9fc](https://github.com/facebook/react/commit/7385de9fc )**: react-devtools-core standalone bugfix: prevent electron crash //<Brian Vaughn>//
- **[76c67399d](https://github.com/facebook/react/commit/76c67399d )**: Re-enabled packages backend build to be production mode (whoops) //<Brian Vaughn>//
- **[050cb8452](https://github.com/facebook/react/commit/050cb8452 )**: 4.0.0-alpha.3 -> 4.0.0-alpha.4 //<Brian Vaughn>//
- **[1e8aa8105](https://github.com/facebook/react/commit/1e8aa8105 )**: Re-enable "view source" button for standalone shell //<Brian Vaughn>//
- **[c7aff5503](https://github.com/facebook/react/commit/c7aff5503 )**: 4.0.0-alpha.2 -> 4.0.0-alpha.3 //<Brian Vaughn>//
- **[9a05e0b60](https://github.com/facebook/react/commit/9a05e0b60 )**: Disable view-source button in standalone mode if no project roots are provided //<Brian Vaughn>//
- **[56b001761](https://github.com/facebook/react/commit/56b001761 )**: 4.0.0-alpha.1 -> 4.0.0-alpha.2 //<Brian Vaughn>//
- **[f74c89b14](https://github.com/facebook/react/commit/f74c89b14 )**: Misc improvements based on user feedback from Tim //<Brian Vaughn>//
- **[ffb19346c](https://github.com/facebook/react/commit/ffb19346c )**: NPM packages 4.0.0-alpha.0 -> 4.0.0-alpha.1 //<Brian Vaughn>//
- **[4b34a77d2](https://github.com/facebook/react/commit/4b34a77d2 )**: Improve Bridge Flow types (#352) //<Brian Vaughn>//
- **[39ad101ea](https://github.com/facebook/react/commit/39ad101ea )**: Removed reference to setDefaultThemeName() method //<Brian Vaughn>//
- **[167daf7a4](https://github.com/facebook/react/commit/167daf7a4 )**: Updating NPM packages as 4.0.0-alpha.0 //<Brian Vaughn>//
- **[249a2e043](https://github.com/facebook/react/commit/249a2e043 )**: Detect React Native v3 backend and show warning //<Brian Vaughn>//
- **[cb3fb4212](https://github.com/facebook/react/commit/cb3fb4212 )**: Patch console to append component stacks (#348) //<Brian Vaughn>//
- **[0f2fb5bad](https://github.com/facebook/react/commit/0f2fb5bad )**: Standalone NPM packages and React Native support (#335) //<Brian Vaughn>//
- **[21d6395a1](https://github.com/facebook/react/commit/21d6395a1 )**: Add test case for #16359 (#16371) //<Andrew Clark>//
- **[a29adc9f6](https://github.com/facebook/react/commit/a29adc9f6 )**: Dehydrated suspense boundaries in suspense list (#16369) //<Sebastian Markbåge>//
- **[50addf4c0](https://github.com/facebook/react/commit/50addf4c0 )**: Refactor Partial Hydration (#16346) //<Sebastian Markbåge>//
- **[c2034716a](https://github.com/facebook/react/commit/c2034716a )**: Fix typo in error code map (#16373) //<Andrew Clark>//
- **[62b04cfa7](https://github.com/facebook/react/commit/62b04cfa7 )**: Remove unused import //<Andrew Clark>//
- **[3eeb64551](https://github.com/facebook/react/commit/3eeb64551 )**: Remove flag that reverts #15650 (#16372) //<Andrew Clark>//
- **[2716d91ec](https://github.com/facebook/react/commit/2716d91ec )**: Reset didReceiveUpdate in beginWork (#16359) //<Sebastian Markbåge>//
- **[9449f8bf3](https://github.com/facebook/react/commit/9449f8bf3 )**: [react-events] Fix keyboard responder test (#16368) //<Nicolas Gallagher>//
- **[107521a95](https://github.com/facebook/react/commit/107521a95 )**: [react-events] Focus/FocusWithin responders with fallbacks (#16343) //<Nicolas Gallagher>//
- **[7a7e792a6](https://github.com/facebook/react/commit/7a7e792a6 )**: Make SchedulerMinHeap flow strict (#16351) //<Desmond Brand>//
- **[e349da19b](https://github.com/facebook/react/commit/e349da19b )**: [Scheduler] Temporarily remove wrapper function (#16345) //<Andrew Clark>//
- **[0bd0c5269](https://github.com/facebook/react/commit/0bd0c5269 )**: Upgrade ESLint so we can use JSX Fragment syntax (#16328) //<Andrew Clark>//
- **[07d062dea](https://github.com/facebook/react/commit/07d062dea )**: Mark spawned work for client-rendered suspense boundary (#16341) //<Sebastian Markbåge>//
- **[07a02fb80](https://github.com/facebook/react/commit/07a02fb80 )**: [react-events] Refactor unit tests for Hover (#16320) //<Nicolas Gallagher>//
- **[f62b53d90](https://github.com/facebook/react/commit/f62b53d90 )**: fix some missing assertions (#16336) //<Sunil Pai>//
- **[b9faa3b09](https://github.com/facebook/react/commit/b9faa3b09 )**: [act] remove obsolete container element (#16312) //<Sunil Pai>//
- **[66a474227](https://github.com/facebook/react/commit/66a474227 )**: use a different link in the UNSAFE_ component warnings (#16321) //<Sunil Pai>//
- **[8d5403877](https://github.com/facebook/react/commit/8d5403877 )**: Add use-subscription to Rollup bundle config (#16326) //<Brian Vaughn>//
- **[b12a98206](https://github.com/facebook/react/commit/b12a98206 )**: Babel 7 (#16297) //<lunaruan>//
- **[d77c6232d](https://github.com/facebook/react/commit/d77c6232d )**: [Scheduler] Store Tasks on a Min Binary Heap (#16245) //<Andrew Clark>//
- **[95767acf8](https://github.com/facebook/react/commit/95767acf8 )**: Bump deps in packages/**/package.json (#16325) //<Andrew Clark>//
- **[6536973a0](https://github.com/facebook/react/commit/6536973a0 )**: Prepare use-subscription v1 for publishing (#16324) //<Brian Vaughn>//

Changelog:
[General][Changed] - React sync for revisions 85d05b3...4eeee35

Reviewed By: TheSavior

Differential Revision: D18008433

fbshipit-source-id: 3b528bb5019d84c69e4dda4f836e852a4f263ba4
2019-10-21 07:36:10 -07:00
Tim Yung 72890965f3 RN: Create `TouchableWithoutFeedback.unstable_Experiment`
Summary:
Creates `TouchableWithoutFeedback.unstable_Experiment` for use to experiment with alternate implementations.

Changelog:
[Internal]

Reviewed By: TheSavior

Differential Revision: D18027430

fbshipit-source-id: 74b90da3398618dced2279cdbad8e05dafdc1919
2019-10-19 09:51:49 -07:00
Tim Yung b15473fec4 RN: Cleanup `TouchableWithoutFeedback` Flow Types
Summary:
Cleans up the Flow types for `TouchableWithoutFeedback`.

This required converting `TVEventHandler` into a class so that Flow understands it is a instantiable type.

Changelog:
[Internal]

Reviewed By: TheSavior

Differential Revision: D18029290

fbshipit-source-id: 7855f3286020c1a1fe8b72c0303cd6b0b3389fd2
2019-10-19 09:51:49 -07:00
Matias Alvin 36672c3851 Fix Switch component accessibility role (#26899)
Summary:
`accessibilityRole` communicates the purpose of a component to the user of assistive technology. It needs to have the correct value for it to be fully utilized.

Switch component has `accessibilityRole` of a `button` instead of `switch` on default. Change the component default role to `switch`.

## Changelog

[General] [Fixed] - Change default `accessibilityRole` of Switch component from `button` to `switch`
Pull Request resolved: https://github.com/facebook/react-native/pull/26899

Test Plan:
- All unit test passed
- On Switch component, it's supposed to have `switch` like element type on both platform. (`XCUIElementTypeSwitch` on iOS)

fix [https://github.com/facebook/react-native/issues/26873](https://github.com/facebook/react-native/issues/26873)

Reviewed By: yungsters

Differential Revision: D18002755

Pulled By: mdvacca

fbshipit-source-id: 60446f94b23f8355f954805fb4dc08c89d08e492
2019-10-18 22:14:35 -07:00
Eli White 48f367da91 Checkbox: remove cast through any
Summary:
$title

Changelog:
[Internal]

Reviewed By: JoshuaGross

Differential Revision: D17934095

fbshipit-source-id: 9447680dea6bdd3576164d624c9231a0f77f5c2a
2019-10-18 16:15:37 -07:00
Eli White 84915a2d68 Make SafeAreView flow strict-local
Summary:
The forwardRef calls were able to be cleaned up and consolidated a bit.

Changelog:
[Changed][SafeAreaView] Improved SafeAreaView's typing, removing extra underscore from display name

Reviewed By: cpojer

Differential Revision: D17881901

fbshipit-source-id: 00f876d34600f4cfd44075eb7ad7192c9a885907
2019-10-18 14:50:59 -07:00
Eli White f12c0e7eb0 Delete WindowedListView
Summary:
This is an experimental component that is not exported from React Native. It is one of the last direct users of ScrollResponder keeping us from being able to refactor and improve the typing of ScrollResponder and ScrollView.

Changelog:
[Remove] Remove experimental WindowedListView

Reviewed By: yungsters

Differential Revision: D17989714

fbshipit-source-id: ff098100458f638b99be8ab1a29371ab788f424e
2019-10-18 14:45:19 -07:00
generatedunixname89002005287564 9ce3588f1e Daily `arc lint --take BUCKFORMAT`
Reviewed By: zertosh

Differential Revision: D17978944

fbshipit-source-id: 9c9d4d6e6abe49005558d52b47a5a3b38cbb6d92
2019-10-17 12:16:15 -07:00
Mehdi Mulani a7d55c9a2a Explicitly set RCTWebSocketModule's methodQueue
Summary:
@public
It seems no one was setting this. Also couldn't find the RCTBlobModule.

Changelog: [iOS] [Fixed] - Set RCTWebSocketModule's methodQueue

Reviewed By: fkgozali

Differential Revision: D17964367

fbshipit-source-id: b2e2bde31dce4a35ff60163c5a31c3d64fcd9024
2019-10-17 11:59:11 -07:00
Ramanpreet Nara 791931454e Make RCTNativeAnimatedModule TurboModule-compatible
Summary:
**Note:** I had to relax the `AnimatedNodeConfig` and `AnimatingNodeConfig` flow types, because they didn't have all the properties. I created a task to improve the flow types.

Changelog: [iOS][Added] Make RCTNativeAnimatedMoudle TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D17692715

fbshipit-source-id: ab3680c30ca3d5b1eb866ef1104587cae695ad15
2019-10-16 19:00:26 -07:00
David Vacca a4ebd87a81 Fix TM SoundManager not found in iOS apps
Summary:
This diff fixes an error affecting of loading of Ads Manager iOS app

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D17958919

fbshipit-source-id: d87f169954d891ee2fcb1143f1985ea3811b949c
2019-10-16 14:51:24 -07:00
Emily Janzer f2f4d33a3a Remove unsupported flow types from OSS native module specs
Summary:
Some of our NativeModule type specs aren't compatible with our Android codegen and type safety checks - specifically, we don't support `$ReadOnly` in our type checks, and we don't support map types in the codegen. Removing these from a couple of the OSS type specs so we can enable codegen for these modules (eventually).

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D17882093

fbshipit-source-id: 6e8669e4be775347199b2b5346bd8d40d7620886
2019-10-16 11:14:04 -07:00
Andres Suarez aee88b6843 Tidy up license headers [3/n]
Summary: Changelog: [General] [Fixed] - License header cleanup

Reviewed By: yungsters

Differential Revision: D17952693

fbshipit-source-id: 8fcb8e58a2e04e7a3169f4d525bffc00835768e6
2019-10-16 10:06:34 -07:00
Andres Suarez 3b31e69e28 Tidy up license headers [2/n]
Summary: Changelog: [General] [Fixed] - License header cleanup

Reviewed By: yungsters

Differential Revision: D17952694

fbshipit-source-id: 17c87de7ebb271fa2ac8d00af72a4d1addef8bd0
2019-10-16 10:06:34 -07:00
Andres Suarez 722feeb02b Tidy up license headers [1/n]
Summary: Changelog: [General] [Fixed] - License header cleanup

Reviewed By: yungsters

Differential Revision: D17952695

fbshipit-source-id: 81aa607612ba1357ef7814ef20371335151afe7e
2019-10-16 10:06:33 -07:00
Dan Abramov 4ed05ca241 Send early logs to Metro too
Summary:
If you `console.log` early enough in the initialization sequence, it won't get sent to Metro because `hmrClient` isn't initialized yet. I've added a rolling array to catch at most 100 of those, and send them after we initialize.

Changelog: [General] [Fixed] - Early logs don't get dropped by Metro now

Reviewed By: cpojer

Differential Revision: D17952097

fbshipit-source-id: 964b4735a6a7c3ccd115f44151139d718bf5b26d
2019-10-16 08:03:21 -07:00
Samuel Susla d4b032d6f8 Fix missing RCTEventEmitter module when scrolling in scrollView
Summary:
`ReactNative.js` as a side effect registers `RCTEventEmitter`, this is required in Fabric's `RCTScrollViewComponentView`.
Here we force ReactNative.js side effect.

This is needed as a temporary workaround so we can invoke events on `RCTEventEmitter` (old architecture) from `RCTScrollViewComponentView` (new architecture)

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D17931469

fbshipit-source-id: 3efa453ba199bb1685403201ad444238750a3d14
2019-10-16 04:01:48 -07:00
Andres Suarez e1cfeaddd4 Move non-license comments out of license header
Summary: Changelog: [General] [Fixed] - License header cleanup

Reviewed By: cpojer

Differential Revision: D17749100

fbshipit-source-id: edca9c73a065e9fc311109cd6efeb1f75451a55a
2019-10-15 20:12:12 -07:00
David Vacca ff03698f20 Use SoundManager in Pressability and Touchable
Summary:
This diff replaces the usage of UIManagerModule.playTouchSound() in Pressability and Touchable for the SoundManager.playTouchSound()
Previously landed and unladed: D16543433

Changelog: This diff replaces the usage of UIManagerModule.playTouchSound() in Pressability and Touchable for the SoundManager.playTouchSound()

Reviewed By: makovkastar

Differential Revision: D17926309

fbshipit-source-id: ff7e318a4d720e489cbfe60e8d72ebb749c11c18
2019-10-15 20:03:21 -07:00
Janette Cheng 10cc834567 Use fbandroid_labels and fbobjc_labels in xplat targets
Summary:
`xplat` targets add different deps based on what platform the target is being built for.

for anything using `fb_xplat`, we can put all ios supermodules in `fbobjc_labels` and all android sms in `fbandroid_labels`

There's some weirdness with python targets like `thrift_gen` in  `/xplat/mobileconfig/tools/generator/gen-py/BUCK` that don't have platform-specific labels because the except_for list for `fbandroid` doesn't need the `fbsource//` prefix (see changes in `/ios/isolation/infra.mobileconfig.sm`)

Changelog: [Internal]

Reviewed By: shergin, joshleibsly

Differential Revision: D17884952

fbshipit-source-id: e245364cf515b75682990094d24f789d53b1f3f5
2019-10-15 19:32:27 -07:00
Ramanpreet Nara da6274ba76 Make RCTAlertManager TurboModule-compatible
Summary:
**Note:** This was landed in D17722913, but reverted in D17855088. The revert had nothing to do with this NativeModule.

Changelog: [iOS][Added] Make RCTAlertManager TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D17917827

fbshipit-source-id: d86ea2cddddd9535d656709296c74aebd6f45793
2019-10-15 09:16:56 -07:00
Valentin Shergin beae6d6fa0 Revert D17456225: [RN] RCTRefreshControl was renamed to PullToRefreshView (for Paper)
Differential Revision:
D17456225

Original commit changeset: a8db99ddd507

fbshipit-source-id: 3186d76de13cccc21619702a1ad07842a4788b15
2019-10-15 07:11:53 -07:00
Valentin Shergin 08d6cb19c4 RCTRefreshControl was renamed to PullToRefreshView (for Paper)
Summary:
The component RCTRefreshControl was renamed to PullToRefreshView (for Paper). Now only old Objective-C class names have the old name, which is okay.

Changelog: [Internal] [Changed] - The internal name of PullToRefresh component was changed from `RCTRefreshControl` to `PullToRefreshView` (No public API changes)

Reviewed By: rickhanlonii

Differential Revision: D17456225

fbshipit-source-id: a8db99ddd507377d8c98b26707a3b9fae483d20c
2019-10-14 20:49:48 -07:00
Eli White 878f0500e7 TextInput: Add tests for checking which input is focused
Summary:
We are going to need to change some of these APIs to use refs instead of findNodeHandle. I figured I'd start by adding some tests

Changelog:
[Internal] Adding tests for TextInput

Reviewed By: yungsters

Differential Revision: D17892806

fbshipit-source-id: f59ff99fa4d064239f171acb64a8441e07bb71c1
2019-10-14 14:40:07 -07:00
Eli White e640637928 Core: Remove `any` from calls to requireNativeComponent
Summary:
These were being cast to a NativeComponent but that is no longer accurate. `requireNativeComponent` returns the type of `HostComponent` now which is more accurate. We don't need the cast through `any` anymore.

In order to know that I found all the callsites, I ran this command to find these:
```
grep -r "requireNativeComponent" react-native-github -C 5 | grep 'any'
```

Changelog:
[Internal]

Reviewed By: cpojer

Differential Revision: D17864165

fbshipit-source-id: 3774d6d47d7bb0d885cc1a1352f81fec7d3bca0d
2019-10-14 13:53:48 -07:00
Moti Zilberman 9f71551167 Remove use of framesToPop from JSTimers
Summary:
Replaces the use of `framesToPop` in `_allocateCallback` (in `__DEV__` only) with statically accessing the second frame of the stack.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D17877261

fbshipit-source-id: 8e4d0eb2ed7984b66a99752fb21f7909474fda8f
2019-10-14 09:03:51 -07:00
Tim Yung 6c7d34e8ec RN: Delete `merge[Into]`
Summary:
Deletes `merge[Into]` in favor of object spread.

Changelog:
[Internal]

Reviewed By: TheSavior

Differential Revision: D17884312

fbshipit-source-id: e70b4d4e388d3c6a68908258019bf2bd145e6752
2019-10-12 15:52:27 -07:00
Tim Yung 3a3b535874 RN: Delete `getObjectValues`
Summary:
Deletes `getObjectValues` because there are no more references to it in `react-native`.

Changelog:
[Internal]

Reviewed By: TheSavior

Differential Revision: D17884311

fbshipit-source-id: c97caeed00fe94a6cc099fba7039d9defee719dd
2019-10-12 15:52:26 -07:00