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

1561 Коммитов

Автор SHA1 Сообщение Дата
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
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
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
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 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
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
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
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
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
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
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
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
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
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
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
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
Tim Yung 2becdfd404 RN: Delete `TextInput.selectionState` Prop
Summary:
Deletes the `selectionState` prop from `TextInput`.

It does not provide meaningful value over `onBlur`, `onFocus`, and `selectionState`.

Changelog:
[Breaking][TextInput] Removing `selectionState` prop, use `onBlur`, `onFocus`, and `onUpdate` instead.

Reviewed By: zackargyle, TheSavior

Differential Revision: D17879667

fbshipit-source-id: 03a4e239406932adad898d6d2a092e3bc2e6b064
2019-10-12 15:52:25 -07:00
Eli White db662af5b2 Fix ref type for Native Scroll View
Summary: These types were wrong, this is a HostComponent, not a ReactNative.NativeComponent

Reviewed By: lunaleaps

Differential Revision: D17862305

fbshipit-source-id: e1e7acc7a5892f124b07cdc39d73d6ce7d414063
2019-10-11 11:46:00 -07:00
Eli White 5d2de9e54e ScrollView: Fix flow type for StickyHeaderComponentType
Summary: The instance type wasn't being set properly. Using AbstractComponent

Reviewed By: lunaleaps

Differential Revision: D17859988

fbshipit-source-id: 95e2098a7218afeaf3f6ee39ba2b69170ee2f54c
2019-10-11 09:49:29 -07:00
Eli White dd3bf0545a Change ScrollView event flow types to support spreading
Summary: These need to be both optional and nullable to support spreading props like `<ScrollView {...props} />` where these types are optional in a parent component.

Reviewed By: lunaleaps

Differential Revision: D17859633

fbshipit-source-id: 093456d13ee041473a4605e62bf48b3510b49b8f
2019-10-11 09:49:29 -07:00
Eli White fb5276c189 Remove duplicate flow type for TouchableProps
Summary: These are already defined as part of ViewProps. They don't need to be duplicated

Reviewed By: lunaleaps

Differential Revision: D17859553

