Summary:- lint bot is now managed by Circle CI
- checked that flow and lint errors are caught both by bot and CI
- flow fix for npm 3
- Travis is now using npm 2 and Circle CI npm 3
- Refactored Travis script to be able to be able to fail on multiple lines
Closes https://github.com/facebook/react-native/pull/6508
Differential Revision: D3069500
Pulled By: davidaurelio
fb-gh-sync-id: 02772bf1eae5f2c44489c2e3a01899428a9640cb
shipit-source-id: 02772bf1eae5f2c44489c2e3a01899428a9640cb
Summary:Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
(You can skip this if you're fixing a typo or adding an app to the Showcase.)
Explain the **motivation** for making this change. What existing problem does the pull request solve?
Example: When "Adding a function to do X", explain why it is necessary to have a way to do X.
**Test plan (required)**
Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.
Make sure tests pass on both Travis and Circle CI.
**Code formatting**
Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).
Closes https://github.com/facebook/react-native/pull/6497
Differential Revision: D3063800
fb-gh-sync-id: b91d99e4fcac2278aadd4fd17c38995df42720a2
shipit-source-id: b91d99e4fcac2278aadd4fd17c38995df42720a2
Summary:Just adding a new app to the showcase
Closes https://github.com/facebook/react-native/pull/6500
Differential Revision: D3064129
fb-gh-sync-id: 9845c2862caa94f343e8d8767d3e1d4c92dd2029
shipit-source-id: 9845c2862caa94f343e8d8767d3e1d4c92dd2029
Summary:Changed the implementation of `setTranslucent` because the old one used the view flag SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN which has the sad side effect of making the ScrollViews not adjust properly when the keyboard is opened. Instead I use `setOnApplyWindowInsetsListener` to hook in the insets calculation process and consume the top offset so the decor view doesn't add top padding for the status bar.
I also limited the translucent prop to API 21+ because `setOnApplyWindowInsetsListener` is not available before that and anyway the translucent prop is only useful with a semi-transparent status bar color which only works on API 21+.
**Test plan**
Reproduced the bug using this code in UIExplorer.
https://gist.github.com/janicduplessis/217b9994e35f960a1793
Tapping a text field that would be hidden by the soft keyboard should scroll the view so it is not hidden.
Also tested that setting the translucent prop on and off still works as before.
Fixes#6455
Closes https://github.com/facebook/react-native/pull/6481
Differential Revision: D3067199
Pulled By: mkonicek
fb-gh-sync-id: aa115f8688ac7e461e62c18ebb8ab77350d000f8
shipit-source-id: aa115f8688ac7e461e62c18ebb8ab77350d000f8
Summary:This adds a `HEIGHT` constant on `StatusBar` on Android. I needed only this for now but I will work on a better status bar dimensions API later (see TODO).
It also improves the implementation to fix a bug that happened when multiple `StatusBar` components get updated in the same frame as well as remove useless calls to the `StatusBarModule` when values did not change.
Instead of calling the `StatusBarManager` immediately when the component gets updated and relying on the order of the calls that get dispatched to native we now wait at the end of the frame to send the calls to the `StatusBarManager` using `setImmediate`. To make this work properly we need to change the data structure of the props stack a little bit to store the desired transition/animation too for each value.
Finally this updates the example to only show the ones that work for the current platform.
**Test plan**
In the UIExplorer Example, in the 'StatusBar dimensions' section it should show 25 for the height of the status bar.
A
Closes https://github.com/facebook/react-native/pull/6195
Differential Revision: D3017559
fb-gh-sync-id: d6f4c6a72a2dfde83496ecc0f56dca4abaf3055e
shipit-source-id: d6f4c6a72a2dfde83496ecc0f56dca4abaf3055e
Summary:Changing the order of transformation and extraction of dependencies made the order of modules dependent on the time when the worker pool returns a result.
node-haste v2.9.1 addresses this issue and makes the order of dependencies deterministic.
This also bumps the packager versions to enforce cache invalidation.
Reviewed By: martinbigio
Differential Revision: D3065063
fb-gh-sync-id: 1d45b066e45c3f64092f779c3fce3becf6739409
shipit-source-id: 1d45b066e45c3f64092f779c3fce3becf6739409
Summary: This diff introduces a blur radius property to the Image component on ios. If the radius specified is greater then 0 then native will apply a blur filter to the image
Reviewed By: nicklockwood
Differential Revision: D3054671
fb-gh-sync-id: d7a81ce5a08a3a2091c583f5053c6a86638b21b2
shipit-source-id: d7a81ce5a08a3a2091c583f5053c6a86638b21b2
Summary: Port the legendary props `onWillFocus` and `onDidFocus` from `Navigator` to `NavigationLegacyNavigatorRouteStack`.
Reviewed By: fkgozali
Differential Revision: D3063530
fb-gh-sync-id: 89583b8c80ee6ed0ef844a56b942a2d74b98717f
shipit-source-id: 89583b8c80ee6ed0ef844a56b942a2d74b98717f
Summary: For RAM bundling we don't want to hold the entire bundle in memory as that approach doesn't scale. Instead we want to seek and read individual sections as they're required. This rev does that by detecting the type of bundle we're dealing with by reading the first 4 bytes of it. If we're dealing with a RAM Bundle we bail loading.
Reviewed By: javache
Differential Revision: D3026205
fb-gh-sync-id: dc4c745d6f00aa7241203899e5ba136915efa6fe
shipit-source-id: dc4c745d6f00aa7241203899e5ba136915efa6fe
Summary:Because the source of truth for backgroundColor is the shadow view, it's possible for the default RCTView backgroundColor to get overwritten by the current shadowView backgroundColor when the view is first created. This overridden value will then be used as the default whenever the background color is reset, which may not be be appropriate for other components that use RCTView.
This diff fixes the bug by ensuring that the view props (and therefore the default color) are set *before* the background color is propagated from the shadowView.
Reviewed By: furdei
Differential Revision: D3064128
fb-gh-sync-id: ac36007c094c7201a5c4fd93399dee4d3eb9a043
shipit-source-id: ac36007c094c7201a5c4fd93399dee4d3eb9a043
Summary:This adds support for Modal.js on Android.
I added the ModalExample to UIExplorer to demonstrate the usage.
Reviewed By: andreicoman11
Differential Revision: D3053732
fb-gh-sync-id: 292173bdd5cb518e87cbb1d622af436704bb6329
shipit-source-id: 292173bdd5cb518e87cbb1d622af436704bb6329
Summary:At least for me I needed to press F2 in Genymotion.
Closes https://github.com/facebook/react-native/pull/6491
Differential Revision: D3064240
fb-gh-sync-id: 577409371532dadc1341ca388005a54cf3de59f4
shipit-source-id: 577409371532dadc1341ca388005a54cf3de59f4
Summary:- Move the logics that manage the routes stack into `NavigationLegacyNavigatorRouteStack`
- Add more unit tests for NavigationLegacyNavigatorRouteStack.
- Keep NavigationLegacyNavigator as a pure view as possible as we could.
Reviewed By: fkgozali
Differential Revision: D3060459
fb-gh-sync-id: 2c6802115c3f6ca5e396903f0d314ff54129524c
shipit-source-id: 2c6802115c3f6ca5e396903f0d314ff54129524c
Summary:Just added a pass through to the `WebView` for `mediaPlaybackRequiresUserAction` and `setMediaPlaybackRequiresUserGesture` to allow auto-playing audio and video elements
Closes https://github.com/facebook/react-native/pull/5956
Differential Revision: D3053554
Pulled By: mkonicek
fb-gh-sync-id: a1f362c1551de1a0218f5d23c70668e4c8078993
shipit-source-id: a1f362c1551de1a0218f5d23c70668e4c8078993
Summary: This is causing issues for some internal layouts. Will fix upstream and then pull this in again.
Reviewed By: majak
Differential Revision: D3058597
fb-gh-sync-id: 2e9499d2fd0322ddd87b11f285eeb08fd51977b7
shipit-source-id: 2e9499d2fd0322ddd87b11f285eeb08fd51977b7
Summary: In my recent refactor to remove defaultViews, I added a check for null json values to determine if defaultView needed to be created. Unfortunately this was checking for nil instead of NSNull.
Reviewed By: javache
Differential Revision: D3058383
fb-gh-sync-id: 2a21dd0beb0302a94ed5379d39a102cde1316a9d
shipit-source-id: 2a21dd0beb0302a94ed5379d39a102cde1316a9d
Summary:Added a note in the Animation documentation to let people know that they need to enable `LayoutAnimation` with `UIMananger` for Android.
Resolves#5267.
Closes https://github.com/facebook/react-native/pull/6482
Differential Revision: D3058305
fb-gh-sync-id: 3527236a015c91973ab6237c3495983f407a53db
shipit-source-id: 3527236a015c91973ab6237c3495983f407a53db
Summary:Forgot to fix the description of the example in #6435
`UIProp` -> `ReactProp`
Closes https://github.com/facebook/react-native/pull/6442
Differential Revision: D3056520
fb-gh-sync-id: 0995ba66d550279bb75daa733673c68d37c5c793
shipit-source-id: 0995ba66d550279bb75daa733673c68d37c5c793
Summary:Per offline discussion with ericvicenti, we'd like to reudce the complexity by
keeping <NavigationCard /> nothing more than just a simple `<Animated.View />`,
which helps us to avoid over generalize the styles, gestures of what the Navigation card
needs to be.
The proposalis to use the same props (NavigationSceneRendererProps) that is used to render
the scene to generate the style and pan handlers needed for the navigation card.
No behavior changes, just implementation details clean up work.
Reviewed By: ericvicenti
Differential Revision: D3037225
fb-gh-sync-id: f6e718a282d25a319f5d8efd3e2ffebc66b2c8cb
shipit-source-id: f6e718a282d25a319f5d8efd3e2ffebc66b2c8cb
Summary:Fixes bug https://github.com/facebook/react-native/issues/5604 ("Redscreen error when TouchRelease triggered on a component no longer in the tree")
( maybe not ideally )
This issue is triggered by the following:
A Touch event on a component ( Keep Pressing )
A state/props update removes the component from the tree and render is performed
A Touch Release event. ( When you release the press on the component no longer there )
This fix adds an early return to the signal handling code if a RESPONDER_RELEASE signal happens when the responder has disappeared
Closes https://github.com/facebook/react-native/pull/5637
Differential Revision: D3053729
Pulled By: sahrens
fb-gh-sync-id: 21a2a303d8921654607eaab824ef28fc16df9500
shipit-source-id: 21a2a303d8921654607eaab824ef28fc16df9500
Summary:We use a few different modules to output logs to stdout when building a bundle with the packager:
- ##js/react-native-github/packager/react-packager/src/Activity/index.js##
- ##js/react-native-github/local-cli/util/log.js##
- ##https://www.npmjs.com/package/progress##
This diff also adds a ##silent## option to the packager ##Server##, which, when ##true##, will not create a ##progress## instance for the transformer.
Reviewed By: martinbigio
Differential Revision: D3048739
fb-gh-sync-id: a4c6caf36f5127946593f4a0a349fa145ad0d4e6
shipit-source-id: a4c6caf36f5127946593f4a0a349fa145ad0d4e6
Summary:Don't add systems current time to the `timeout` option. This is already correct on iOS.
Closes https://github.com/facebook/react-native/pull/6376
Differential Revision: D3053728
Pulled By: mkonicek
fb-gh-sync-id: 919068659d0d23906d8a6d85df7819296460b719
shipit-source-id: 919068659d0d23906d8a6d85df7819296460b719
Summary:This work allows automated release deployment.
Previous semi-automation lived in release.sh and I split it into two pieces:
- test-manual-e2e.sh - that just tests that current commit is buildable and makes a quick e2e installation for manual testing
- publish-npm.js - that makes publish based on what current branch and tags are on commit that is tested/deployed by CI
This simplified `Releases.md` guide and requires you to just run
```
git checkout -b 0.22-stable
git tag v0.22.0-rc
git push origin 0.22-stable --tags
```
to have a successful npm release.
Closes https://github.com/facebook/react-native/pull/6453
Reviewed By: mkonicek
Differential Revision: D3047938
Pulled By: bestander
fb-gh-sync-id: dbebf4c3a0bc2c2a0ef75c54595ab5654f91b8ea
shipit-source-id: dbebf4c3a0bc2c2a0ef75c54595ab5654f91b8ea
Summary: D2922108 / PR #5814 broke the “Unbundle” loader by prepending the file path to the entry file with "file://". This converts it back.
Reviewed By: lexs
Differential Revision: D3052749
fb-gh-sync-id: 0b241c50e25f1a1c85265915bee01582d0ba7ac6
shipit-source-id: 0b241c50e25f1a1c85265915bee01582d0ba7ac6