Commit Graph

1025 Commits

Author SHA1 Message Date
Eli White e0db8ee645 Slider remove $FlowFixMe
Reviewed By: sahrens

Differential Revision: D8234803

fbshipit-source-id: cfc0466a54f3c219d8a2eadfebf840399a2abdd8
2018-06-01 17:54:50 -07:00
Tim Yung 8dc3ba0444 RN: Remove Native Prop Validation
Summary:
As we migrate over to static typing solutions for props, we cannot rely on always having `propTypes` available at runtime.

This gets us started on that journey by removing the native prop validation that happens when we require native components.

bypass-lint

Reviewed By: TheSavior

Differential Revision: D7976854

fbshipit-source-id: f3ab579a7f0f8cfb716b0eb7fd4625f8168f3d96
2018-06-01 12:54:14 -07:00
Eli White f8c8231706 DatePickerIOS ES6 Class
Reviewed By: sahrens

Differential Revision: D8219657

fbshipit-source-id: cef48cf3ad24ad442f07df0edad55ab97d96c6f2
2018-06-01 10:25:30 -07:00
Eli White 3b53091869 DatePickerIOS add onChange event definition
Reviewed By: sahrens

Differential Revision: D8219622

fbshipit-source-id: 37f26d0981318b7eab9d3c734c44e7714fa6f0e8
2018-06-01 10:25:30 -07:00
Eli White edd7acbb1e ActivityIndicator ES6 Class
Reviewed By: yungsters

Differential Revision: D8219463

fbshipit-source-id: 7d252d15bb4a7345d156b1659b09be2a4a69ba6c
2018-06-01 10:25:30 -07:00
Eli White a35a238317 RefreshControl ES6 Class
Reviewed By: sahrens

Differential Revision: D8219221

