Commit Graph

4281 Commits

Author SHA1 Message Date
Janic Duplessis 40bcc38d91 Support the `Slow Animations` option of the iOS simulator (#21157)
Summary:
RN animations currently ignore the `Slow Animations` option on the iOS simulator because we don't use UIKit animations directly. This uses a private api to get the slow coefficient and use it in the native animated driver. We only compile the private api code on simulator so this won't cause issues for app store approval. One possible issue is that the api changes in new iOS versions but I think it's reasonable to do this.

Note that this won't work with JS driven animations, we could expose the slow coefficient as a constant and use that in JS but I decided not to implement it.
Pull Request resolved: https://github.com/facebook/react-native/pull/21157

Differential Revision: D9980306

Pulled By: sahrens

fbshipit-source-id: bdbce2e469261a75cb4b9a251e8e8f212bb9c4e7
2018-09-20 16:18:03 -07:00
Tim Yung d7b34dd38d RN: Ignore StyleSheetValidation if Profiling
Summary: Removes `StyleSheetValidation` when profiling because it creates noise and looks pretty expensive.

Reviewed By: TheSavior

Differential Revision: D9890117

fbshipit-source-id: cc1b8d4e4bc40be2333f09321892317bc841aae0
2018-09-19 16:27:23 -07:00
James Reggio 9733b92f3d Add `onScrollToTop` to ScrollView for iOS (#21204)
Summary:
This PR exposes the `onScrollToTop` event on iOS using the same event-forwarding infrastructure as other ScrollView events. (As such, its `nativeEvent` object reflects the same fields as other ScrollView events.)

Motivation:
----------

If your app is only interested in knowing the position of a ScrollView after a scroll has completed, it can use `onScrollEndDrag` and `onMomentumScrollEnd` to inspect the `contentOffset` after a drag-initiated scroll has finished. (This is much less expensive than observing the `onScroll` event if you only want to know the end position.) However, neither of these `End` events fire if the ScrollView is scrolled to the top by tapping the status bar.

By exposing `onScrollToTop`, it is now possible for an app to cheaply know when such a scroll has completed.
Pull Request resolved: https://github.com/facebook/react-native/pull/21204

Differential Revision: D9943618

Pulled By: hramos

fbshipit-source-id: ac5ee42b7f12d94655ffda617f8f811138da7f6f
2018-09-19 11:17:30 -07:00
Thibault Malbranche ea124a044c Remove extra WKWebView file not used (#21182)
Summary:
This file was created recently but is not used as the WKWebview was integrated directly into the Webview.ios.js

Removing this file to clarify the situation
Pull Request resolved: https://github.com/facebook/react-native/pull/21182

Differential Revision: D9942905

Pulled By: hramos

fbshipit-source-id: 19e9fba94280428edd1deab4a54f8c5dc42a6bfa
2018-09-19 10:09:00 -07:00
Janic Duplessis 2191eecf54 Fix InputAccessoryView safe area when not attached to a TextInput (#21179)
Summary:
When using an InputAccessoryView attached to a TextInput the safe area insets are not applied properly. This uses different autolayout constraints that works in all cases I tested, roughly based on the technique used here https://github.com/stockx/SafeAreaInputAccessoryViewWrapperView/blob/master/SafeAreaInputAccessoryViewWrapperView/Classes/SafeAreaInputAccessoryViewWrapperView.swift#L38.
Pull Request resolved: https://github.com/facebook/react-native/pull/21179

Differential Revision: D9928503

Pulled By: hramos

fbshipit-source-id: b1b623334558093042fd94ac85e1b52dd16aa1a0
2018-09-18 18:31:51 -07:00
Janic Duplessis a0f7d6090f Fix warning in InputAccessoryView (#21174)
Summary:
Currently the warning is always triggered, even on iOS. This simply adds a platform check and tweak the message.
Pull Request resolved: https://github.com/facebook/react-native/pull/21174

Differential Revision: D9929679

Pulled By: hramos

fbshipit-source-id: 383f4a820cf5bf261dbfdcff3b950f9812a65e00
2018-09-18 18:31:51 -07:00
Rafael Oleza c58fb3b73a Remove some automocks from tests
Summary:
They are bad :D

And they affect us when trying to migrate to the babel runtime helpers

Reviewed By: pvdz

Differential Revision: D9829462

fbshipit-source-id: 15240a56e707e13775d57714646e4960cfe202df
2018-09-18 04:18:11 -07:00
Riley Dulin 85505fdd3e Fix map polyfill to use a deterministic key for the hash
Summary:
Prepack does not understand how to use a random key as an object property. Instead, at build time, it generates a deterministic property name based on a deterministic seed for `Math.random()`.

Prepack would like to move away from this, and keep all the `Math.random()` unevaluated and left in the bundle.

Since this is the only usage of `Math.random()` that can't be handled by the abstract interpreter, it should be changed.

Note that the randomness is not required here at all, it just has to be *some* unique key.

Reviewed By: davidaurelio

Differential Revision: D9882757

fbshipit-source-id: 21c213db9716d2faeb8745d811a620b088a83781
2018-09-17 15:02:24 -07:00
Jun Wu e82a2178af Optimize gitignores
Summary:
Use `tools/scm/optimize-gitignore.py` to optimize gitignores in fbcode,
fbandroid, and fbobjc, by moving rules to subdirectories.

Reviewed By: phillco

Differential Revision: D9660076

fbshipit-source-id: 3321ebaafb93e387a11fab000ba9e80afc88b210
2018-09-15 09:01:59 -07:00
Chris Williams 644fc57fad Add iOS 12 textContentType options (#21079)
Summary:
Adding the new `textContentType` options from iOS 12. `newPassword` helps the OS know to put a password field into the keychain, and `oneTimeCode` hints that the field will take input from an SMS one time code.
Pull Request resolved: https://github.com/facebook/react-native/pull/21079

Differential Revision: D9813328

Pulled By: TheSavior

fbshipit-source-id: d2c04b41121b32f185af38ea4c642924e261a043
2018-09-13 14:48:05 -07:00
Marc Horowitz 7f1fcb67e5 Improve the bridge params validator, and its invariant string
Summary:
NaN is not handled consistently by the bridge in all cases,
so detect it and complain.  In order to make the complaint more
obvious, use JSON.stringify on the value, and a replacer so that some
of the censoring which normally takes place doesn't get in the way of
clarity.

Reviewed By: mmmulani

Differential Revision: D9779799

fbshipit-source-id: 6c1a6bfe05ecaa3aeb558acc49dfd54461e1ba74
2018-09-12 19:10:16 -07:00
Emily Janzer ab97b9f602 Fix dev-only redbox in polyfillfunctions
Summary: Fixes a redbox about setting both the accessor and the value for an object. It looks like it's actually coming from PolyfillFunctions, where we set the value as well as spreading in the object descriptor for modules in DEV.

Reviewed By: yungsters

Differential Revision: D9792991

fbshipit-source-id: a2fa5d1820c5eddfd8244722771e76de62f89976
2018-09-12 16:32:50 -07:00
Karan Thakkar 36199d3dda fix RCTNetInfo first time connection status (#20820)
Summary:
Fixes #20804, #8615, https://github.com/facebook/react-native/issues/18368#issuecomment-400610022
Pull Request resolved: https://github.com/facebook/react-native/pull/20820

Differential Revision: D9798488

Pulled By: hramos

fbshipit-source-id: bd93a857b622edfbefdbd1baea746f27658f1366
2018-09-12 14:01:50 -07:00
Yue Xu 2b1d8cc54b Add js engine information in React Native error reporting
Summary:
To avoid "js engine: ..." appearing everywhere, only add this information
to the error message when react native is reporting errors to the server.

Reviewed By: yungsters

Differential Revision: D9754371

fbshipit-source-id: a8001480c75ccf93c953c79f26470df678871cb3
2018-09-12 14:01:50 -07:00
Logan Daniels 6e980a826e Back out "Change ImageBackground to work with percentage image sizes"
Summary:
Original commit changeset: cec3802d30b7

See my comment on original diff: D9307123

The diff regresses ImageBackground in some cases, so I'm reverting until we can re-work the diff to handle existing usages in an expected way.

Differential Revision: D9790698

fbshipit-source-id: 23ad670e004980f22bd1413eca3692f51beff717
2018-09-12 12:31:52 -07:00
David Vacca 0c576ef84a Expose AllowFileAccess property in WebView
Summary: This diff adds a new property in ReactWebView to be able to configure allowFileAccess

Reviewed By: achen1

Differential Revision: D9789466

fbshipit-source-id: 39d042ac6ef69e44f006a4c4b0c2dd900f84dbc9
2018-09-12 11:49:20 -07:00
Valentin Shergin 454aa02210 SafeAreaView: A new prop `emulateUnlessSupported` that turns off the custom implementation of `safeAreaInsets` insets
Summary: In some cases, the custom implementation of this prop is undesirable, so this allows to turn it off.

Reviewed By: yungsters

Differential Revision: D9759228

fbshipit-source-id: 4f61cd900c2da9046977c11a61606a4f5f961177
2018-09-11 21:19:18 -07:00
Tim Yung d6b9ec1c1f YellowBox: Allow Retrying Symbolication
Summary: When symbolication fails, allow retrying without having to reload the current JS VM.

Reviewed By: ejanzer

Differential Revision: D9760666

fbshipit-source-id: 63837c81fe77a9b0b897a858e3d64bc7dcf2c3bd
2018-09-11 20:47:03 -07:00
Tim Yung 5e6e5e92ca YellowBox: Use Feather Icons for Navigation
Summary: Changes YellowBox to use feather icons for the left and right navigation so that we are not dependent on the system's (sometimes funky) unicode icons.

Reviewed By: ejanzer

Differential Revision: D9759134

fbshipit-source-id: b957c24afdccc04bfe78ae4750777c387c2acef4
2018-09-11 20:47:03 -07:00
Héctor Ramos 1151c096da Update copyright headers to yearless format
Summary: This change drops the year from the copyright headers and the LICENSE file.

Reviewed By: yungsters

Differential Revision: D9727774

fbshipit-source-id: df4fc1e4390733fe774b1a160dd41b4a3d83302a
2018-09-11 15:33:07 -07:00
lukedurrant eef8d47a37 Correct RCTAnimation import (#18050)
Summary:
Fixing error
node_modules/react-native/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h:12:9: 'RCTAnimation/RCTValueAnimatedNode.h' file not found

I'm integrating react native into an existing app through cocoa pods and similar to other PRs
PR https://github.com/facebook/react-native/pull/16192
PR https://github.com/facebook/react-native/pull/16271
PR https://github.com/facebook/react-native/pull/17764
When integrating with cocoa pods
```
pod 'React', :path => './node_modules/react-native', :subspecs => [
    'Core',
    'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
    'RCTText',
    'RCTNetwork',
    'RCTWebSocket', # needed for debugging
    'RCTImage',
    'RCTWebSocket',
    'BatchedBridge',
    'RCTLinkingIOS',
    'RCTActionSheet',
    'RCTAnimation'
    ]
```
With `RCTAnimation` being the important part for this PR.

Also note without this PR and the other PR's above if anyone is trying to integrate react native into an existing app i.e. through cocoa pods they won't be able too. I think the latest working version is

My app wouldn't build without changing this line

PR https://github.com/facebook/react-native/pull/16192
PR https://github.com/facebook/react-native/pull/16271
PR https://github.com/facebook/react-native/pull/17764

 [IOS] [BREAKING] [PODS] - Fixed RCTAnimation import for integrating with cocoapods
Pull Request resolved: https://github.com/facebook/react-native/pull/18050

Differential Revision: D9235162

Pulled By: hramos

fbshipit-source-id: 426daccf8d8952658e262d5a0e4623c72c38542c
2018-09-11 13:32:20 -07:00
Mehdi Mulani adaeba296e Fix buildStyleInterpolator
Summary: This relied on NaN being turned into null (through JSON.stringify), which would then be handled by Yoga gracefully. But in some cases we do not call JSON.stringify and thus pass NaN directly to Yoga causing a problem.

Reviewed By: fkgozali

Differential Revision: D9764488

fbshipit-source-id: 021c9ffafba8f9bcef2476756a12df33c367bcb1
2018-09-11 11:31:53 -07:00
Kody Greenbaum 159adfb826 Adding Missing Optional Fields to ScrollEvent Type
Summary: Adding Velocity and targetContentOffset Fields to Scroll Event Type

Reviewed By: yungsters

Differential Revision: D9731754

fbshipit-source-id: e4ad89d66d0bb4344c717cf2d94027c54d346375
2018-09-11 10:22:39 -07:00
magicien 2307ea60d0 Fix #18272 TextInput.setNativeProps({text: ''}) to work (#18278)
Summary:
Fix #18272. Calling textInputRef.setNativeProps({text: ''}) or textInputRef.clear() should clear the text input.

- All tests of `yarn run test` are passed
- Test with [the sample app](https://github.com/magicien/react-native-textinput-clear).
    - TextInput.clear() and TextInput.setNativeProps({ text: '***' }) worked
    - When clear() or setNativeProps() called, onChange/onChangeText wasn't called
        - Same behavior as react 0.53.0
    - When non-string values are given to `setNativeProps({text: ___})`, its behavior is the same as react 0.53.0.
        - Value Type | Result
          ---------- | ------------
          null       | same as empty string ''
          undefined  | nothing changes
          number     | throw error
          function   | throw error
          object     | throw error
    - When clear() or setNativeProps() called, attributed text keeps the attributes
    - When `value` prop is set, the text can't be changed

- `clear()` doesn't work from the second time
- `setNativeProps({text '***'})` doesn't work from the second time
- Even when `value` prop is set, you can change the text

![ScreenShot_0.54.0](https://raw.githubusercontent.com/magicien/react-native-textinput-clear/master/screenshot/0.54.0_test.gif)

- `clear()` works every time
- `setNativeProps({text '****'})` works every time

![ScreenShot_Clear_1](https://raw.githubusercontent.com/magicien/react-native-textinput-clear/master/screenshot/clear_test_1.gif)

![ScreenShot_Clear_2](https://raw.githubusercontent.com/magicien/react-native-textinput-clear/master/screenshot/clear_test_2.gif)

- The text keeps the attributes (font family, size, color, text align)

![ScreenShot_Slider](https://raw.githubusercontent.com/magicien/react-native-textinput-clear/master/screenshot/attributed_text_test.gif)

- If `value` prop is set, the text should not be changed

![ScreenShot_Value](https://raw.githubusercontent.com/magicien/react-native-textinput-clear/master/screenshot/value_test.gif)

[IOS] [BUGFIX] [TextInput] - Fix TextInput.clear() and TextInput.setNativeProps({text: ''}) to work
Pull Request resolved: https://github.com/facebook/react-native/pull/18278

Reviewed By: shergin

Differential Revision: D9692561

Pulled By: hramos

fbshipit-source-id: b7ce8f6740fdf666e71d6a85743331ca4805edcb
2018-09-10 17:49:27 -07:00
Tim Yung 672528ffde React sync for revisions bc1ea9c...ade5e69
Summary:
This sync includes the following changes:
- **[ade5e6928](https://github.com/facebook/react/commit/ade5e6928)**: Manually update schedule dep in react-native-renderer (#13609) //<Brian Vaughn>//
- **[f260b14a8](https://github.com/facebook/react/commit/f260b14a8)**: Fix host bailout for the persistent mode (#13611) //<Dan Abramov>//
- **[4a40d7624](https://github.com/facebook/react/commit/4a40d7624)**: Fix a regression related to isReactComponent prototype check (#13608) //<Dan Abramov>//
- **[03ab1efeb](https://github.com/facebook/react/commit/03ab1efeb)**: Improve DX when combining react-dom/profiling and schedule/tracking (#13605) //<Brian Vaughn>//
- **[144328fe8](https://github.com/facebook/react/commit/144328fe8)**: Enable no-use-before-define rule (#13606) //<Dan Abramov>//
- **[8a8d973d3](https://github.com/facebook/react/commit/8a8d973d3)**: Use clearer wording //<Dan>//
- **[7d1169b2d](https://github.com/facebook/react/commit/7d1169b2d)**: Remove injectComponentTree from unstable-native-dependencies, add EventPluginHub (#13598) //<Brandon Dail>//
- **[8d1038fc6](https://github.com/facebook/react/commit/8d1038fc6)**: Break up ReactDOMServerIntegrationForm-test (#13600) //<Nathan Hunzaker>//
- **[b87aabdfe](https://github.com/facebook/react/commit/b87aabdfe)**: Drop the year from Facebook copyright headers and the LICENSE file. (#13593) //<Héctor Ramos>//
- **[e417e0bf7](https://github.com/facebook/react/commit/e417e0bf7)**: Update ReactNativeViewConfigRegistry Flow Types (#13579) //<Timothy Yung>//
- **[71c0e05ba](https://github.com/facebook/react/commit/71c0e05ba)**: Update bundle sizes for 16.5.0 release //<Brian Vaughn>//
- **[6255cc394](https://github.com/facebook/react/commit/6255cc394)**: Updating package versions for release 16.5.0 //<Brian Vaughn>//
- **[28cb37978](https://github.com/facebook/react/commit/28cb37978)**: Added a test for Profiler onRender that throws (#13575) //<Brian Vaughn>//
- **[8963118b3](https://github.com/facebook/react/commit/8963118b3)**: Update react-dom README //<Dan Abramov>//
- **[b47a28cb9](https://github.com/facebook/react/commit/b47a28cb9)**: Tweak react-dom README //<Dan Abramov>//
- **[f765f0225](https://github.com/facebook/react/commit/f765f0225)**: When a root expires, flush all expired work in a single batch (#13503) //<Andrew Clark>//
- **[550dd1d2e](https://github.com/facebook/react/commit/550dd1d2e)**: Call Profiler onRender after mutations (#13572) //<Brian Vaughn>//
- **[34348a45b](https://github.com/facebook/react/commit/34348a45b)**: Add enableSuspenseServerRenderer feature flag (#13573) //<Alex Taylor>//
- **[4e744be6e](https://github.com/facebook/react/commit/4e744be6e)**: Added react-dom/profiling entry point to NPM package (#13570) //<Brian Vaughn>//
- **[bb627228e](https://github.com/facebook/react/commit/bb627228e)**: test: add test for fragement props (#13565) //<laoxiong>//
- **[9a110ebd8](https://github.com/facebook/react/commit/9a110ebd8)**: Cleaned up 'schedule' API wrt interactions and subscriber ref: (#13561) //<Brian Vaughn>//
- **[fb88fd9d8](https://github.com/facebook/react/commit/fb88fd9d8)**: Fixed schedule/tracking require for www sync script (#13556) //<Brian Vaughn>//
- **[955393cab](https://github.com/facebook/react/commit/955393cab)**: refactor: remove emove type judgment when defining warning props (#13553) //<laoxiong>//
- **[ff9399602](https://github.com/facebook/react/commit/ff9399602)**: Fix import of ReactDOM in server env //<Dan Abramov>//
- **[281bd64c0](https://github.com/facebook/react/commit/281bd64c0)**: Fix test file name //<Dan Abramov>//
- **[d6b59e3d2](https://github.com/facebook/react/commit/d6b59e3d2)**: Check document.documentMode once //<Dan Abramov>//
- **[52633c84e](https://github.com/facebook/react/commit/52633c84e)**: Try/finally //<Dan Abramov>//
- **[2d4705e75](https://github.com/facebook/react/commit/2d4705e75)**: Make IE 11 not complain about non-crucial style attribute hydration mismatch (#13534) //<Michał Gołębiowski-Owczarek>//
- **[25d48a728](https://github.com/facebook/react/commit/25d48a728)**: Add gridArea to unitless CSS properties (#13550) //<Michał Gołębiowski-Owczarek>//
- **[877f8bc6b](https://github.com/facebook/react/commit/877f8bc6b)**: Renamed schedule UMD forwarding methods to stay in-sync with SECRET_INTERNALS change (#13549) //<Brian Vaughn>//
- **[0a96f9057](https://github.com/facebook/react/commit/0a96f9057)**: Revert "Extract common logic" (#13547) //<Dan Abramov>//
- **[17a57adde](https://github.com/facebook/react/commit/17a57adde)**: Fix test //<Dan Abramov>//
- **[605da8b42](https://github.com/facebook/react/commit/605da8b42)**: Extract common logic (#13535) //<Heaven>//
- **[69f9f4127](https://github.com/facebook/react/commit/69f9f4127)**: Document event bubble order (#13546) //<Philipp>//
- **[c1ba7b8cf](https://github.com/facebook/react/commit/c1ba7b8cf)**: Remove www scheduler fork (#13545) //<Dan Abramov>//
- **[b473d5f86](https://github.com/facebook/react/commit/b473d5f86)**: Secret exports: Scheduler => Schedule (#13544) //<Dan Abramov>//
- **[6312efc34](https://github.com/facebook/react/commit/6312efc34)**: Tweak README and description //<Dan Abramov>//
- **[b92f947af](https://github.com/facebook/react/commit/b92f947af)**: Rename "react-scheduler" package to "schedule" (#13543) //<Brian Vaughn>//
- **[3c1dcd349](https://github.com/facebook/react/commit/3c1dcd349)**: Expose less internals for TestUtils (#13539) //<Dan Abramov>//
- **[0b74e95d7](https://github.com/facebook/react/commit/0b74e95d7)**: Ignore noscript content on the client (#13537) //<Fredrik Höglund>//
- **[8a1e3962a](https://github.com/facebook/react/commit/8a1e3962a)**: Remove negative lookbehind from Rollup plugin that broke Node <= v8.9 (#13538) //<Brian Vaughn>//
- **[9604d26ae](https://github.com/facebook/react/commit/9604d26ae)**: Rename ReactDOMFiber* to ReactDOM* (#13540) //<Dan Abramov>//
- **[28b928902](https://github.com/facebook/react/commit/28b928902)**: Tidied up scheduling UMD API forwarding test (#13533) //<Brian Vaughn>//
- **[bf8aa6092](https://github.com/facebook/react/commit/bf8aa6092)**: Added Jest test to verify UMD API-forwarding for scheduling package (#13532) //<Brian Vaughn>//
- **[0040efc8d](https://github.com/facebook/react/commit/0040efc8d)**: Fix a typo (#13531) //<Heaven>//
- **[46950a3df](https://github.com/facebook/react/commit/46950a3df)**: Interaction tracking follow up (#13509) //<Brian Vaughn>//
- **[0452c9bba](https://github.com/facebook/react/commit/0452c9bba)**: Add a regression test for #4618 //<Dan Abramov>//
- **[c21bab694](https://github.com/facebook/react/commit/c21bab694)**: Add SSR regression test for #6119 //<Dan Abramov>//
- **[0d3fc9de1](https://github.com/facebook/react/commit/0d3fc9de1)**: Add regression test for #6119 //<Dan Abramov>//
- **[0f050ad7c](https://github.com/facebook/react/commit/0f050ad7c)**: Make regression test better //<Dan Abramov>//
- **[f94342323](https://github.com/facebook/react/commit/f94342323)**: Add a more precise regression test for #6219 //<Dan Abramov>//
- **[a3e4d0008](https://github.com/facebook/react/commit/a3e4d0008)**: Fixed typo (#13519) //<Ivan>//
- **[b3d8c5376](https://github.com/facebook/react/commit/b3d8c5376)**: [RN] Remove isMounted() false positive warning (#13511) //<Dan Abramov>//
- **[d2123d656](https://github.com/facebook/react/commit/d2123d656)**: Sync React Native Flow Changes (#13513) //<Timothy Yung>//
- **[1c0ba70b4](https://github.com/facebook/react/commit/1c0ba70b4)**: Fix test to use AsyncMode //<Dan>//
- **[6e4f7c788](https://github.com/facebook/react/commit/6e4f7c788)**: Profiler integration with interaction-tracking package (#13253) //<Brian Vaughn>//
- **[2967ebdbe](https://github.com/facebook/react/commit/2967ebdbe)**: Remove buggy unstable_deferredUpdates() (#13488) //<Dan Abramov>//
- **[1664b08f0](https://github.com/facebook/react/commit/1664b08f0)**: added flow types to setInnerHTML (#13495) //<Bryan M>//
- **[672e859d3](https://github.com/facebook/react/commit/672e859d3)**: Add warning to prevent setting this.state to this.props referentially (#11658) //<Veekas Shrivastava>//
- **[29287f088](https://github.com/facebook/react/commit/29287f088)**: Rename lowestPendingInteractiveExpirationTime (#13484) //<Heaven>//
- **[d400d6d5e](https://github.com/facebook/react/commit/d400d6d5e)**: Replace magic number 1 with ELEMENT_NODE (#13479) //<Heaven>//
- **[340bfd939](https://github.com/facebook/react/commit/340bfd939)**: Rename ReactTypeOfWork to ReactWorkTags, ReactTypeOfSideEffect to ReactSideEffectTags (#13476) //<Sophie Alpert>//
- **[5cefd9b1e](https://github.com/facebook/react/commit/5cefd9b1e)**: Stringify <option> children (#13465) //<Dan Abramov>//
- **[3661616c2](https://github.com/facebook/react/commit/3661616c2)**: Improve test harness of submit events (#13463) //<Philipp Spieß>//
- **[a1be17140](https://github.com/facebook/react/commit/a1be17140)**: Revert "Rely on bubbling for submit and reset events (#13358)" (#13462) //<Dan Abramov>//
- **[90c92c700](https://github.com/facebook/react/commit/90c92c700)**: Fix warning message //<Dan Abramov>//
- **[5cb0f2bf5](https://github.com/facebook/react/commit/5cb0f2bf5)**: Change www error shim API (#13454) //<Dan Abramov>//
- **[e106b8c44](https://github.com/facebook/react/commit/e106b8c44)**: Warn about unsafe toWarnDev() nesting in tests (#12457) //<Brian Vaughn>//
- **[026aa9c97](https://github.com/facebook/react/commit/026aa9c97)**: Bumped version to 16.4.3-alpha.0 (#13448) //<Brian Vaughn>//
- **[d670bdc6b](https://github.com/facebook/react/commit/d670bdc6b)**: Warn about ReactDOM.createPortal usage within ReactTestRenderer (#12895) //<Brian Vaughn>//
- **[bf1abf478](https://github.com/facebook/react/commit/bf1abf478)**: Fix React.lazy(forwardRef) (#13446) //<Dan Abramov>//
- **[e8571c798](https://github.com/facebook/react/commit/e8571c798)**: Tweak ReactTypeOfWork order (#13444) //<Dan Abramov>//
- **[973496b40](https://github.com/facebook/react/commit/973496b40)**: Fix component name for React.lazy (#13443) //<Dan Abramov>//
- **[0beb2ee76](https://github.com/facebook/react/commit/0beb2ee76)**: Fix incorrect legacy context for factory components (#13441) //<Dan Abramov>//
- **[004cb21bb](https://github.com/facebook/react/commit/004cb21bb)**: Short circuit the logic for exporting a module (#13392) //<Joseph>//
- **[f7a538c91](https://github.com/facebook/react/commit/f7a538c91)**: Remove getTextContentAccessor (#13434) //<Brandon Dail>//
- **[d1c42d2f1](https://github.com/facebook/react/commit/d1c42d2f1)**: Remove addEventListener check in isEventSupported (#13435) //<Brandon Dail>//
- **[a869f992a](https://github.com/facebook/react/commit/a869f992a)**: Remove helper object from FallbackCompositionState (#13430) //<Brandon Dail>//
- **[0cd8d470d](https://github.com/facebook/react/commit/0cd8d470d)**: Do not toLowerCase lists of lowercase words (#13428) //<Nathan Hunzaker>//
- **[b3a4cfea5](https://github.com/facebook/react/commit/b3a4cfea5)**: Trap click events for portal root (#11927) //<Brandon Dail>//
- **[0da5102cf](https://github.com/facebook/react/commit/0da5102cf)**: Add interaction-tracking/subscriptions (#13426) //<Brian Vaughn>//
- **[4b32f525e](https://github.com/facebook/react/commit/4b32f525e)**: Refactor away some namespace imports (#13427) //<Dan Abramov>//
- **[d2f5c3fbc](https://github.com/facebook/react/commit/d2f5c3fbc)**: Don't diff memoized host components in completion phase (#13423) //<Dan Abramov>//
- **[5e0f073d5](https://github.com/facebook/react/commit/5e0f073d5)**: interaction-tracking package (#13234) //<Brian Vaughn>//
- **[d14e443d6](https://github.com/facebook/react/commit/d14e443d6)**: Resume onSelect tracking after dragend (#13422) //<Dan Abramov>//
- **[d5edc1f51](https://github.com/facebook/react/commit/d5edc1f51)**: Remove unused ReactCall & ReactReturn types (#13419) //<Esteban>//
- **[4fa20b53b](https://github.com/facebook/react/commit/4fa20b53b)**: Don't pass instanceHandle to clones (#13125) //<Sebastian Markbåge>//
- **[fe959eea7](https://github.com/facebook/react/commit/fe959eea7)**: React.lazy (#13398) //<Andrew Clark>//
- **[2b3082800](https://github.com/facebook/react/commit/2b3082800)**: Fix wrong Flow return type //<Andrew Clark>//
- **[5031ebf6b](https://github.com/facebook/react/commit/5031ebf6b)**: Accept promise as element type (#13397) //<Andrew Clark>//
- **[77b7a660b](https://github.com/facebook/react/commit/77b7a660b)**: fix: do not reconcile children that are iterable functions (#13416) //<Rauno Freiberg>//
- **[cb7745c6c](https://github.com/facebook/react/commit/cb7745c6c)**: remove unused state initialValue from ReactDOMFiberSelect (#13412) //<Kartik Lad>//
- **[9832a1b6d](https://github.com/facebook/react/commit/9832a1b6d)**: Avoid setting empty value on reset & submit inputs (#12780) //<Ellis Clayton>//
- **[8862172fa](https://github.com/facebook/react/commit/8862172fa)**: Provide a better error message (#12421) //<Aaron Brager>//
- **[581682917](https://github.com/facebook/react/commit/581682917)**: De-duplicate commitUpdateQueue effect commit (#13403) //<Ruud Burger>//
- **[1bc975d07](https://github.com/facebook/react/commit/1bc975d07)**: Don't stop context traversal at matching consumers (#13391) //<Andrew Clark>//
- **[83e446e1d](https://github.com/facebook/react/commit/83e446e1d)**: Refactor ReactErrorUtils (#13406) //<Dan Abramov>//
- **[13fa96a54](https://github.com/facebook/react/commit/13fa96a54)**: Improve bad ref invariant (#13408) //<Dan Abramov>//
- **[b2adcfba3](https://github.com/facebook/react/commit/b2adcfba3)**: Don't suppress jsdom error reporting in our tests (#13401) //<Dan Abramov>//
- **[69e2a0d73](https://github.com/facebook/react/commit/69e2a0d73)**: Ability to access window.event in development (#11687) (#11696) //<Conrad Irwin>//
- **[ade4dd3f6](https://github.com/facebook/react/commit/ade4dd3f6)**: Fix typo in a comment (#13373) //<davidblnc>//
- **[2c59076d2](https://github.com/facebook/react/commit/2c59076d2)**: Warn when "false" or "true" is the value of a boolean DOM prop (#13372) //<Moti Zilberman>//
- **[de5102c4c](https://github.com/facebook/react/commit/de5102c4c)**: Ignore symbols and functions in select tag (#13389) //<Rauno Freiberg>//
- **[d04d03e47](https://github.com/facebook/react/commit/d04d03e47)**: Fix passing symbols and functions to textarea (#13362) //<Rauno Freiberg>//
- **[5550ed4a8](https://github.com/facebook/react/commit/5550ed4a8)**: Ensure arguments are coerced to strings in warnings (#13385) //<Nathan Hunzaker>//
- **[3938ccc88](https://github.com/facebook/react/commit/3938ccc88)**: Allow the user to opt out of seeing "The above error..." addendum (#13384) //<Dan Abramov>//
- **[47e217a77](https://github.com/facebook/react/commit/47e217a77)**: Provide component reference in ReactDOMFiberTextarea warnings (#13361) //<Rauno Freiberg>//
- **[a0190f828](https://github.com/facebook/react/commit/a0190f828)**: Rename SafeValue to ToStringValue (#13376) //<Philipp Spieß>//
- **[33602d435](https://github.com/facebook/react/commit/33602d435)**: Improve soundness of ReactDOMFiberInput typings (#13367) //<Philipp Spieß>//
- **[ae855cec2](https://github.com/facebook/react/commit/ae855cec2)**: Support tangentialPressure and twist fields of pointer events (#13374) //<Moti Zilberman>//
- **[725e499cf](https://github.com/facebook/react/commit/725e499cf)**: Rely on bubbling for submit and reset events (#13358) //<Philipp Spieß>//
- **[e07a3cd28](https://github.com/facebook/react/commit/e07a3cd28)**: fix typo on inline comment (#13364) //<Alex Rohleder>//
- **[e0204084a](https://github.com/facebook/react/commit/e0204084a)**: Fix typos detected by github.com/client9/misspell (#13349) //<Kazuhiro Sera>//
- **[be4533af7](https://github.com/facebook/react/commit/be4533af7)**: Fix hydration of non-string dangerousSetInnerHTML.__html (#13353) //<Dan Abramov>//
- **[0072b5998](https://github.com/facebook/react/commit/0072b5998)**: Improve scry() error message for bad first argument (#13351) //<Dan Abramov>//
- **[d59b993a7](https://github.com/facebook/react/commit/d59b993a7)**: Make nicer stacks DEV-only //<Dan>//
- **[54d86eb82](https://github.com/facebook/react/commit/54d86eb82)**: Improve display of filenames in component stack (#12059) //<Billy Janitsch>//
- **[067cc24f5](https://github.com/facebook/react/commit/067cc24f5)**: Profiler actualDuration bugfix (#13313) //<Brian Vaughn>//
- **[3cfab14b9](https://github.com/facebook/react/commit/3cfab14b9)**: Treat focusable as enumerated boolean SVG attribute (#13339) //<Dan Abramov>//
- **[3b3b7fcbb](https://github.com/facebook/react/commit/3b3b7fcbb)**: Don't search beyond Sync roots for highest priority work (#13335) //<Dan Abramov>//
- **[08e32263f](https://github.com/facebook/react/commit/08e32263f)**: Fix Prettier "No parser" warning while building (#13323) //<Bartosz Kaszubowski>//
- **[ac7238856](https://github.com/facebook/react/commit/ac7238856)**: Add support for auxclick event (#11571) //<Jason Quense>//
- **[75491a8f4](https://github.com/facebook/react/commit/75491a8f4)**: Add a regression test for #12200 (#12242) //<Gareth Small>//
- **[2d0356a52](https://github.com/facebook/react/commit/2d0356a52)**: Make sure that `select` has `multiple` attribute set to appropriate state before appending options (#13270) //<Dmytro Zasyadko>//
- **[b179bae0a](https://github.com/facebook/react/commit/b179bae0a)**: Enhance get derived state from props state warning - #12670 (#13317) //<Felix Wu>//
- **[15a8f0318](https://github.com/facebook/react/commit/15a8f0318)**: Fix ambiguity in doc comment for isValidElement (#12826) //<Alexey>//
- **[5cff21207](https://github.com/facebook/react/commit/5cff21207)**: add flowtype to function signature (#13285) //<ryota-murakami>//
- **[b565f4953](https://github.com/facebook/react/commit/b565f4953)**: Minimally support iframes (nested browsing contexts) in selection event handling (#12037) //<Andrew Patton>//
- **[1609cf343](https://github.com/facebook/react/commit/1609cf343)**: Warn about rendering Generators (#13312) //<Dan Abramov>//
- **[46d5afc54](https://github.com/facebook/react/commit/46d5afc54)**: Replace console.error() with a throw in setTimeout() as last resort exception logging (#13310) //<Dan Abramov>//
- **[b3b80a483](https://github.com/facebook/react/commit/b3b80a483)**: Inject react-art renderer into react-devtools (#13173) //<Yunchan Cho>//
- **[5e8beec84](https://github.com/facebook/react/commit/5e8beec84)**: Add a regression test for #11602 //<Dan Abramov>//
- **[470377bbd](https://github.com/facebook/react/commit/470377bbd)**: Remove extraneous condition //<Dan Abramov>//
- **[6db080154](https://github.com/facebook/react/commit/6db080154)**: Remove irrelevant suggestion of a legacy method from a warning (#13169) //<Ideveloper>//
- **[f60a7f722](https://github.com/facebook/react/commit/f60a7f722)**: Fix SSR crash on a hasOwnProperty attribute (#13303) //<Dan Abramov>//
- **[ff41519ec](https://github.com/facebook/react/commit/ff41519ec)**: Sanitize unknown attribute names for SSR (#13302) //<Dan Abramov>//
- **[c44c2a216](https://github.com/facebook/react/commit/c44c2a216)**: More helpful message when passing an element to createElement() (#13131) //<Dylan Cutler>//
- **[28cd494bd](https://github.com/facebook/react/commit/28cd494bd)**: Refactor validateDOMNesting a bit (#13300) //<Dan Abramov>//
- **[b381f4141](https://github.com/facebook/react/commit/b381f4141)**: Allow Electrons <webview> tag (#13301) //<Philipp Spieß>//
- **[0182a7463](https://github.com/facebook/react/commit/0182a7463)**: Fix a crash when using dynamic children in <option> tag (#13261) //<Konstantin Yakushin>//
- **[2a2ef7e0f](https://github.com/facebook/react/commit/2a2ef7e0f)**: Remove unnecessary branching from updateContextProvider (#13282) //<Andrew Clark>//
- **[840cb1a26](https://github.com/facebook/react/commit/840cb1a26)**: Add an invariant to createRoot() to validate containers (#13279) //<Dan Abramov>//

Release Notes:
[GENERAL] [FEATURE] [React] - React sync for revisions bc1ea9c...ade5e69

Reviewed By: bvaughn

Differential Revision: D9561644

fbshipit-source-id: 3be120d7450f310af458897d54993a6c086cff2f
2018-09-10 14:47:11 -07:00
Jamiboy Mohammad dbec6e1096 Change ImageBackground to work with percentage image sizes
Summary: ImageBackground assigned its Image the same `width` and `height` styles as itself. This became an issue for ImageBackground instances that were assigned (non 100%) percentage size values. For example, if the `width` and/or `height` of the ImageBackground was set to be 50%, it would be half the size of the current component it is in (as intended), but the Image would be 50% of the ImageBackground, which is only 25% the size of the ImageBackground's parent component.

Reviewed By: shergin

Differential Revision: D9307123

fbshipit-source-id: cec3802d30b72c44f66dd3a53693ebd669cc8db4
2018-09-10 13:47:28 -07:00
Tim Yung 5023b105e4 JS: Switch to `nullthrows` Package [1/4]
Summary:
Switches to the `nullthrows` package instead of using `fbjs/lib/nullthrows`.

The version of `nullthrows` in `fbjs` is outdated and already missing features that exist in the standalone `nullthrows` package.

Also, this mitigates the inevitable collision between `nullthrows` (as a Haste module) and `nullthrows` (as a `node_modules` dependency).

Reviewed By: zertosh

Differential Revision: D9733178

fbshipit-source-id: 1b589d48c1ed57cebf2088b796ad72e212534c0a
2018-09-10 01:46:48 -07:00
Christoph Jerolimov c3e42b5531 Fix that BackHandler was not called on Android (#19077)
Summary:
This fixes issues #18954 and #15497

The transformation from Set to (an reversed) Array does not work on Android devices when the remote debugging was started with `react-native run-android`.

<!--
  Required: Write your motivation here.
  If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
-->

Add the following code to your App.js and run the app with `react-native run-android` in an Android device:

```
  componentDidMount() {
    BackHandler.addEventListener('hardwareBackPress', () => {
      console.warn('Callback called. Do not close app. Do nothing at all.');
      return true; // Do not close the app.
    });
  }
```

After adding this, the app should NOT close when you press the back button. Without this fix, the app closes (which is the default behaviour).

See also the comments from Victoriayangx in #18954 and #15497.

<!--
  Does this PR require a documentation change?
  Create a PR at https://github.com/facebook/react-native-website and add a link to it here.
-->

<!--
  Required.
  Help reviewers and the release process by writing your own release notes. See below for an example.
-->

[ANDROID] [BUGFIX] [BackHandler] - Fix that BackHandler was not called on Android

<!--
  **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

    CATEGORY
  [----------]      TYPE
  [ CLI      ] [-------------]    LOCATION
  [ DOCS     ] [ BREAKING    ] [-------------]
  [ GENERAL  ] [ BUGFIX      ] [ {Component} ]
  [ INTERNAL ] [ ENHANCEMENT ] [ {Filename}  ]
  [ IOS      ] [ FEATURE     ] [ {Directory} ]   |-----------|
  [ ANDROID  ] [ MINOR       ] [ {Framework} ] - | {Message} |
  [----------] [-------------] [-------------]   |-----------|

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Pull Request resolved: https://github.com/facebook/react-native/pull/19077

Reviewed By: yns88

Differential Revision: D9692298

Pulled By: hramos

fbshipit-source-id: 4526b07a4924055ebc9c42e02615c27aa5c97fbb
2018-09-07 10:26:20 -07:00
Kevin Gozali 0df92afc1c Remove NavigatorIOS
Summary:
Legacy navigator impl. There are other alternatives that should be used instead.

Part of the slimmening effort as described here: https://github.com/react-native-community/discussions-and-proposals/issues/6

Reviewed By: TheSavior

Differential Revision: D9677824

fbshipit-source-id: 24ae500751d2a8c398f246d36604a58f0b3c113b
2018-09-07 10:26:20 -07:00
Zack Gomez 5eaa2d29c0 Fix inability to remove 'Disabled' state from AccessibilityStates
Summary:
D8842691 split AccessibilityTraits into multiple RN properties.  However, the accessor code did not support REMOVING traits.
This results in buttons that were disabled (AccessibilityTraits & NotEnabled === true) never being enabled.

Fix the issue by making the split accessors properly mask in the bits, allowing you unset them without disturbing bits managed by the other accessor.

NOTE: setting AccessibilityTraits and AccessibilityRole or AccessibilityStates will still result in bugs.

Reviewed By: shergin

Differential Revision: D9661970

fbshipit-source-id: 77d70dd0754f2eaf8cbf895bfc13757c697a76d8
2018-09-07 10:26:19 -07:00
Adam Comella 01d5eff425 iOS: Add a maxFontSizeMultiplier prop to <Text> and <TextInput> (#20915)
Summary:
**Motivation**

Whenever a user changes the system font size to its maximum allowable setting, React Native apps that allow font scaling can become unusable because the text gets too big. Experimenting with a native app like iMessage on iOS, the font size used for non-body text (e.g. header, navigational elements) is capped while the body text (e.g. text in the message bubbles) is allowed to grow.

This PR introduces a new prop on `<Text>` and `<TextInput>` called `maxFontSizeMultiplier`. This enables devs to set the maximum allowed text scale factor on a Text/TextInput. The default is 0 which means no limit.

Another PR will add this feature to Android.

**Test Plan**

I created a test app which utilizes all categories of values of `maxFontSizeMultiplier`:
  - `undefined`: inherit from parent
  - `0`: no limit
  - `1`, `1.2`: fixed limits

I tried this with `Text`, `TextInput` with `value`, and `TextInput` with children. For `Text`, I also verified that nesting works properly (if a child `Text` doesn't specify `maxFontSizeMultiplier`, it inherits it from its parent).

Lastly, we've been using a version of this in Skype for several months.

**Release Notes**

[GENERAL] [ENHANCEMENT] [Text/TextInput] - Added maxFontSizeMultiplier prop to prevent some text from getting unusably large as user increases OS's font scale setting (iOS)

Adam Comella
Microsoft Corp.
Pull Request resolved: https://github.com/facebook/react-native/pull/20915

Differential Revision: D9646739

Pulled By: shergin

fbshipit-source-id: c823f59c1e342c22d6297b88b2cb11c5a1f10310
2018-09-04 17:50:42 -07:00
Oleg Lokhvitsky 5f48d28119 ScrollView snapToStart/snapToEnd
Summary: Added `snapToStart` and `snapToEnd` props to ScrollView which work together with `snapToOffsets` and determine whether the beginning and end of the list automatically count as snap offsets or not. If not, the list is allowed to free-scroll between its start/end and the first/last snap offset.

Reviewed By: sahrens

Differential Revision: D9442386

fbshipit-source-id: 47a5fdb20f884542434b01b1f0a486ed2b478c6e
2018-08-30 13:04:50 -07:00
Oleg Lokhvitsky fd744dd56c ScrollView snapToOffsets
Summary:
* Added snapToOffsets prop to ScrollView. Allows snapping at arbitrary points.

* Fixed pagingEnabled not being overridden by snapToInterval on iOS.

* Fixed Android *requiring* pagingEnabled to be defined alongside snapToInterval.
* Added support for decelerationRate on Android.

* Fixed snapping implementation. It was not calculating end position correctly at all (velocity is not a linear offset).
  * Resolves https://github.com/facebook/react-native/issues/20155
* Added support for new content being added during scroll (mirrors existing functionality in vertical ScrollView).

* Added support for snapToInterval.
  * Resolves https://github.com/facebook/react-native/issues/19552

Reviewed By: yungsters

Differential Revision: D9405703

fbshipit-source-id: b3c367b8079e6810794b0165dfdbcff4abff2eda
2018-08-30 13:04:50 -07:00
Emily Janzer 1736be5811 Add onTextLayout to TextProps
Summary: Splitting this into a separate diff for OSS

Reviewed By: yungsters

Differential Revision: D9551085

fbshipit-source-id: 8ca08351c6b89cd0011aab3c47ef6cc28b763450
2018-08-30 09:33:05 -07:00
Tim Yung 19a8a578dc RN: Improve ViewPropTypes
Summary:
Makes a couple improvements to `ViewPropTypes`.

- Remove deprecated transform props. We are now using exact object types, so they are already disallowed.
- Remove garbage types for `accessibilityLabel`.

Reviewed By: TheSavior

Differential Revision: D9542088

fbshipit-source-id: f9128353e19cff22caf52c896c9c137f01aea276
2018-08-29 17:49:24 -07:00
David Vacca eb225fa173 Revert changes of the name for AndroidHorizontalScrollView
Summary: This diff reverts the changes in the name for AndroidHorizontalScrollView and AndroidHorizontalScrollContentView that caused a redbox for continuous OTA users

Reviewed By: fkgozali

Differential Revision: D9561972

fbshipit-source-id: 3d8e9ee8bb6081107bc8d315af16885bb003148e
2018-08-29 15:48:59 -07:00
David Vacca 575f7d478d Implement HorizontalScrollView component
Summary: This diff implements the HorizontalScrollView component for Android Fabric C++, as part of this diff I also re-named the components AndroidHorizontalScrollContentView for RCTAndroidHorizontalScrollContentView and AndroidHorizontalScrollView for RCTAndroidHorizontalScrollView. This might sound against our plan of removing the RCT preffix, but it is to make it simpler to map components between current implementation of RN and Fabric (otherwise we don't know when to add the RCT preffix in Android side to find the right View Manager), later we can just remove the preffix from C++, Android, iOS and JS.

Reviewed By: shergin, achen1

Differential Revision: D9122729

fbshipit-source-id: e9299552857c6dd0c18abfa5fa49a3d50e221729
2018-08-28 23:03:33 -07:00
Logan Daniels 122dc37afe Deeply compare viewabilityConfigs to avoid triggering invariant unnecessarily
Summary:
Currently, modifying a component that renders a FlatLists while Hot Reloading is enabled will trigger an invariant inside FlatList for changing viewabilityConfig on the fly. This happens because it checks object equality between the configs.

By checking equality of the config's *properties* instead, we maintain the efficacy of the invariant but keep it from falsely triggering during development.

Reviewed By: sahrens

Differential Revision: D9466129

fbshipit-source-id: 67149e9e70ad7b2e2584bb7ec03e2dea26ef45e8
2018-08-24 14:32:07 -07:00
Eli White d2c27f5bff Remove view configs from JS
Summary: Apparently different apps have different implementations of view managers that support different props. This is a problem that we will need to address. Unfortunately, this means we can't have a static config defined in JS. We will need to find another approach to this problem.

Reviewed By: sahrens

Differential Revision: D9500178

fbshipit-source-id: b591559164fcf29f5fd43e13a0f2da15011491c6
2018-08-24 14:04:09 -07:00
Eli White 035597566f Explain why and how to keep JS<->Naitve view configs in sync
Reviewed By: sahrens

Differential Revision: D9485764

fbshipit-source-id: 673748b0ded666b8d17ed221e1208cffefb6c859
2018-08-24 14:04:09 -07:00
Mehdi Mulani 64a52532fe Text: send metrics after rendering (iOS)
Summary: This adds a callback for <Text> to get metrics about the rendered text. It's divided by line but that could be changed to "fragments" (which makes more sense for multi-lingual). Right now by line is convenient as you frequently want to know where the first and last line end (though we could make this work with fragments I suppose).

Reviewed By: shergin

Differential Revision: D9440914

fbshipit-source-id: bb011bb7a52438380d3f604ffe7019b98c18d978
2018-08-24 13:33:08 -07:00
Tim Yung 47dc31d464 RN: Nullable Image, Text, & View Props
Summary:
Changes the Flow prop types for `Image`, `Text`, and `View` to be nullable and optional.

This makes these components easier to compose.

Reviewed By: sahrens

Differential Revision: D9494285

fbshipit-source-id: c3f17147f063b31217b239a3abc085d1850f8df9
2018-08-24 10:48:08 -07:00
Eli White a700044e2e Move Android's Image ViewConfig to JS
Reviewed By: sahrens

Differential Revision: D9492683

fbshipit-source-id: 035aa00650ee4908452fe18384d953882bc2a8d8
2018-08-23 21:48:04 -07:00
Eli White daec505144 Put RCTTextInlineImage ViewConfig in JS
Summary: Moving this config to native for android so we skip the native lookup for the config.

Reviewed By: yungsters

Differential Revision: D9485645

fbshipit-source-id: cc0a6e9f12dad0c08aac32ca210373c388d307d6
2018-08-23 21:48:04 -07:00
Simon Jensen 966bb63a80 make Object.assign polyfill conditional and spec compliant
Summary: Replace the non-compliant `Object.assign` with a spec compliant version from Mozilla. Since its spec compliant we can apply conditionally only when a native version is not available.

Reviewed By: yungsters

Differential Revision: D8896359

fbshipit-source-id: 4999fe3094eba2206293bbe28760a4e46cbee6aa
2018-08-23 14:02:10 -07:00
Eli White 1329d18c6a Require that JS defined Component Attributes match Native ones in dev
Summary: As we move these configs to JS from native, until we have codegen that ensures everything stays up to date, this adds a dev mode check to ensure they are consistent.

Reviewed By: yungsters

Differential Revision: D9475011

fbshipit-source-id: 9d6f7b6c649229cae569d840eda3d5f7b7aa7cb2
2018-08-23 13:01:41 -07:00
Eli White 97472892d7 Back out "[react-native][PR] Make Flow and PropType types checks consistent for view style props."
Summary: Reverting due to problems with prepack.

Reviewed By: gaearon

Differential Revision: D9482931

fbshipit-source-id: 0ec5d0fb80dab32a07521a465dd2a501e6bb4d30
2018-08-23 11:34:26 -07:00
Tim Yung 055c941c40 A11Y: Leverage New `AccessibilityProps` Props
Summary: Adds new accessibility props more widely.

Reviewed By: TheSavior

Differential Revision: D9466018

fbshipit-source-id: 63ce58f725c7fd924d979d821037011d83c0334e
2018-08-23 00:18:47 -07:00
Eli White b620ccab49 Deprecate View prop-type definitions
Summary: This diff moves the prop-type definitions for View out into it's own file. We will be able to do this with a bunch of the prop-type definitions and then move them out into a deprecated npm package.

Reviewed By: yungsters

Differential Revision: D9444394

fbshipit-source-id: 4fd0a78533211b598ba2da4eb5015ffcc20bb675
2018-08-22 18:31:36 -07:00
Tim Yung 3aea678c38 RN: Reduce ForwardRef(View) Noise in Systrace
Summary: When running a trace, reduce the noise from the `__DEV__`-only `ForwardRef(View)` elements.

Reviewed By: ejanzer

Differential Revision: D9445865

fbshipit-source-id: 7cfe87bab6dd62d3800d2ca239724b5063c55c89
2018-08-22 17:49:32 -07:00