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

76 Коммитов

Автор SHA1 Сообщение Дата
Logan Daniels 91f139b941 xplat/js/react-native-github
Reviewed By: panagosg7

Differential Revision: D16657770

fbshipit-source-id: 4e260842c838a35317515044c54ccf55a083da33
2019-08-09 10:11:15 -07:00
Logan Daniels 9127fb51fc Manual fixes for xplat/js/react-native-github
Summary:
Need to add explicit type annotations in these areas to unblock types-first architecture for Flow. These are locations the codemod could not automatically handle.

I'll call out areas I need a close eye on in the comments.

Reviewed By: panagosg7

Differential Revision: D16659053

fbshipit-source-id: 167dd2abe093019b128676426374c1c62cf71e7f
2019-08-09 10:11:15 -07:00
Samuel Susla bd2b7d6c03 Fix onDismiss in Modal
Summary:
# Disclaimer:
I might be missing something as the solution I implemented here seems like something that was considered by original author. If this solution isn't good, I have a plan B.

# Problem:
`onDismiss` prop isn't being called once the modal is dismissed, this diff fixes it.

Also I've noticed that `onDismiss` is meant to only work on iOS, why is that? By landing this diff, it'll be called on Android as well so we need to change the docs (https://facebook.github.io/react-native/docs/modal.html#ondismiss).

## Video that shows the problem
Following code is in playground.js P70222409 which just increments number everytime onDismiss is called

{F166303269}

Reviewed By: shergin

Differential Revision: D16109536

fbshipit-source-id: 3fba56f5671912387b217f03b613dffd89614c9d
2019-07-29 11:19:30 -07:00
Min ho Kim 84f5ebe4f9 Fix typos (#25770)
Summary:
Fix typos mostly in comments and some string literals.

## Changelog

[General] [Fixed] - Fix typos
Pull Request resolved: https://github.com/facebook/react-native/pull/25770

Differential Revision: D16437857

Pulled By: cpojer

fbshipit-source-id: ffeb4d6b175e341381352091134f7c97d78c679f
2019-07-23 03:23:11 -07:00
Blair Vanderhoof 45b0907f61 Fix ScrollView context warning in Modal.js
Summary: This fixes the following warning from appearing when you have a FlatList render a Modal where the content of the Modal also contains a FlatList: https://fburl.com/p953k985.  Spencer addressed an issue similar to this in D7863625, but we still get a yellow box due to the fact that `scrollContext` still exists, but `this.context.virtualizedList` is null from this line in Modal.js https://fburl.com/nqc261a1.

Reviewed By: cpojer

Differential Revision: D16160666

fbshipit-source-id: ba222d3eef234f4c8c4c2bddbc71bec27df81e0a
2019-07-10 12:43:13 -07:00
Michał Osadnik fb7b2d3533 Change returning value of DirectEventHandler and BubblingEventHandler to void
Summary:
returning type of Bubbling and Direct Event should be always void of Promise (if async). Other situations shouldn't be permitted.
Reformated all cases when it the function wasn't void.

Reviewed By: rickhanlonii

Differential Revision: D16165962

fbshipit-source-id: 7c1377c3ed4bd54a431a13e5bcda4f7ec0adf4dc
2019-07-10 05:40:20 -07:00
Cory Reed a0acbd638b Export Modal’s Flow types (#25554)
Summary:
I'd like to use `Modal`’s flow types in my application to make a reusable component.

## Changelog

[JavaScript] [Added] - Exported `Modal`’s types
Pull Request resolved: https://github.com/facebook/react-native/pull/25554

Test Plan: n/a

Differential Revision: D16180231

Pulled By: cpojer

fbshipit-source-id: 9cfd5163a187954783102bfe4d9b4d1dbc8c6e6d
2019-07-10 02:22:08 -07:00
Samuel Susla 61563cd902 Delete visible property from ModalHostViewNativeComponent
Summary: Visible property isn't used by native modal, neither in iOS nor in Android

Reviewed By: osdnk

Differential Revision: D16107927

fbshipit-source-id: 6f8b8db11abc0942f5af3abcc0245bc066da8c6b
2019-07-04 03:01:58 -07:00
Michał Osadnik 61e95e5cbf Force WithDefault not to be an optional value
Summary:
`WithDefault` appears not to be required to be prefixed with `?` because it's option value per se.

Fixed tests, removed `?` where needed, updated snapshots and review them. Added mechanism fro throwing error when `?WithDefault` found. Add tests for it.

Reviewed By: rubennorte

Differential Revision: D16048463

fbshipit-source-id: f55ed7454aacf0b8c42944a9b5c1037ad1b360fe
2019-07-02 03:30:55 -07:00
Michał Osadnik 0f83dfab8e Transform BubbleEvent and DirectEvent into DirectEventHandler and BubblingEventHandler
Summary:
It appears that `(e: BubblingEvent<T>) = mixed` exists only in given context and it's pointless to keep in this way. It could be simplified to `BubblingEventHandler<T>` without any negative consequences and that's the motivation of this diff.

The only tradeoff of this decision is leaving an opportunity to declare Bubbling/Direct event in the top of the file bc then analysing the code becomes much more difficult. However, it's not used anywhere so it's not a problem now and probably any time.

Also, changes the names to `DirectEventHandler` and `BubblingEventHandler` which are more related to current state. The names were updated in many places in code.

Reviewed By: rubennorte

Differential Revision: D16054571

fbshipit-source-id: 741d075eb46b80bac8eb73a6b30fc0b448cb3902
2019-07-01 05:13:53 -07:00
Rick Hanlon 3ca19c0481 Remove Schema.js files replaced with flow types
Summary: These files are no longer needed since all files codegen'd use flow types as the source 🎉

Reviewed By: cpojer

Differential Revision: D15961378

fbshipit-source-id: 510a298b2e97cd78a9a3648cbaa239e8134daa75
2019-06-27 08:04:13 -07:00
Eli White 9ad60131ba Support parsing View Commands into the schema
Summary: The schema for these view commands is lifted wholesale from the schema for TurboModules: P67239314

Reviewed By: rickhanlonii

Differential Revision: D15943109

fbshipit-source-id: a0ccd4e47067b62970218df6a32527c15868c4a5
2019-06-24 18:54:41 -07:00
Rick Hanlon 58cd046bb4 Add types for modal
Summary: Adds codegen types and generated view config for Modal

Reviewed By: TheSavior

Differential Revision: D15905324

fbshipit-source-id: b430a782bf03f04b5b86757c58b39ddb28d6f06d
2019-06-23 10:03:54 -07:00
Eric Lewis 18fededae0 add spec for I18nManager (#24908)
Summary:
Part of #24875.

## Changelog

[General] [Added] - add TM spec for I18nManager
Pull Request resolved: https://github.com/facebook/react-native/pull/24908

Reviewed By: fkgozali

Differential Revision: D15395163

Pulled By: RSNara

fbshipit-source-id: 8fd3a5a8ce5d0f74132efff4fae7224eab03405b
2019-05-31 19:56:37 -07:00
James Ide 33ee6f8b99 Add a lint rule to disallow Haste imports (#25058)
Summary:
This is an ESLint plugin that infers whether an import looks like a Haste module name. To keep the linter fast and simple, it does not look in the Haste map. Instead, it looks for uppercase characters in single-name import paths, since npm has disallowed uppercase letters in package names for a long time. There are some false negatives (e.g. "merge" is a Haste module and this linter rule would not pick it up) but those are about 1.1% of the module names in the RN repo, and unit tests and integration tests will fail anyway once Haste is turned off.

You can disable the lint rule on varying granular levels with ESLint's normal disabling/enabling mechanisms.

Also rewrote more Haste imports so that the linter passes (i.e. fixed lint errors as part of this PR).

## Changelog

[General] [Changed] - Add a lint rule to disallow Haste imports
Pull Request resolved: https://github.com/facebook/react-native/pull/25058

Differential Revision: D15515826

Pulled By: cpojer

fbshipit-source-id: d58a3c30dfe0887f8a530e3393af4af5a1ec1cac
2019-05-30 07:45:16 -07:00
Abhinandan Ramaprasath a3479c212a Add specs for ModalManager (#24896)
Summary:
Part of #24875

## Changelog
[General] [Added] - Add TurboModule spec for ModalManager
Pull Request resolved: https://github.com/facebook/react-native/pull/24896

Reviewed By: rickhanlonii

Differential Revision: D15471097

Pulled By: fkgozali

fbshipit-source-id: 99671583ddc2a6fc32fd1bcf9a6e340ad93a27c2
2019-05-29 13:05:45 -07:00
James Ide 0ee5f68929 Migrate "Libraries" from Haste to standard path-based requires (sans vendor & renderers) (#24749)
Summary:
This is the next step in moving RN towards standard path-based requires. All the requires in `Libraries` have been rewritten to use relative requires with a few exceptions, namely, `vendor` and `Renderer/oss` since those need to be changed upstream. This commit uses relative requires instead of `react-native/...` so that if Facebook were to stop syncing out certain folders and therefore remove code from the react-native package, internal code at Facebook would not need to change.

See the umbrella issue at https://github.com/facebook/react-native/issues/24316 for more detail.

[General] [Changed] - Migrate "Libraries" from Haste to standard path-based requires
Pull Request resolved: https://github.com/facebook/react-native/pull/24749

Differential Revision: D15258017

Pulled By: cpojer

fbshipit-source-id: a1f480ea36c05c659b6f37c8f02f6f9216d5a323
2019-05-08 08:48:59 -07:00
Rick Hanlon d06983f737 Add modal kebab-case enum props
Summary: Adds disabled kebab case modal props now that we can safely generate them to cpp

Reviewed By: JoshuaGross, mdvacca

Differential Revision: D15218837

fbshipit-source-id: d712e53f53d91ae14bba9956321530907f67d2e8
2019-05-07 06:29:18 -07:00
David Vacca ecdb239eaa Update styles of Modal container as a pre-requisite to implement Modal on Fabric
Summary:
This diff changes the style of the Modal container style as a pre-requisite to implement Modal on Fabric.
In the current version of React Native the size of the View container is determined at runtime using the size of the screen. The size of this view is set overriding the Widht and Height of this Container View (using the screen size), in Fabric we can not update the size of that view, instead we set the size of the RCTModalHostView to take the size of the whole screen.
Since the RCTModalHostView has an absolute position and it has the size of the screen, making this change should be enough to keep backward compatibility and be able to implement Modal on Fabric

Reviewed By: JoshuaGross

Differential Revision: D15067616

fbshipit-source-id: d7302ef3afc503adfee10e12fb6d0ebd371fb7ed
2019-04-30 15:05:01 -07:00
David Vacca 8e6031cac7 Add component schema for Modal
Summary: This diff adds the spec for Modal components

Reviewed By: rickhanlonii

Differential Revision: D14886904

fbshipit-source-id: 32d54c34e55c4d66338e13f34c2b6ed1e3cfbba7
2019-04-30 01:48:25 -07:00
Brandon Carroll 782dc940a6 add snapshots for mocked and unmocked components part 2 (#24593)
Summary:
Per conversation with TheSavior, in #24538, this adds snapshot tests for more components. Shallow and deep snapshots are included.

[General] [Added] - Snapshots
Pull Request resolved: https://github.com/facebook/react-native/pull/24593

Differential Revision: D15082831

Pulled By: TheSavior

fbshipit-source-id: bc7f27317e2fd0bad133f4ba4d81996d08a12c44
2019-04-25 12:12:34 -07:00
nd-02110114 007e00fa70 RCTModalHostView (#23030)
Summary:
This PR is related to #22990

Changelog:
----------
[iOS] [Changed] - move the call to requireNativeComponent from Modal.js to RCTModalHostViewNativeComponent.js
Pull Request resolved: https://github.com/facebook/react-native/pull/23030

Differential Revision: D13710032

Pulled By: cpojer

fbshipit-source-id: 822284a639f38721442c67ceff98fc99495c31b9
2019-01-17 02:41:59 -08:00
MateusAndrade cc13a7367b Improving Modal `visible` prop check to handle undefined and null (#22072)
Summary:
Changing the the this.props.visible if to be ` if (!!this.props.visible === false)` . So passing undefined, or other values wont set the modal to be visible. Granting that anything that is not true, will set the modal to null on the render.

I make this this PR, because on the company that im working, we used a lot of RN. At the moment, we arent using anything like flow or TS. But to grant that the modals will only show if they are set visible to true i have changed the if made.

_Pull requests that expand test coverage are more likely to get reviewed. Add a test case whenever possible!_
Pull Request resolved: https://github.com/facebook/react-native/pull/22072

Differential Revision: D12918086

Pulled By: TheSavior

fbshipit-source-id: 8f9c63ac6fd56d83949bb8428ad7c5b7bf805c49
2018-11-03 18:44:53 -07:00
Ignacio Olaciregui ae8ec39397 Fix linting issues (#22062)
Summary:
Fixes lots of ESLint warnings. Many of them where in PR #20877 by janicduplessis which requested to split the linting fixes from configuration and package changes.

I solved only the issues that I was most certain about but I would love to get hands on all of them with a little bit of input.
Pull Request resolved: https://github.com/facebook/react-native/pull/22062

Differential Revision: D12889447

Pulled By: TheSavior

fbshipit-source-id: 35f7a08104a5b859c860afdde4af2b32c0685c50
2018-11-01 14:29:16 -07:00
empyrical 6b892141cc Remove PropTypes from Modal.js (#21279)
Summary:
This PR converts the Prop Types in `Modal` to Flow Types, and fills out the callback types a bit more.

Context Types are left in for now.
Pull Request resolved: https://github.com/facebook/react-native/pull/21279

Reviewed By: yungsters

Differential Revision: D10006795

Pulled By: TheSavior

fbshipit-source-id: ac885f2e5f068b0991009a9b1cbb3886e34941af
2018-09-24 15:20:58 -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
Eli White 160bf731e5 Switch to Platform.isTV to pass Android Flow
Reviewed By: sahrens

Differential Revision: D8345911

fbshipit-source-id: 9af7a25127e7c35844a6c59b267a77cf8adba535
2018-06-10 13:45:57 -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 d01ab66b47 Prettier React Native Libraries
Reviewed By: sahrens

Differential Revision: D7961488

fbshipit-source-id: 05f9b8b0b91ae77f9040a5321ccc18f7c3c1ce9a
2018-05-10 19:10:38 -07:00
Eli White 8f5ebe5952 Convert react-native-github/Libraries to let/const
Reviewed By: sahrens

Differential Revision: D7956042

fbshipit-source-id: 221851aa311f3cdd6326497352b366048db0a1bb
2018-05-10 16:16:35 -07:00
Spencer Ahrens 8799047dd0 Fix Modal + FlatList scrolling
Summary:
`FlatList` (actually `VirtualizedList`) allows recursive nesting of itself for easy and complex composition of lists such that it can support seemless virtualization and VPV events. It does this by only rendering a `ScrollView` for the outermost `VirtualizedList` and simply stacking `View`s for all the internal ones.

However, if a `Modal` is in a `FlatList` and also hosts a `FlatList`, e.g.:
```
<FlatList ListFooterComponent={<Modal><Foo /></Modal>} />
```
Then React context will propogate through to the inner `FlatList` and cause it to render as a plain `View`. Because the `Modal` actually portals the views into a different native hierarchy, one without a `ScrollView`, the `FlatList` won't scroll as expected.

The fix is to wipe out the context - not sure if there is a better way, but this doesn't seem terrible.

Differential Revision: D7863625

fbshipit-source-id: 38f41d72ed32b9f0eb1c9c82893f21d83a83f9ad
2018-05-09 13:29:41 -07:00
Rubén Norte d5e9e55fa3 Remove @providesModule from all modules
Summary:
This PR removes the need for having the `providesModule` tags in all the modules in the repository.

It configures Flow, Jest and Metro to get the module names from the filenames (`Libraries/Animated/src/nodes/AnimatedInterpolation.js` => `AnimatedInterpolation`)

* Checked the Flow configuration by running flow on the project root (no errors):

```
yarn flow
```

* Checked the Jest configuration by running the tests with a clean cache:

```
yarn jest --clearCache && yarn test
```

* Checked the Metro configuration by starting the server with a clean cache and requesting some bundles:

```
yarn run start --reset-cache
curl 'localhost:8081/IntegrationTests/AccessibilityManagerTest.bundle?platform=android'
curl 'localhost:8081/Libraries/Alert/Alert.bundle?platform=ios'
```

[INTERNAL] [FEATURE] [All] - Removed providesModule from all modules and configured tools.
Closes https://github.com/facebook/react-native/pull/18995

Reviewed By: mjesun

Differential Revision: D7729509

Pulled By: rubennorte

fbshipit-source-id: 892f760a05ce1fddb088ff0cd2e97e521fb8e825
2018-04-25 07:37:10 -07:00
Mats Byrkeland edb6ca72fd Fix ESLint warnings using 'yarn lint --fix'
Summary:
Hi! I would like to contribute to React Native, and I am just starting out. I forked the repo and found that it has quite a lot of ESLint warnings – many of which were automatically fixable. This PR is simply the result of running `yarn lint --fix` from the root folder.

Most changes are removing trailing spaces from comments.

Haven't really done any manual testing, since I haven't done any code changes manually. `yarn test` runs fine, `yarn flow` runs fine, `yarn prettier` is satisfied.

N/A

[INTERNAL][MINOR][] - Fix ESLint warnings
Closes https://github.com/facebook/react-native/pull/18047

Differential Revision: D7054948

Pulled By: hramos

fbshipit-source-id: d53e692698d1687de5821c3fb5cdb76a5e03b71e
2018-02-22 07:23:17 -08:00
Sophie Alpert 1490ab12ef Update license headers for MIT license
Summary:
Includes React Native and its dependencies Fresco, Metro, and Yoga. Excludes samples/examples/docs.

find: ^(?:( *)|( *(?:[\*~#]|::))( )? *)?Copyright (?:\(c\) )?(\d{4})\b.+Facebook[\s\S]+?BSD[\s\S]+?(?:this source tree|the same directory)\.$
replace: $1$2$3Copyright (c) $4-present, Facebook, Inc.\n$2\n$1$2$3This source code is licensed under the MIT license found in the\n$1$2$3LICENSE file in the root directory of this source tree.

Reviewed By: TheSavior, yungsters

Differential Revision: D7007050

fbshipit-source-id: 37dd6bf0ffec0923bfc99c260bb330683f35553e
2018-02-16 18:31:53 -08:00
Brian Vaughn 6f007e8957 Ran rename-unsafe-lifecycles codemod on xplat/js
Reviewed By: trueadm

Differential Revision: D6889214

fbshipit-source-id: e815cda4b09f3650ae3b0b9a44ae6f5fcb48fe25
2018-02-08 10:58:31 -08:00
Héctor Ramos 28d60b68ad Trim docs that are already present in the open source docs site
Summary:
A lot of these docs are already present in https://github.com/facebook/react-native-website.
Closes https://github.com/facebook/react-native/pull/17776

Differential Revision: D6839783

Pulled By: hramos

fbshipit-source-id: 945fde22afb8f181d0463617d224d3f3429faa24
2018-01-29 16:20:15 -08:00
Mehdi Mulani a389ffbd84 Add onDismiss to Modal.js
Summary: Adds an onDismiss so that navigation events can be chained to the dismissing of a modal.

Reviewed By: sahrens

Differential Revision: D5852953

fbshipit-source-id: a86e36fdd5b0b206c2dd9fa248e2a88da22efa31
2017-09-21 15:01:52 -07:00
Caleb Meredith 90eaeb019b Upgrade fbsource/xplat/js to Flow v0.53.0
Reviewed By: avikchaudhuri

Differential Revision:
D5648819
Ninja: T20988071

fbshipit-source-id: 66e5b6747c79ae66b6eb69d40ede5e982c26174f
2017-08-17 18:45:01 -07:00
Douglas Lowder 0d3039f1a0 Fix for Modal behavior when menu button pressed on Apple TV (Issue #15313)
Summary:
**Motivation**

On Apple TV, pressing the menu button destroys the native view that backs the `Modal` component, causing an app using this component to get into a broken state.  This fix implements `onRequestClose` for tvOS to have the same behavior as it does for the Android back button.

**Test plan**

Manually tested this with the `ModalExample` in the `RNTester` app.  See also the test code in issue #15313.
Closes https://github.com/facebook/react-native/pull/15341

Differential Revision: D5651035

Pulled By: shergin

fbshipit-source-id: 54bf66887bbe85940567e63e90b437ac4a8daf9a
2017-08-17 15:22:12 -07:00
jooddang 91493f6b9d Update Modal.js
Summary:
you don't need curly bracket. `{}`

<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/15198

Differential Revision: D5497867

Pulled By: javache

fbshipit-source-id: a09f06aabc6ea16f0b0eec12bf910ffcab804eb0
2017-07-26 07:18:44 -07:00
Hank Brekke ec68536e08 iOS `presentationStyle` Modal Appearance
Summary:
When using `<Modal` on larger iOS devices, esp. iPad and iPhone 7 Plus devices, there is no way to use the system functionality for controlling the appearance of modals (`presentationStyle`), which improves the native system's animation and display of smaller content appearing within large horizontal space.

I've added a new picker for selecting a `presentationStyle` within  the RNTester app. See below for the appearance of this change, as well as the relevant changes to the RN documentation.

![may-22-2017 09-49-50](https://cloud.githubusercontent.com/assets/3521186/26315020/6d4b1cb0-3ed5-11e7-8ac8-a996f1ee00f9.gif)
<img width="1051" alt="screen shot 2017-05-22 at 9 50 12 am" src="https://cloud.githubusercontent.com/assets/3521186/26315021/6d4cbf7a-3ed5-11e7-9d13-a5d20c9f3533.png">
Closes https://github.com/facebook/react-native/pull/14102

Differential Revision: D5281990

Pulled By: shergin

fbshipit-source-id: 882d8cb79e7adb0b4437cdf26e5e7ab1fc04f4c1
2017-06-20 19:22:57 -07:00
Brian Vaughn 6564edce5e Ran PropTypes -> prop-types codemod against Libraries/FBReactKit/js/react-native-github
Reviewed By: acdlite

Differential Revision: D4876709

fbshipit-source-id: 3a5e92bfc74287b7a9054546c438580bed0147af
2017-04-12 16:15:15 -07:00
Elie Teyssedou 56a4538b31 Update documentation for Modal's prop animationType
Summary:
I was using Modal component and I didn't knew what was the default for animationType prop. After reading the code, I saw that it was `none`.

I did not tell that the "default" is `slide` if animated is set to `true`, because it is not a default but an implementation of `animated` prop effect and because of the deprecation of `animated`.

Thanks.
Closes https://github.com/facebook/react-native/pull/13196

Differential Revision: D4795765

Pulled By: hramos

fbshipit-source-id: 25d62ac7eeb20fc5557918c3d75709f44f5d4972
2017-03-29 11:31:51 -07:00
Üstün Ergenoglu 3785db2fb1 Add property to force HW acceleration on Android for modal windows
Summary:
When using React Native on Android on top of a game as an overlay, dialog windows sometimes get created with hardware acceleration disabled. This causes the UI to be unresponsive and anything that uses a TextureView stops working. Added a property for the modal view to make sure hardware acceleration flag is enabled when it's set to true.

**Test plan (required)**

set `hardwareAccelerated` property for Modal to force hardware acceleration on dialog windows on Android. Does nothing on iOS.
Closes https://github.com/facebook/react-native/pull/11421

Differential Revision: D4312912

Pulled By: andreicoman11

fbshipit-source-id: 9db6b2eca361421b92b24234b3501b5de0eecea7
2016-12-14 10:28:33 -08:00
Kevin Gozali 4530da87e2 make Modal pass rootTag to AppContainer
Summary:
Following up on fb7fe2d4e8: when <Modal> is used in dev mode, it renders `<AppContainer>` to wrap the children so that the element inspector can show up correctly. In that scenario, we need pass the `rootTag` over the `<AppContainer>` so that the children can read the rootTag correctly. Otherwise, the children of <Modal> will see it as undefined.

With this, AppContainer can then declare `rootTag` as a required prop, as it should have been.

Note that this only affects DEV build because there's no AppContainer wrapping otherwise.

Reviewed By: jingc

Differential Revision: D4204011

fbshipit-source-id: 80edbc8d351d983786e6fc3c68dfa65a71b1ed3c
2016-11-18 01:43:26 -08:00
Neo 6a83ac3af6 update Modal.js to fix #10662
Summary:
further discussion: should there be a `onClose` or `onClosed` to pair with `onShow`? which would make a workaround for #10471 much easier
Closes https://github.com/facebook/react-native/pull/10669

Differential Revision: D4133832

Pulled By: hramos

fbshipit-source-id: 644a5bb6b9da697c81fc96ae4da196ba5b4050cb
2016-11-04 18:43:42 -07:00
Konstantin Raev 6ea26c01de Reverted commit D4027388
Reviewed By: yungsters

Differential Revision: D4027388

fbshipit-source-id: 8e3341b6f393ccf432c1a4e22a7cbf422284a06f
2016-10-16 04:13:42 -07:00
Jan Kassens e58d17e68b React.Element<any> » React.Element<*>
Reviewed By: yungsters

Differential Revision: D4027388

fbshipit-source-id: 5bc178eab1ab72283622b4b7d418f9fd43ec0792
2016-10-15 17:58:38 -07:00
Tim Yung 7263c349c7 RN: Stop Deep Linking `ReactPropTypes`
Reviewed By: sebmarkbage

Differential Revision: D4025448

fbshipit-source-id: 4e9b6ee002a86f638fc57a4bbeb45bf35fabf74c
2016-10-14 18:59:10 -07:00
Tim Yung e8198aed8d Cleanup: Prefer `React.Element` over `React$?Element`
Reviewed By: vjeux

Differential Revision: D4013049

fbshipit-source-id: 18a447fdbc584418d6a51770363bcd221e7fb7dc
2016-10-14 08:59:37 -07:00