fbshipit-source-id: 445243964d64dd5274c1e47bdc137645dc8eecaf
2018-06-01 10:25:30 -07:00
Héctor Ramos 95554add98 Update Jest snapshots
Summary:
Jest will now exclude undefined props from snapshots (https://github.com/facebook/jest/pull/6162). Updating the snapshots should fix the current `test_javascript` failures.

Circle CI

[INTERNAL][MINOR][Snapshots] - Update snapshots
Closes https://github.com/facebook/react-native/pull/19414

Differential Revision: D8125193

Pulled By: hramos

fbshipit-source-id: db8dcfcd8afbf9d6256f83c6e922680a7872d776
2018-05-29 17:30:16 -07:00
Chirag Shah 84c965f085 Typo fixes
Summary:
Spotted a few typos while going through the source code

No tests are required

[INTERNAL] [MINOR] [Webview] - Fixed typos
Closes https://github.com/facebook/react-native/pull/19462

Differential Revision: D8176774

Pulled By: hramos

fbshipit-source-id: f1a9024b210e1a935dcdccd7e27daedb71d794bc
2018-05-26 21:01:37 -07:00
Janic Duplessis ce3b7b8204 Bring back TextInput.State, deprecate focusTextInput and blurTextInput
Summary:
a275eac56e removed TextInput.State but we should keep it as it was a public-ish API and we don't have any migration plan off it. Also bring back `focusTextInput` and `blurTextInput` with a deprecation warning.

Tested TextInput.State is back

[GENERAL][ENHANCEMENT][TextInput] - Bring back TextInput.State, deprecate focusTextInput and blurTextInput
Closes https://github.com/facebook/react-native/pull/18936

Differential Revision: D8044439

Pulled By: hramos

fbshipit-source-id: fde145f04bb1d46ef58b5954cb7963adf495b21c
2018-05-17 11:26:22 -07:00
Janic Duplessis ffe6c110f7 Fix keyboard handling with keyboardShouldPersistTaps: never
Summary:
When `keyboardShouldPersistTaps` is `"never"` it would break when doing the following steps:

- Tap input 1, keyboard goes up
- Tap input 2, keyboard stays down (The bug I expected without the isTextInput check was that it would dismiss instead :o )
- Tap outside, keyboard stays down. It should dismiss here since it should never persist taps (unless tapping another input)

What seems to happen is that RN `currentlyFocusedTextInput` goes out of sync with the focused text input and is null even if there is still a text input focused. I haven't had time to investigate the cause of that (probably some race condition because of trying to focus and blur at the same time) but we should not try to dismiss the keyboard when tapping another TextInput in the first place.

I reproduced the bug mentioned by setting `keyboardShouldPersistTaps` to `"never"` in RNTesterPage.js and then using the steps described above. I made sure that the bug did not happen after this change.

[GENERAL][BUGFIX][ScrollResponder] - Fix keyboard handling with keyboardShouldPersistTaps: never
Closes https://github.com/facebook/react-native/pull/19255

Differential Revision: D8002818

Pulled By: mdvacca

fbshipit-source-id: 6ecb8d2c30eb9338529471a958b5dc04037c7ec6
2018-05-14 23:46:50 -07:00
Tim Yung c017dcb0f2 RN: Switch KeyboardAvoidingView to Class Syntax
Summary:
Refactors `KeyboardAvoidingView` by using class syntax and fixing all Flow errors.

Note that there's still a bunch of sketchy stuff going on in this component with mutated instance variables (that are used in `render`!) and unsafe lifecycle methods. But at least now it's a little bit less painful on the eyes.

Reviewed By: TheSavior

Differential Revision: D7987443

fbshipit-source-id: f5c27a9dd383c430d9a5a9dc0b6e10e2c4fe8dd9
2018-05-14 17:52:25 -07:00
Eli White 113f009698 Flowtype SegmentedControlIOS
Reviewed By: yungsters

Differential Revision: D7985978

fbshipit-source-id: 6579ad8dd5c5377571fd790149ea5cfc6b33939f
2018-05-14 00:24:44 -07:00
Eli White c87701ba05 Flowtype ProgressViewIOS
Reviewed By: yungsters

Differential Revision: D7985969

fbshipit-source-id: d351ebc26e7be2741c93ce462ae59aa13d0c1f27
2018-05-14 00:24:44 -07:00
Eli White 1c66cdc7e8 Flowtype PickerIOS
Reviewed By: yungsters

Differential Revision: D7985960

fbshipit-source-id: 9fbce5fafe47bee1d2a527c72f3ebef85d26f9f1
2018-05-14 00:24:44 -07:00
Eli White d796129895 Delete LazyRenderer
Summary: This isn't used internally at Facebook and we have no public documentation for this component. If people are interested in using it they can easily reproduce this function outside of core.

Reviewed By: yungsters

Differential Revision: D7985955

fbshipit-source-id: 859878a858cbcb42fec7f9bd04e5d7574801e445
2018-05-14 00:24:44 -07:00
Eli White 06052a2330 Flowtype Switch
Reviewed By: yungsters

Differential Revision: D7985880

fbshipit-source-id: eaaff2188b8257d09e1bf628d19dae6dfb4c2fc6
2018-05-14 00:24:44 -07:00
Eli White cbe045a95f Flowtype Slider
Reviewed By: yungsters

Differential Revision: D7985857

fbshipit-source-id: 8b6b9f58aa89b898fa38d1cfc0564df5f64741a2
2018-05-14 00:24:44 -07:00
Eli White 891dfc3da4 Flowtype RefreshControl
Reviewed By: yungsters

Differential Revision: D7985835

fbshipit-source-id: 67a27cb99738d99959b1c795af95d0415a84f1b9
2018-05-14 00:24:44 -07:00
Eli White 4b1ecb6204 Flowtype ListView
Reviewed By: yungsters

Differential Revision: D7985836

fbshipit-source-id: 6e0944a8d2fb85aabc34dfd3125a07b208749f21
2018-05-14 00:24:44 -07:00
Eli White af6e2eb02d Removing unnecessary FlowFixMe
Reviewed By: yungsters

Differential Revision: D7985749

fbshipit-source-id: ba7e152749c5a5cac134b51e0229dc11870bb3e0
2018-05-14 00:24:44 -07:00
Eli White 1419c7a7fd Migrate ScrollView fake type to ReactNative.NativeComponent
Reviewed By: yungsters

Differential Revision: D7985122

fbshipit-source-id: b78fc6ad84485e8aa42657c2b21d70c9f3a271d6
2018-05-14 00:24:44 -07:00
Eli White ffda017850 Removing unnecessary FlowFixMe
Reviewed By: yungsters

Differential Revision: D7985116

fbshipit-source-id: 97a7a37b2ffe7a81669973f9dca6824a4f352a07
2018-05-14 00:24:44 -07:00
Eli White c8bcda8150 FlowType TextInput
Reviewed By: yungsters

Differential Revision: D7985109

fbshipit-source-id: 294919bce64b21cab4f37262a7da9e68cb67207f
2018-05-14 00:24:44 -07:00
Eli White 0e707ff843 Clean up TextInput
Reviewed By: yungsters

Differential Revision: D7984843

fbshipit-source-id: 17259ade77f08d37dff9bb85984798f99885ad86
2018-05-13 02:01:05 -07:00
Eli White 8454a36b0b Flow type TouchableBounce
Reviewed By: yungsters

Differential Revision: D7984827

fbshipit-source-id: b0dd67b5c4d57cd9bb0339a5266a16e4565b2d54
2018-05-13 02:01:05 -07:00
Tim Yung 752863629d RN: Fix Type for ReactNative.NativeComponent (2/2)
Reviewed By: TheSavior

Differential Revision: D7984936

fbshipit-source-id: d0477c54420b49220e9529fa70c2b2babce0b409
2018-05-13 01:05:57 -07:00
Tim Yung de11ba2a5e RN: Fix Type for ReactNative.NativeComponent (1/2)
Reviewed By: TheSavior

Differential Revision: D7984814

fbshipit-source-id: 0097819128b7f82267bceeb9d5e1b5057c5129ec
2018-05-13 01:05:56 -07:00
Tim Yung 41a940392c RN: Add Missing Events to ViewPropTypes
Reviewed By: TheSavior

Differential Revision: D7984937

fbshipit-source-id: fc2703e3382a7515b71f8a634aca5b6d7a5b25b4
2018-05-13 01:05:56 -07:00
Eli White 44743c07ad Flow Type TouchableOpacity
Reviewed By: yungsters

Differential Revision: D7983709

fbshipit-source-id: 0f664c831b754277e344aa53b2dbed6b4f720cd5
2018-05-12 23:25:09 -07:00
Eli White 6cfa4a360d TouchableOpacity @noflow -> @flow
Reviewed By: yungsters

Differential Revision: D7983644

fbshipit-source-id: bf4a0ba600ac51ef07ac12927eed29eeb92ffb2a
2018-05-12 23:25:09 -07:00
Eli White f0c18dc820 Flow type TouchableHighlight
Reviewed By: yungsters

Differential Revision: D7983631

fbshipit-source-id: 98b3708b26e2bf96426d5acaa5c7e2311a3a34f6
2018-05-12 23:25:09 -07:00
Eli White 6b3aad31f6 Remove unused suppressions
Reviewed By: yungsters

Differential Revision: D7983271

fbshipit-source-id: ee64e2dacbc8a1b75915b825f7bf0621a121422d
2018-05-12 23:25:08 -07:00
Eli White 0b79d1faa2 Type TouchableWithoutFeedback
Reviewed By: yungsters

Differential Revision: D7982348

fbshipit-source-id: 409ce4a5ea8c09e58c42caf9db60117253503c4c
2018-05-12 23:25:08 -07:00
Eli White 91c4b0357a Remove unused suppressions
Reviewed By: yungsters

Differential Revision: D7982027

fbshipit-source-id: 00e538dc678275495e097d9cd14a0a2643ebaefd
2018-05-12 10:35:27 -07:00
Eli White b127662279 Flow Type ScrollView
Reviewed By: yungsters

Differential Revision: D7981073

fbshipit-source-id: 38c100f37e46683da1e34b335d476e706baae238
2018-05-12 10:35:27 -07:00
Eli White 188b118b60 Flow Type KeyboardAvoidingView
Reviewed By: yungsters

Differential Revision: D7978494

fbshipit-source-id: e21b4910470d3dc3fd35027f2f975b6842baa6ab
2018-05-12 10:35:27 -07:00
Eli White 97e572ea6d Flow Type DatePickerIOS.ios.js
Reviewed By: yungsters

Differential Revision: D7978090

fbshipit-source-id: 65da360f34f4b6d9240a8343c89be66404767474
2018-05-12 10:35:27 -07:00
Eli White 0b71d1ddb0 Flow Typing ActivityIndicator
Reviewed By: yungsters

Differential Revision: D7977834

fbshipit-source-id: 62e54f98ee8f9e7d5189fc19c803a95f5c4c43aa
2018-05-12 10:35:27 -07:00
Eli White f19ee28e7d Adding $FlowFixMe to invalid prop accesses
Reviewed By: yungsters

Differential Revision: D7977387

fbshipit-source-id: 442e7445be62f78bdf166a2b97ef031e39877355
2018-05-12 10:35:27 -07:00
Eli White 7ba7acdee7 Surfacing Flow issues around invalid props
Reviewed By: yungsters

Differential Revision: D7977386

fbshipit-source-id: a6df2d75e0caa55a84f9c9c6860f622942955dfc
2018-05-12 10:35:27 -07:00
Eli White 65c336f38f Make ViewProps Exact
Reviewed By: yungsters

Differential Revision: D7976755

fbshipit-source-id: f6a0da1023a9235763c7ecb3ca7a9238887d0471
2018-05-12 10:35:27 -07:00
Eli White bc658d3c44 Spread TVViewProps into ViewProps instead of intersection
Reviewed By: yungsters

Differential Revision: D7976556

fbshipit-source-id: ca2f6bcac249a937523c4b50add8960085a8be49
2018-05-12 10:35:26 -07:00
Eli White d01ab66b47 Prettier React Native Libraries
Reviewed By: sahrens

Differential Revision: D7961488

fbshipit-source-id: 05f9b8b0b91ae77f9040a5321ccc18f7c3c1ce9a
2018-05-10 19:10:38 -07:00
Tim Yung 11cc7be821 RN: Switch `ProgressBarAndroid` to `React.forwardRef`
Reviewed By: sahrens

Differential Revision: D7904339

fbshipit-source-id: a4fe54acee7af12f1bc9b7c0d5e02a690f57ca0d
2018-05-09 15:42:54 -07:00
Tim Yung e708010d18 RN: Switch `Text` to `React.forwardRef`
Reviewed By: sahrens

Differential Revision: D7902262

fbshipit-source-id: 218f95cde6d77f21d9362a2f2bd47c5f83d5ee15
2018-05-09 01:16:12 -07:00
Tim Yung 6a1b41643a RN: Consistently Throw for <Text><View /></Text>
Reviewed By: sahrens

Differential Revision: D7898238

fbshipit-source-id: a2b74e691a116b1beae3c6bb266252a722aacbb1
2018-05-09 01:16:11 -07:00
Tim Yung 3e534b9aab RN: Switch `View` to `React.forwardRef`
Reviewed By: bvaughn, sophiebits

Differential Revision: D7896711

fbshipit-source-id: c10c8a14a00ac2d67605e6e4fe1a341b4688fdd8
2018-05-09 01:16:11 -07:00
Tim Yung e1339bc183 RN: Replace `context.isInAParentText` w/ React.createContext
Reviewed By: sahrens

Differential Revision: D7895382

fbshipit-source-id: 4affcecd147b8e8c506e0d94f223bac3e6dfdf66
2018-05-09 01:16:11 -07:00
Tim Yung 820673e707 RN: Simplify `verifyPropTypes`
Reviewed By: sahrens

Differential Revision: D7893675

fbshipit-source-id: 74d1eff57201a2af4a12c39c4335e28ff9f14090
2018-05-07 16:48:24 -07:00
David Vacca 23f8f7aecb Breaking Change: Restrict WebView to only manage navigation of whitelisted URLs: http(s) by default
Reviewed By: achen1

Differential Revision: D7834050

fbshipit-source-id: 80f7fd3cd20979590b75804819e154afc14a3c64
2018-05-04 23:18:14 -07:00