fbshipit-source-id: c3de534526efd94c0a9ff2c772a4d92c6164815b
2019-10-11 09:49:28 -07:00
Sharon Gong 3042407f43 Add accessibilityValue prop on Touchables (#26752)
Summary:
AccessibilityValue support was added for view in PR[https://github.com/facebook/react-native/issues/26169](https://github.com/facebook/react-native/pull/26169). This patch is to extend the support for all touchables.

## Changelog

[General] [Added] - Add accessibilityValue prop on Touchables
Pull Request resolved: https://github.com/facebook/react-native/pull/26752

Test Plan: Modify one accessibility value example to use Touchable in AccessibilityExample.js.

Differential Revision: D17878614

Pulled By: mdvacca

fbshipit-source-id: ef201225f7dfbb2c6054102ab22fa151499656d5
2019-10-11 08:59:59 -07:00
Pavel Jacko b61583a780 Elements no longer focusable on tvOS (#26775)
Summary:
This PR fixes broken focus on tvOS due to `isTVSelectable` and `tvParallaxProperties` not being available in validAttributes definition object of ReactNativeViewViewConfig

## Changelog

[ios] [Fixed] - elements no longer focusable on tvOS
Pull Request resolved: https://github.com/facebook/react-native/pull/26775

Test Plan:
```
import React from 'react';
import {
    StyleSheet,
    View,
    Text,
    TouchableOpacity
} from 'react-native';

const parallax = {
    enabled: true,
    shiftDistanceY: 2,
    shiftDistanceX: 2,
    tiltAngle: 0.05,
    pressMagnification: 1,
    magnification: 1.1,
};

const Button: () => React$Node = () => (
    <TouchableOpacity style={styles.buttonx} tvParallaxProperties={parallax}>
        <Text>
Touchable Button
        </Text>
    </TouchableOpacity>
);

const App: () => React$Node = () => (
    <View style={styles.wrapper}>
        <Button />
        <Button />
        <Button />
        <Button />
        <Button />
        <Button />
        <Button />
    </View>
);

const styles = StyleSheet.create({
    buttonx: {
        backgroundColor: 'red',
        height: 100,
        width: 500
    },
    wrapper: {
        justifyContent: 'center',
        flex: 1,
        alignItems: 'center'
    }
});

export default App;
```

![Oct-08-2019 12-11-19](https://user-images.githubusercontent.com/4638697/66459930-3d7aa880-ea76-11e9-9b94-686094dc8667.gif)

Differential Revision: D17845058

Pulled By: TheSavior

fbshipit-source-id: b6c71d370efd6cf7763ab3a98bbfe1630f789821
2019-10-09 17:49:41 -07:00
Rick Hanlon 2fbcdad09c Revert TextInput back to old setNativeProps API
Summary: Reverts D14176217 so we can do the partial React sync in the next diff which removes this API

Reviewed By: TheSavior

Differential Revision: D17828977

fbshipit-source-id: 7dd98c19890aeee0a153746ce65fd3b148b4ca7b
2019-10-09 09:37:02 -07:00
Eli White d576a5bcc0 Fix bug where ScrollView contentInset top set to undefined wouldn't default to 0
Summary:
If you passed
```
contentInset: { bottom: 10 }
```

then it wouldn't go into the if case and it could try to call `setOffset` with `undefined`. `setOffset` requires a number.

Changelog:
[Fix][ScrollView] ScrollView contentInset top now defaults to 0 in expected situations

Reviewed By: JoshuaGross

Differential Revision: D17796155

fbshipit-source-id: 951dbbb0de1052f64a6835963e8bbc564990c120
2019-10-07 15:31:54 -07:00
Eli White 15be1448f7 Remove unused scrollResponderHandleTerminate from ScrollView
Summary:
This function doesn't exist on the scroll responder so this prop is being set to undefined.

As this is an event, not setting the prop just means that nothing will listen to the event.

Changelog:
[Internal]

Reviewed By: JoshuaGross

Differential Revision: D17795678

fbshipit-source-id: 73f2c125e0868e19258b43e3a053447be3f5e768
2019-10-07 15:31:54 -07:00
Samuel Susla 9cefc96e43 Remove redundant props from Picker
Summary: Props are being ignored on native side, let's get rid of them.

Reviewed By: TheSavior

Differential Revision: D17765185

fbshipit-source-id: d3625dd25d2e41a49e701d54fe9a7b74cd47786c
2019-10-07 11:34:50 -07:00
Oleksandr Melnykov 3560093115 Add setNativeValue command to ReactSwitchManager
Summary: Fabric doesn't support setNativeProps, so we have to use commands instead to set the value of the native component.

Reviewed By: JoshuaGross

Differential Revision: D17736274

fbshipit-source-id: 18c47365926c3c2cfc3551f4b5b6cc72e4162367
2019-10-07 03:54:09 -07:00
Samuel Susla 07fd3125c8 Migrate MVP SafeAreaView to Fabric
Reviewed By: shergin

Differential Revision: D17736209

fbshipit-source-id: e70c309f2599cdcb8f234d96915546032b71d223
2019-10-04 07:07:36 -07:00
Eli White 21f1cce148 Remove unused code
Summary:
There are some unused imports and variables. This was flagged by running
```
$ js1 lint --only "no-unused-vars: [1, {vars: 'all', args: 'none', ignoreRestSiblings: true}]" ~/fbsource/xplat/js/react-native-github --only "react/jsx-uses-vars" --only "react/jsx-uses-react" --fast
```

Changelog:
Internal

Reviewed By: zackargyle, JoshuaGross

Differential Revision: D17724836

fbshipit-source-id: 2b6a44f55c878d659c9c23f5878ba34f21f8bb69
2019-10-03 14:33:59 -07:00
Oleksandr Melnykov d0dd1aed29 Integrate AndroidSwitch into Fabric on Android
Summary:
In this diff we integrate the Switch component on Android in Fabric. Since the component has a custom measure function, we need to write some C++ to call the measure method in Java.

The component isn't fully functional yet (setNativeProps isn't supported in Fabric) and has some problems with measuring itself. I will fix the component in the next diffs in this stack.

Reviewed By: JoshuaGross

Differential Revision: D17571258

fbshipit-source-id: be4e201495b9b197ddec44ee3484357bfb6225a8
2019-10-03 03:15:20 -07:00
Eli White da8ae011bb Fix exception in scrollResponderScrollNativeHandleToKeyboard when ref is null
Summary:
We are seeing these errors in prod:

```
TypeError: Cannot read property '_nativeTag' of null

at
ReactNativeFiberHostComponent.prototype.measureLayout(ReactNativeRenderer-prod.fb.js:1594)
ScrollResponderMixin.scrollResponderScrollNativeHandleToKeyboard(ScrollResponder.js:557)
```

This error is coming from these lines: 69c38e5a63/Libraries/Components/ScrollResponder.js (L563-L567)

Either `nodeHandle` is null or `this.getInnerViewRef()`. If `nodeHandle` was null, we'd get an error that we can't call `measureLayout` on null. So `this.getInnerViewRef()` must be null.

In the React Native Renderer this error of `_nativeTag of null` is coming from this line: db8afe4f63/packages/react-native-renderer/src/ReactNativeFiberHostComponent.js (L84)

Which means indeed `this.getInnerViewRef()` is null.

So adding a null check here which is what we do at all the other product callsites of `measureLayout`. Flow should have caught this, but because ScrollView is one of the only components left using mixins (ScrollResponder), `this.getInnerViewRef` is typed as `any` instead of what it should be:

```
?React.ElementRef<Class<ReactNative.NativeComponent<mixed>>>
```

If `scrollResponder` was typed correctly then Flow would have caught this.

Changelog:
[Fixed] Exception in scrollResponderScrollNativeHandleToKeyboard when ref is null

Reviewed By: mmmulani

Differential Revision: D17717150

fbshipit-source-id: d7bc4c897ad259fb588e8100f37ccfb8a5d07874
2019-10-02 11:28:50 -07:00
Roshan Gautam 9caf99162d Fixes button partially showing when parent view height is 0 (#26435)
Summary:
When the parent view that wraps a button has height 0, the button is still shown partially because of the padding given for text inside Button component for iOS. Here is the issue raised for that:
https://github.com/facebook/react-native/issues/26421

Probably, we should not hard code these values, rather provide a way to provide custom style ? This is my first PR so not making big change. :D

## Changelog

[iOS] [Fixed] - Give margin instead of padding to text in Button component
Pull Request resolved: https://github.com/facebook/react-native/pull/26435

Test Plan:
When using this block of code,
```
<View style={{height:0}}>
    <Button title="There is an issue"></Button>
</View>
```
Before:
<img width="284" alt="image" src="https://user-images.githubusercontent.com/5866078/64905271-6c129700-d6f5-11e9-86c1-c301eb8123f3.png">

After:
<img width="283" alt="image" src="https://user-images.githubusercontent.com/5866078/64905284-8cdaec80-d6f5-11e9-9589-28d8d01c8ba1.png">

Differential Revision: D17661181

Pulled By: cpojer

fbshipit-source-id: 62b04123d9edb4d760bd54d96ae0615c1ccff7ab
2019-09-29 19:35:17 -07:00
vasilich 9a2bc71064 Export props type for TextInput component (#26622)
Summary:
Fix for issue https://github.com/facebook/react-native/issues/26263

## Changelog

[JavaScript] [Fixed] - Added an export for TextInput props type
Pull Request resolved: https://github.com/facebook/react-native/pull/26622

Test Plan: This PR does not change user interface

Differential Revision: D17661069

Pulled By: cpojer

fbshipit-source-id: 7a8e0159de9dc9e775eae349d0f1e743155e56db
2019-09-29 18:39:20 -07:00
Eli White a2aa008b33 Remove unused flow suppressions
Summary: I'm trying to clean up core files and finding suppressions that aren't needed. Bulk removing them.

Reviewed By: cpojer

Differential Revision: D17586683

fbshipit-source-id: fc289bd70b0c928b49a75015ecb5aebe8ab4f1da
2019-09-26 08:16:24 -07:00
Logan Daniels 1bfd15ccb6 Re-land stack of D17563110: codemod xplat/js
Summary:
The stack of D17563110 was reverted because it triggered a failing OTA job that wasn't caught at land time.

Fixing the issue by reverting the change to `Route.js` and re-landing the rest of the diff.

Differential Revision: D17564219

fbshipit-source-id: 166b50a163ce8ae226de224882a98c40652e29ac
2019-09-25 14:47:02 -07:00
Eli White 0676ebf79a Migrate NativeComponentType from codegenNativeComponent to HostComponent #2
Summary:
We need to migrate to HostComponent instead of the exported type from codegenNativeComponent which is the same type

Changelog:
[Internal] Migrate NativeComponentType from codegenNativeComponent to HostComponent

Reviewed By: rickhanlonii

Differential Revision: D17563307

fbshipit-source-id: 01c8fea8c67b33bed42ae28ffb8c132be87b9a7a
2019-09-25 11:44:38 -07:00
Eli White 1b4eaeb184 Migrate NativeComponentType from codegenNativeComponent to HostComponent #1
Summary:
We need to migrate to HostComponent, this is the first batch.

Changelog:
[Internal] Migrate NativeComponentType from codegenNativeComponent to HostComponent

Reviewed By: rickhanlonii

Differential Revision: D17562879

fbshipit-source-id: ce1993b64a79cede3598c89ddff0dadf07fde92f
2019-09-25 11:44:38 -07:00
Eli White 69c38e5a63 Introduce flow type to differentiate between HostComponent, NativeMethodsMixin, and NativeComponent
Summary:
In React Native there are three types of "Native" components.

```
createReactClass with NativeMethodsMixin
```
```
class MyComponent extends ReactNative.NativeComponent
```
```
requireNativeComponent('RCTView')
```

The implementation for how to handle all three of these exists in the React Native Renderer. Refs attached to components created via these methods provide a set of functions such as
```
.measure
.measureInWindow
.measureLayout
.setNativeProps
```

These methods have been used for our core components in the repo to provide a consistent API. Many of the APIs in React Native require a `reactTag` to a host component. This is acquired by calling `findNodeHandle` with any component. `findNodeHandle` works with the first two approaches.

For a lot of our new Fabric APIs, we will require passing a ref to a HostComponent directly instead of relying on `findNodeHandle` to tunnel through the component tree as that behavior isn't safe with React concurrent mode.

The goal of this change is to enable us to differentiate between components created with `requireNativeComponent` and the other types. This will be needed to be able to safely type the new APIs.

For existing components that should support being a host component but need to use some JS behavior in a wrapper, they should use `forwardRef`. The majority of React Native's core components were migrated to use `forwardRef` last year. Components that can't use forwardRef will need to have a method like `getNativeRef()` to get access to the underlying host component ref.

Note, we will need follow up changes as well as changes to the React Renderer in the React repo to fully utilize this new type.

Changelog:
[Internal] Flow type to differentiate between HostComponent and NativeMethodsMixin and NativeComponent

Reviewed By: jbrown215

Differential Revision: D17551089

fbshipit-source-id: 7a30b4bb4323156c0b2465ca41fcd05f4315becf
2019-09-25 10:12:38 -07:00
Eli White e028ac7af2 Fix ref and component return types
Summary:
These types aren't robust to changes in the React component type. When we refactor requireNativeComponent these will error. This change is forwards compatible.

Changelog:
[Internal] Improve internal type in DrawerLayoutAndroid

Reviewed By: JoshuaGross

Differential Revision: D17561194

fbshipit-source-id: 470289449b4d5b3148692f1945fb720e1e3972eb
2019-09-24 18:51:46 -07:00
Joshua Gross c16b219456 Revert D17518337: [flow][types-first] Export types so codemod can use them
Differential Revision:
D17518337

Original commit changeset: 253bf0fb4955

fbshipit-source-id: 4bd08c1061f6759f08f1186f5bd5a2c207c96315
2019-09-24 17:21:30 -07:00
Logan Daniels 4f7659d675 Export types so codemod can use them
Reviewed By: panagosg7

Differential Revision: D17518337

fbshipit-source-id: 253bf0fb4955efc7788be1bc4e662bed37e67acf
2019-09-24 10:00:59 -07:00
Luna Wei 9cd2a5f86e Create ScrollViewCommands
Summary: Use NativeCommands interface to dispatch command for ScrollViewManager

Reviewed By: TheSavior

Differential Revision: D17077016

fbshipit-source-id: 3f16b0ab212a7de31ebde1515aafb137ac4f8001
2019-09-23 15:25:30 -07:00
Daniel 21890e964d Fix onPress prop for Touchable Components being called twice on Android Tv (#26474)
Summary:
Due to an update to react-native on the  android tv platform tapping the select button on a remote calls the onPress prop twice for `TouchableHighlight`, `TouchableOpacity`, and `TouchableWithoutFeedback`. This is happening because touchableHandlePress gets called from two places. First from the onClick prop in the touchable component and second from the TVEventHandler in the TouchableMixin.

## Changelog

[Android] [Fixed] - Adds a not android check to the select case of the TVEventHandler callback in the TouchableMixin.
Pull Request resolved: https://github.com/facebook/react-native/pull/26474

Test Plan:
Confirmed on Android Tv and Apple Tv

1) Add a TouchableOpacity to a screen with an onPress callback
2) Run app
3) Focus the TouchableOpacity
4) Press the Select Button on the Remote

**Expected Results**
onPress is called once

Differential Revision: D17530170

Pulled By: TheSavior

fbshipit-source-id: b776faba477c6231ad296abd21f072335dca5556
2019-09-23 14:46:41 -07:00
Oleksandr Melnykov 5cfe588993 Use generated Java delegate for setting properties on ReactSwitchManager
Summary: This diff migrates `ReactSwtichManager` to use the generated `ReactSwtichManagerDelegate` for setting its properties.

Reviewed By: TheSavior

Differential Revision: D17395067

fbshipit-source-id: 1489c5d08cef860030ecbd23ef19bd8de1328d71
2019-09-23 07:18:10 -07:00
Oleksandr Melnykov 81f567d4aa Use generated Java delegate for setting properties on ReactDrawerLayoutManager
Summary: This diff migrates `ReactDrawerLayoutManager` to use the generated `AndroidDrawerLayoutManagerDelegate` for setting its properties.

Reviewed By: mdvacca

Differential Revision: D17343383

fbshipit-source-id: 85cd7ee3531b152da2601048f5e458f5dad73ad6
2019-09-23 07:18:10 -07:00
Oleksandr Melnykov 2e7545cf7e Use generated Java delegate for setting properties on ReactProgressBarViewManager
Summary: This diff migrates `ReactProgressBarViewManager` to use the generated `AndroidProgressBarManagerDelegate` for setting its properties.

Reviewed By: JoshuaGross, mdvacca

Differential Revision: D17315619

fbshipit-source-id: 6293c6fc18567a934b6f3dce9b77abcc408052d8
2019-09-23 07:18:09 -07:00
Oleksandr Melnykov 23557d1f9a Flow type AndroidSwitch and generate Android OSS classes
Summary: This diff adds Flow types to `AndroidSwitchNativeComponent`.

Reviewed By: TheSavior

Differential Revision: D17205083

fbshipit-source-id: 3d11f11e269388b78a5f0ed528be94df04f9719d
2019-09-23 07:18:09 -07:00
Oleksandr Melnykov ef3b16ef6d Use generated Java delegate for setting properties on SwipeRefreshLayoutManager
Summary: This diff migrates `SwipeRefreshLayoutManager` to use the generated `AndroidSwipeRefreshLayoutManagerDelegate`.

Reviewed By: JoshuaGross, mdvacca

Differential Revision: D17225894

fbshipit-source-id: e659d2a9cb5dba42c589559f61a0e98330e21612
2019-09-23 07:18:08 -07:00
Oleksandr Melnykov 5925b3d408 Use generated Java delegate for setting properties on ReactSliderManager
Summary: This diff migrates `ReactSliderManager` to use the generated `SliderManagerDelegate` for setting its properties.

Reviewed By: mdvacca

Differential Revision: D17203078

fbshipit-source-id: 726736ef275074ecb799b334342ac64976153e2b
2019-09-23 07:18:07 -07:00
Eli White eb7dbc8532 Generate doc info for RN components
Summary:
We used to generate the documentation for the website but moved the docs to another repo.

There is some work on the docs to be able to ingest info from this repo in order to go back to generating API information. The current thinking is we will generate this JSON file and the website repo will pull it in to generate the docs.

I plan to make the script run on CI and fail if the generated file isn't updated, in a follow up PR.

Reviewed By: zackargyle

Differential Revision: D17183936

fbshipit-source-id: 99ce3fa5d7becc0ef20df5d439b175eedbe546f3
2019-09-19 18:36:25 -07:00
Eli White 0baacbecf5 Migrate scrollResponderScrollNativeHandleToKeyboard function to take nativeRef
Summary:
We need to get rid of findNodeHandle calls so migrating scrollResponderScrollNativeHandleToKeyboard to take a ref to a host component.

I made this change with Flow, and tested by rendering UserJobApplicationForm

Reviewed By: mdvacca

Differential Revision: D17099280

fbshipit-source-id: 96af692006aace2c206f268f5416984b00f8a438
2019-09-19 18:16:20 -07:00
Ruriko Araki b782934f3f Fix excessive toggles on the Switch component (#26496)
Summary:
In Windows, if you clicked on a Switch component to toggle it, you could see it "shimmy" back and forth once before settling. The native Switch ends up toggling three times every time it's invoked.

`Switch.js` prevents the native switch from toggling to the new value by explicitly setting the switch to `this.props.value` when it receives an `onChange` event. The re-setting of the value wasn't fast enough to prevent the `Switch` from starting to toggle, causing the visual shimmy.

The solution is taken from `TextInput`. `TextInput.js` stores `_lastNativeText` when it receives an `onChange` event. In `componentDidUpdate`, it puts `this.props.text` back on the native textbox if the value of `this.props.text` isn't the same as `_lastNativeText`, which is how it ensures that it is a controlled component. Porting this to the `Switch` results in only one toggle happening per invoke, removing the shimmy, while preserving the controlled component behavior.

This bug is not visible on Android or iOS, only Windows, however the code causing the bug was in `Switch.js` and it seems reasonable to avoid changing the value of the native switch excessively.

## Changelog

[General] [Fixed] - Fix excessive toggles on the Switch component
Pull Request resolved: https://github.com/facebook/react-native/pull/26496

Test Plan: Used RNTester on Android and iOS to test the Switch component and made sure that all scenarios behave as expected visually. Also ensured through the debugger that the value of the native switch is only being changed once, instead of three times.

Reviewed By: TheSavior

Differential Revision: D17468905

Pulled By: JoshuaGross

fbshipit-source-id: 92bf511510306968c3573ee4eed6df009850fd77
2019-09-19 12:46:23 -07:00
Eli White 523ab83338 Add deprecation warning to AccessibilityInfo.fetch
Summary: This was already deprecated, but without a message.

Reviewed By: zackargyle, ejanzer

Differential Revision: D17180347

fbshipit-source-id: 44aa5d1821e56f7600033e82062c4661fe663471
2019-09-18 18:34:45 -07:00
Marc Mulcahy 7df3eea1a7 Add accessibilityValueDescription support. (#26169)
Summary:
React Native components need a mechanism to specify their value to assistive technologies. This PR adds the notion of accessibilityValueDescription-- a property which either contains a textual description of a component's value, or for range-based components, such as sliders and progress bars, it contains range information (minimum, current, and maximum).

On iOS, the range-based info if present is converted into a percentage and added to the accessibilityValue property of the UIView. If text is present as part of the accessibilityValueDescription, it is used instead of the range-based information.

On Android, any range-based information in accessibilityValueDescription is exposed in the AccessibilityNodeInfo's RangeInfo. Text which is part of accessibilityValueDescription is appended to the content description.

## Changelog

[GENERAL] [Change] - add accessibilityValuedescription property.
Pull Request resolved: https://github.com/facebook/react-native/pull/26169

Test Plan: Added two new accessibility examples to RNTester, one which uses text and another which uses range-based info in accessibilityValueDescription. Verified that they both behave correctly on both Android and iOS.

Differential Revision: D17444730

Pulled By: cpojer

fbshipit-source-id: 1fb3252a90f88f7cafe1cbf7db08c03f14cc2321
2019-09-18 03:16:42 -07:00
Eli White c7e89909da Remove scrollWithoutAnimationTo from ScrollView
Summary: This function was deprecated in Dec 2016. It has no callsites at FB and should be deleted.

Reviewed By: zackargyle, ejanzer

Differential Revision: D17180174

fbshipit-source-id: de3ab78c469220b629ef7f6773d60507959f6db6
2019-09-17 19:25:11 -07:00
empyrical e98a4b5eff AndroidTextInputNativeComponent: Make event properties ReadOnly (#26469)
Summary:
This pull request makes properties of events' Flow types in `AndroidTextInputNativeComponent` be `$ReadOnly`.

This will make them more compatible with the callback types in `TextInput`.

## Changelog

[Internal] [Changed] - Made properties of events' Flow types in `AndroidTextInputNativeComponent` readonly
Pull Request resolved: https://github.com/facebook/react-native/pull/26469

Test Plan:
`yarn flow-check-ios` and `yarn flow-check-android` both pass.

No regressions to running `scripts/generate-rncore.sh` have been noted.

Differential Revision: D17435579

Pulled By: TheSavior

fbshipit-source-id: 92e6c0623c4dd3fe06ebfb22dc73916bf5917bcc
2019-09-17 16:32:11 -07:00
Christoph Nakazawa dbf070c51e Remove TimePickerAndroid from React Native
Summary: Lean Core

Reviewed By: rubennorte

Differential Revision: D17344045

fbshipit-source-id: a5a7ab41075da93f8a1929059abe183838b00c82
2019-09-13 07:47:58 -07:00
Joshua Gross e6b11e0953 AndroidTextInput: remove enum todos from flow typing
Summary: It looks like codegen supports string enums as long as defaults are provided. Uncommenting the enums and removing TODOs.

Reviewed By: rickhanlonii

Differential Revision: D17196139

fbshipit-source-id: a076b1a25eb38b23cfd53fd92e8c42f121d08d6b
2019-09-04 23:20:15 -07:00
Rick Hanlon 69020a8e87 Add back accessibilityStates until next release
Reviewed By: fkgozali

Differential Revision: D17196525

fbshipit-source-id: 56445ea34b3f0d55ac05e17034a969e3bfea0150
2019-09-04 20:14:26 -07:00
David Vacca 1ee811c951 Revert D17170140: [Fabric][JS] Use SoundManager in Pressability and Touchable
Differential Revision:
D17170140

Original commit changeset: 33a8ca508ec3

fbshipit-source-id: ec7dbded4caf3e9efd61e0c3370c894e8a9c054d
2019-09-04 06:43:18 -07:00
David Vacca de2572ce12 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

Reviewed By: rickhanlonii, JoshuaGross

Differential Revision: D17170140

fbshipit-source-id: 33a8ca508ec31f034c76fb0ac4107150d43c608b
2019-09-03 18:56:17 -07:00
Marc Mulcahy 7b35f427fd Remove deprecated accessibilityStates property. (#26168)
Summary:
We added the accessibilityState property as a more semantically rich way for components to describe information about their state to accessibility services. This PR removes the old accessibilityStates property.

 <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->

## Changelog

[General] [Change] - Remove accessibilityStates property.
Pull Request resolved: https://github.com/facebook/react-native/pull/26168

Test Plan: Ensure that RNTester accessibility examples function properly on both iOS and Android.

Differential Revision: D17152891

Pulled By: cpojer

fbshipit-source-id: d71d3cf0f2e0846979d2ba104b6c69e4e5725252
2019-09-02 11:25:31 -07:00
Joshua Gross ba56fa43f0 Flow type and codegen for AndroidTextInput
Summary: Flow type for AndroidTextInput. This could theoretically be used for the interface codegen in the future, and I did use this to codegen the scaffolding for AndroidTextInput (see previous diffs).

Reviewed By: mdvacca

Differential Revision: D16926831

fbshipit-source-id: d01c2e041efb4151f6091dd0fea191989d133881
2019-08-30 22:39:57 -07:00
Eli White f8e5093823 Improve Flow Type for ScrollResponder
Summary: FlatList and VirtualizedList were typing this value as any instead of using the actual type from ScrollView. I started with that change and then fixed the type to solve the other callsites in the codebase.

Reviewed By: zackargyle

Differential Revision: D17089934

fbshipit-source-id: bfc22cec9993904d779cad37b1de7cb3c0484d2c
2019-08-28 13:15:29 -07:00
Eli White c526b3ff14 Back out "Migrate TouchableNativeFeedback to use codegenNativeCommands"
Summary:
Reverting D16909622 and D16909622 due to T53098065. This change made TouchableNativeFeedback a bit less resilient to non native components being passed as the child. We probably need to handle this migration a little bit safer.

Original commit changeset: 902528623742

Differential Revision: D17096765

fbshipit-source-id: e3fc1a21504459b6d7ea5442c4bc926bbd77379d
2019-08-28 12:41:23 -07:00
André Krüger 51aacd5241 Implement fading edges for ScrollView and it's dependent FlatList (#26163)
Summary:
This should add props for enabling horizontal and vertical fading
edges for Scrollview and FlatList.
These fading edges are used to communicate to the user that there is more content to see.

## Changelog

[Android] [Added] - fading edges props to the FlatList and ScrollView components
Pull Request resolved: https://github.com/facebook/react-native/pull/26163

Test Plan:
Open the React Native test app and navigate to the FlatList section.
Enable the `useFadingEdges` switch and insert a number into `Fading edge length`.

![device-2019-08-23-123745](https://user-images.githubusercontent.com/222393/63587150-7385cb00-c5a3-11e9-98dc-bffe8276d30c.png)
![device-2019-08-23-123844](https://user-images.githubusercontent.com/222393/63587156-75e82500-c5a3-11e9-9e9f-66876ac8f506.png)

Differential Revision: D17080676

Pulled By: TheSavior

fbshipit-source-id: 91df629c17052d43c99145672e9084e1379a4113
2019-08-27 18:37:04 -07:00
Luna Wei 25f6be109b zoomToRect convert to command
Summary: Convert this to a UIManager command

Reviewed By: TheSavior

Differential Revision: D16973257

fbshipit-source-id: 0e129c17926229fc20d020e3c0e52a36b0b405d2
2019-08-27 09:28:03 -07:00
Spencer Ahrens 8e04a1485f Back out "[react-native][PR] [Android] Implement fading edges for ScrollView and it's dependent FlatList"
Summary:
After some thought, we decided we don't need the flexibility of
separate horizontal and vertical props - it would be much nicer
to just have a single prop for the edge length and then the native
code can enable the booleans as appropriate.

Original PR: https://github.com/facebook/react-native/pull/26163

Original commit changeset: f72a9a890d90

Reviewed By: TheSavior

Differential Revision: D16997468

fbshipit-source-id: 7973262287a7ec2cee5957f8dc1806a0f28c1432
2019-08-23 17:11:17 -07:00
André Krüger f8a64f9d61 Implement fading edges for ScrollView and it's dependent FlatList (#26163)
Summary:
This should add props for enabling horizontal and vertical fading
edges for Scrollview and FlatList.
These fading edges are used to communicate to the user that there is more content to see.

## Changelog

[Android] [Added] - fading edges props to the FlatList and ScrollView components
Pull Request resolved: https://github.com/facebook/react-native/pull/26163

Test Plan:
Open the React Native test app and navigate to the FlatList section.
Enable the `useFadingEdges` switch and insert a number into `Fading edge length`.

![device-2019-08-23-123745](https://user-images.githubusercontent.com/222393/63587150-7385cb00-c5a3-11e9-98dc-bffe8276d30c.png)
![device-2019-08-23-123844](https://user-images.githubusercontent.com/222393/63587156-75e82500-c5a3-11e9-9e9f-66876ac8f506.png)

Differential Revision: D16992488

Pulled By: sahrens

fbshipit-source-id: f72a9a890d9056bb017cc5747c6f66b7c35633dd
2019-08-23 13:02:52 -07:00
Peter Argany f229d67498 Make RCTAccessibilityManger a TurboModule
Summary:
Move RCTAccessibilityManager to CoreModules (since that's the only dir that supports TM).

Fixup some variable names to match spec.

Reviewed By: RSNara

Differential Revision: D16861739

fbshipit-source-id: a0a53b221dcc172979d1f2c83851ab92e23f2333
2019-08-23 12:01:52 -07:00
Logan Daniels b6333f79e1 Final fixes and seal xplat/js/react-native-github
Reviewed By: panagosg7

Differential Revision: D16946423

fbshipit-source-id: 89ca82c955e99a23a14984d51f3c97346c363afd
2019-08-23 08:45:11 -07:00
glevi@fb.com 97b42bb142 Deploy v0.106.0 to xplat/js
Reviewed By: mroch

Differential Revision: D16979246

fbshipit-source-id: 995fbd391823eaf0c9e3a673cf8fbe061ce0545a
2019-08-23 08:06:44 -07:00
Eli White 2f7732b145 Migrate TouchableNativeFeedback to use codegenNativeCommands
Summary:
Instead of dispatching the command with findNodeHandle and the UIManager, go through the new API. This is safe because codegenNativeCommands can work at runtime as well as with the babel transform.

Changelog:
[Internal]

Reviewed By: rickhanlonii

Differential Revision: D16909599

fbshipit-source-id: 90252862374290dbeb7202483fa585b6a7051c12
2019-08-22 14:02:16 -07:00
Eli White 3b7eb7ed85 Fix Flowtype for Command refs
Summary:
The types we were using before weren't very strict and it had been on my list to fix this. I *think* this is the right type. With Flow's type first project having these exported types will be necessary anyways so we can just use that for the ref.

Changelog:
[Internal]

Reviewed By: JoshuaGross

Differential Revision: D16930573

fbshipit-source-id: 05c1e097794633a2cefa7384c9d81ab15a63d8af
2019-08-22 12:07:50 -07:00
Rubén Norte d2213c75ff Define type signature for react-native-implementation
Summary: Explicitly define the types of the getters in `react-native-implementation` so we can enable Flow's types-first mode for that file.

Reviewed By: cpojer

Differential Revision: D16937607

fbshipit-source-id: 2e4cf483043a53c5407254ffa2b3211d40211019
2019-08-21 19:03:07 -07:00
Rubén Norte bc4825ee9d Fix typing for ProgressBarAndroid
Summary: `ProgressBarAndroid` exported the wrong type and Flow wasn't catching some issues with it because they were hidden by a `$FlowFixMe` annotation. This exports the right type and fixes the bad usages.

Differential Revision: D16938853

fbshipit-source-id: 7ea4bbf379a010a76dc68ccb405e1f890d7e590a
2019-08-21 19:03:06 -07:00
Logan Daniels 92073d4a71 Clean-up $TEMPORARY$object in xplat/js/react-native-github
Reviewed By: panagosg7

Differential Revision: D16931667

fbshipit-source-id: d87e5ed02bf7f95005cf0f36c3cd127026189058
2019-08-21 09:58:24 -07:00
Joshua Gross 1013a01049 TextInput: include AndroidTextInputNativeComponent instead of calling requireNativeComponent directly
Summary: Include AndroidTextInputNativeComponent so we can rely on codegen and flow typing in a future diff.

Reviewed By: TheSavior

Differential Revision: D16903634

fbshipit-source-id: 767d7c854533d641eb7fcb2147bf584621581411
2019-08-20 10:34:14 -07:00
Tim Yung 9a3d722ccb RN: Delete Long Press Error in Touchable
Summary: This error is not actionable or valuable right now.

Reviewed By: cpojer

Differential Revision: D16859423

fbshipit-source-id: b25504a9556b4d3102b35b2bffcd2d01566e0399
2019-08-16 10:53:23 -07:00
empyrical 0057cc9bf2 Deprecate Text proptypes (#26055)
Summary:
This pull request moves `Text`'s prop types to the `DeprecatedPropTypes` folder.

This was already partly in progress - there were redundant `TextPropTypes` and `DeprecatedTextPropTypes` files so I removed one, and made sure the version with the doc strings was the one used.

## Changelog

[General] [Deprecated] - Move `Text` component's proptypes to DeprecatedPropTypes
Pull Request resolved: https://github.com/facebook/react-native/pull/26055

Test Plan: Flow checks pass for iOS and Android

Differential Revision: D16801078

Pulled By: TheSavior

fbshipit-source-id: ef19300945d48d0a4a83d728ee32cdf7d1c0f0cc
2019-08-14 17:34:07 -07:00