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

10944 Коммитов

Автор SHA1 Сообщение Дата
Jean Lauliac a939109183 metro-bundler: upgrade
Reviewed By: cpojer

Differential Revision: D5190525

fbshipit-source-id: f92da16733f95475650db2395c76495cce862d32
2017-06-06 05:30:19 -07:00
Jean Lauliac 328d8ddb47 metro-bundler: make internal tool to use the new source of thruth for packager/metro-bundler
Reviewed By: davidaurelio

Differential Revision: D5182904

fbshipit-source-id: df5de3a9eb85560a09789d0a94eccb5c48ecba7b
2017-06-06 05:15:51 -07:00
Ognjen Dragoljevic e0bdb7cbcf Remove useless code from ReactImageView.RoundedCornerPostprocessor
Reviewed By: achen1

Differential Revision: D5172643

fbshipit-source-id: c2d89bdfde2c4f4ef51bf3f529fa58112fb65a2d
2017-06-06 05:15:51 -07:00
Dan Caspi e284a9db8c Create JS executor and context on main thread w/ custom JSC
Reviewed By: javache

Differential Revision: D5165405

fbshipit-source-id: 35e5cfdf0518968c095ba54ec980d2fe376fa20e
2017-06-06 04:45:51 -07:00
Koen Punt e5e3591009 replace lineBreakMode with ellipsizeMode
Summary:
lineBreakMode is a non-existing property (or maybe legacy?)

While reading the docs I encountered this prop being used in the example, but it doesn't exist in the codebase anymore.
Closes https://github.com/facebook/react-native/pull/13820

Differential Revision: D5189652

Pulled By: javache

fbshipit-source-id: 70e620fc094ae5e1628ab13ee9e410044e4f5291
2017-06-06 04:16:00 -07:00
G. Kay Lee ba17a80aeb Update LayoutPropTypes.js
Summary:
Thanks for submitting a PR! Please read these instructions carefully:

- [x] Explain the **motivation** for making this change.
- [ ] Provide a **test plan** demonstrating that the code is solid.
- [x] Match the **code formatting** of the rest of the codebase.
- [x] Target the `master` branch, NOT a "stable" branch.

Copyediting documentaion

N/A

Sign the [CLA][2], if you haven't already.

Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

Make sure all **tests pass** on both [Travis][3] and [Circle CI][4]. PRs that break tests are unlikely to be merged.

For more info, see the ["Pull Requests"][5] section of our "Contributing" guidelines.

[1]: https://medium.com/martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9
[2]: https://code.facebook.com/cla
[3]: https://travis-ci.org/facebook/react-native
[4]: http://circleci.com/gh/facebook/react-native
[5]: https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#pull-requests
Closes https://github.com/facebook/react-native/pull/14320

Differential Revision: D5184852

Pulled By: shergin

fbshipit-source-id: e47d69d9d4b3db64c496b6080d22ac38b9957055
2017-06-06 04:04:44 -07:00
Pieter De Baets 2c85490aa2 Update and synchronize preloaded modules config
Reviewed By: davidaurelio

Differential Revision: D5154657

fbshipit-source-id: cdf752d4a358ee6d4ff06aee74a71052a615c33e
2017-06-06 04:04:44 -07:00
Christoph Pojer 48edba9e53 Update README
Reviewed By: jeanlauliac

Differential Revision: D5183348

fbshipit-source-id: d71bd7a6c5f20cd8954072814918adf4194abc57
2017-06-06 03:30:56 -07:00
Pieter De Baets 7081391c3d Simplify Value.fromJSON API
Reviewed By: mhorowitz

Differential Revision: D5154478

fbshipit-source-id: 3f9528a6401d89df7e170d55da9c0327db5f4f3e
2017-06-06 03:20:14 -07:00
Alex Kring 407b8b4d1f Fixing compiler warning
Summary:
Compiler is giving a warning about an unused variable.

Tested by compiling the source code and verifying the warning is removed.
Closes https://github.com/facebook/react-native/pull/13819

Differential Revision: D5189680

Pulled By: shergin

fbshipit-source-id: 89848fcd3e988d1c256b315cfa2ef60a62c2ad56
2017-06-05 23:30:34 -07:00
Tomasz Szajna a3249650d6 Fixed ListViewMock unique key error when many sections
Summary:
When ListViews has multiple sections, then rowIDs are required to be unique per section.
However the ListViewMock required rowIDs to be unique per whole list.
This change fixes the limitation of ListViewMock.
Closes https://github.com/facebook/react-native/pull/13642

Differential Revision: D5189675

Pulled By: shergin

fbshipit-source-id: 8a4fb68feb74af3307407d6d70f3f6642f50452a
2017-06-05 22:37:45 -07:00
Summer Kitahara aeccbd6906 Updating shake handling for Android in ShakeDetector and DevSupportManagerImpl
Summary: If you use a ShakeDetector, you can specify the minimum number of shakes required to trigger a shake handler.  Otherwise, the minimum number of required shakes is set to 1 by default.

Reviewed By: achen1

Differential Revision: D5155604

fbshipit-source-id: 5073fa37d4c223eb18e85b5e850b95d37136e3d2
2017-06-05 21:35:33 -07:00
Akshat Asawa 9e026ec358 Automatically request location permission when accessing geolocation
Reviewed By: achen1

Differential Revision: D5180727

fbshipit-source-id: 0c67ba31e3271f4ea5167a50119c132ef238cc25
2017-06-05 19:01:09 -07:00
James Timmons dd8ed629a5 Expose category property of iOS notifications
Summary:
Thanks for submitting a PR! Please read these instructions carefully:

- [x] Explain the **motivation** for making this change.
- [x] Provide a **test plan** demonstrating that the code is solid.
- [x] Match the **code formatting** of the rest of the codebase.
- [x] Target the `master` branch, NOT a "stable" branch.

This change allows app code to access the 'category' property of incoming iOS remote push notifications. Currently the property is not made available.

Create a test application which:
- registers for remote notifications with APNs
- passes the returned token to your push notification service provider
- displays the contents of the notification, including the 'category'
Send a remote push notification including a value for the category property in the payload. Check that the category is displayed in the application.

I considered updating RNTester but I couldn't for the life of me figure out how to get it to compile on my machine, sorry ;-) I can confirm my change works when applied directly in the node_modules of an existing RN project.

I've signed the CLA. Hope this is enough info to go on, please let me know if not!
Closes https://github.com/facebook/react-native/pull/14322

Differential Revision: D5184941

Pulled By: javache

fbshipit-source-id: b69decedafac37a5212efcf32faf858aa67ed691
2017-06-05 17:50:15 -07:00
Adam Comella 863f585be5 iOS: Improve accessibility of multiline TextInputs
Summary:
Fixes #13691.

Prior to this change, VoiceOver generally didn't say anything when selecting a multiline TextInput. The only exception was VoiceOver would announce the TextInput's placeholder if it had one set.

After this change, VoiceOver announces the following for multiline TextInputs:
  - The TextInput's content.
  - The TextInput's placeholder if the TextInput doesn't have any content in it.
  - The fact that the TextInput is a textfield.
  - The cursor position if the TextInput is being edited.

This is similar to the behavior of single line TextInputs.

This change achieves this by disabling `RCTTextView` as an accessibility element. `RCTTextView` is a subclass of `RCTView` so VoiceOver doesn't recognize this as a textfield. Instead, VoiceOver now sees the child `RCTUITextView` which is a subclass of `UITextView` so VoiceOver does recognize it as a textfield. Additionally, an `accessibilityLabel` implementation was added to `RCTUITextView` in order to take the value of the placeholder into account.

Verified the announcements of TextInputs with various props:
  - No placeholder and no content
  - Just a placeholder
  - Just content
  - Both a placeholder and content

Did this for both singe line inputs and multiline inputs. For setting content in multiline inputs, I tested both using the `value` prop and passing children. All other props being equal, these configurations resulted in similar announcements.

I verified that the following accessibility props work the same on singleline and multiline TextInputs:
  - `accessible`
  - `accessibilityLabel`
  - `accessibilityTraits`
  - `accessibilityViewIsModal`
  - `onAccessibilityTap`
  - `onMagicTap`

Additionally, my team has been using this change in our app.

Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/14200

Differential Revision: D5185727

Pulled By: shergin

fbshipit-source-id: 94271e6c8b089eb82006b52fe7917649d69e74af
2017-06-05 16:15:45 -07:00
Aaron Chiu e9e2de0ca2 properly clean up ReactAppTestActivity
Reviewed By: achen1

Differential Revision: D5183260

fbshipit-source-id: 263a289ff2332b39693830f77e705544e10b18ff
2017-06-05 13:15:54 -07:00
Dan Abramov 844a18fb25 Upgrade React developer tools to 2.3.0
Reviewed By: spicyj

Differential Revision: D5175272

fbshipit-source-id: f5184b7c66d71bd6dcc5dcf3a9734b445af1c0a9
2017-06-05 09:20:39 -07:00
Jean Lauliac 131afdb034 Revert D5129231: packager: enable throwOnModuleCollision for jest-haste-map
Differential Revision: D5129231

fbshipit-source-id: 23e7f9246b55773dab98ee0cbcf38b1c8d5b4f30
2017-06-05 04:01:15 -07:00
Hector Ramos 4f1c442fa3 Deploy the website even if other tests fail
Summary:
Circle only runs the commands under "deployment" if all tests pass. As a result, website deploys tend to get blocked unnecessarily when Circle is red, even when the website has no issues.

As every command under "overrride" is run independently even if other commands fail, the result of this PR is that the website will be deployed on every Circle run on `master` or any of the `-stable` branches.

Note that the "deployment" section is only executed when Circle is run against the master/-stable branch, and Circle is configured to not run deployments on forks. Since "override" does not have these protections in place, I've added some guards to ensure that a web deploy only occurs on runs triggered by commits to master/-stable on the main `facebook/react-native` repo.

This PR assumes the following are correct:

- `CI_PULL_REQUEST` and `CIRCLE_PR_USERNAME` are only set when [run on a fork](https://circleci.com/docs/1.0/environment-variables/#building-pull-requests-that-come-from-forks).
- `CIRCLE_PROJECT_USERNAME ` is only set to "facebook" when the run is triggered by a commit on the main `facebook/react-native` repo, and not a fork.

* Configuring circle.yml: https://circleci.com/docs/1.0/configuration/
* Environment Variables: https://circleci.com/docs/1.0/environment-variables/

None, aside from checking that bash can handle these conditionals. We need to trial this on Circle. Great attention needs to be paid to the conditionals, to ensure we do not allow forks to deploy the official website. We also need to make sure we are not leaking the GitHub access token accidentally.
Closes https://github.com/facebook/react-native/pull/14310

Differential Revision: D5179748

Pulled By: hramos

fbshipit-source-id: 405963f7e3bf2c1969e3e9a282781ce72c04e2d7
2017-06-03 14:22:20 -07:00
Aaron Chiu 37536e93b7 properly clean up RN
Reviewed By: javache

Differential Revision: D5170608

fbshipit-source-id: 065cf4ba4244c26bf5fdf9f5183a6bb1295676ad
2017-06-02 23:47:37 -07:00
G. Kay Lee df1070b750 Update RunningOnDevice.md
Summary:
Thanks for submitting a PR! Please read these instructions carefully:

- [x] Explain the **motivation** for making this change.
- [ ] Provide a **test plan** demonstrating that the code is solid.
- [x] Match the **code formatting** of the rest of the codebase.
- [x] Target the `master` branch, NOT a "stable" branch.

Copyediting

N/A

Sign the [CLA][2], if you haven't already.

Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

Make sure all **tests pass** on both [Travis][3] and [Circle CI][4]. PRs that break tests are unlikely to be merged.

For more info, see the ["Pull Requests"][5] section of our "Contributing" guidelines.

[1]: https://medium.com/martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9
[2]: https://code.facebook.com/cla
[3]: https://travis-ci.org/facebook/react-native
[4]: http://circleci.com/gh/facebook/react-native
[5]: https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#pull-requests
Closes https://github.com/facebook/react-native/pull/14300

Differential Revision: D5176308

Pulled By: shergin

fbshipit-source-id: fdf0a109bb933993bfafa05c878cb59d78d8ae33
2017-06-02 15:33:02 -07:00
Aaron Chiu 888a1e63d5 remove unused var
Reviewed By: shergin

Differential Revision: D5175318

fbshipit-source-id: 61d75bb386918e297f26d8772a5463c257a1590a
2017-06-02 14:32:00 -07:00
Valentin Shergin 072d2709df Introducing `-[RCTView reactAccessibleView]`
Summary:
Sometimes, when we implement some custom RN view, we have to proxy all accessible atributes directly to some subview which actually has accesible content. So, in other words, this allows bypass some axillary views in terms of accessibility.
Concreate example which this approach supposed to fix:
https://github.com/facebook/react-native/pull/14200/files#diff-e5f6b1386b7ba07fd887bca11ec828a4R208

Reviewed By: mmmulani

Differential Revision: D5143860

fbshipit-source-id: 6d7ce747f28e5a31d32c925b8ad8fd4b98ce1de1
2017-06-02 14:19:57 -07:00
Michał Gregorczyk 20217873d4 Prepare RN libs for so merging
Reviewed By: javache

Differential Revision: D5150741

fbshipit-source-id: 06e64ee1c4784e64307ef7a40003867ca0c8a8e2
2017-06-02 14:19:57 -07:00
Hector Ramos c419ae8c8d Update ListView Basics to use FlatList, SectionList.
Summary:
The new list views, FlatList and SectionList, are recommended over ListView.

Built website on localhost and verified the guide is rendered correctly.

![screencapture-localhost-8079-react-native-docs-using-a-listview-html-1495834607096](https://cloud.githubusercontent.com/assets/165856/26513523/c5d2913a-4220-11e7-8c8d-68bb12c75736.png)
Closes https://github.com/facebook/react-native/pull/14210

Differential Revision: D5149151

Pulled By: hramos

fbshipit-source-id: f28f02ee8893c4723c73d610b96ccda51cc31410
2017-06-02 12:45:59 -07:00
Jean Lauliac 07ee04d7bd metro-bundler: upgrade react-native-github to OSS bundler
Reviewed By: cpojer

Differential Revision: D5172542

fbshipit-source-id: 4ca6c9aad8f798ac6b8f1070f98b5d1d2098e726
2017-06-02 11:31:40 -07:00
Christoph Pojer 859af60e38 New README
Summary: This is a basic README for the new repo. We'll eventually expand on this as more pieces get open sourced and we'll evolve the three identifying tags over time.

Reviewed By: jeanlauliac

Differential Revision: D5172314

fbshipit-source-id: 8e5dd8567eadbcb839ee9860a22929fd6a77ee2e
2017-06-02 09:31:41 -07:00
Jean Lauliac a829d01bfc react-native: attachHMRServer: make it generic
Reviewed By: cpojer

Differential Revision: D5172344

fbshipit-source-id: ab8b39e1924d66d37da9734455ed9a72cf59906e
2017-06-02 09:31:41 -07:00
Jean Lauliac ec030d14cd react-native/local-cli: allow loading of custom Config objects
Reviewed By: cpojer

Differential Revision: D5172202

fbshipit-source-id: 834819c136a090a600221efbb0527dc3ada58031
2017-06-02 09:31:41 -07:00
xiaenlong 70b3f2aa7f Fix `InspectorPackagerConnection` creates too many Threads when WebSo…
Summary:
Thanks for submitting a PR! Please read these instructions carefully:

- [x] Explain the **motivation** for making this change.
- [ ] Provide a **test plan** demonstrating that the code is solid.
- [ ] Match the **code formatting** of the rest of the codebase.
- [ ] Target the `master` branch, NOT a "stable" branch.

InspectorPackagerConnection now creates a new OkHttpClient when previous connection fails. If the failures occur frequently, many Threads are created in `WebSocketCall.enqueue()`. On my Pixel phone, I have seen up to 260 Threads named "OkHttp ConnectionPool" alive at the same time. So, why don't we consider reusing the existing OkHttpClient instance ?

N/A

Sign the [CLA][2], if you haven't already.

Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

Make sure all **tests pass** on both [Travis][3] and [Circle CI][4]. PRs that break tests are unlikely to be merged.

For more info, see the ["Pull Requests"][5] section of our "Contributing" guidelines.

[1]: https://medium.com/martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9
[2]: https://code.facebook.com/cla
[3]: https://travis-ci.org/facebook/react-native
[4]: http://circleci.com/gh/facebook/react-native
[5]: https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#pull-requests
Closes https://github.com/facebook/react-native/pull/14301

Differential Revision: D5172277

Pulled By: javache

fbshipit-source-id: 7d417fa0675eb627f0b1ca41847b75686c8d1f3e
2017-06-02 09:16:41 -07:00
Pieter De Baets 79500f81a9 Fix Travis CI runs
Summary: Closes https://github.com/facebook/react-native/pull/14286

Differential Revision: D5164925

Pulled By: javache

fbshipit-source-id: 0ebe028ab58f37a9afc8b615fe346d7af9180040
2017-06-02 09:03:18 -07:00
Pieter De Baets 53169b0de3 Minimize time holding lock in UIViewOperationQueue
Reviewed By: AaaChiuuu

Differential Revision: D5154725

fbshipit-source-id: 06a113c4235ee63030f240f43a83aac074a23909
2017-06-02 08:31:00 -07:00
Pieter De Baets 07ee2fb90a Only call callImmediates once per batch
Reviewed By: AaaChiuuu

Differential Revision: D5163897

fbshipit-source-id: bcff70c4a6a6329b9ae771d9cad14876e3a40250
2017-06-02 08:17:07 -07:00
Aaron Chiu c57d7eaf43 remove unused file
Reviewed By: fkgozali

Differential Revision: D5168258

fbshipit-source-id: 2535aa5592d5cf49e94fd6999e8121ef97e42d39
2017-06-02 08:17:06 -07:00
Héctor Ramos a6c9e02399 Update ISSUE_TEMPLATE.md
Summary:
Minor template updates.
Closes https://github.com/facebook/react-native/pull/14294

Differential Revision: D5167899

Pulled By: hramos

fbshipit-source-id: cef408b7d2b2ef54176177a37fc4024d1bf999c6
2017-06-01 15:02:04 -07:00
Valentin Shergin 2e66ac8999 <ImageBackground> got `imageRef` and `imageStyle` props
Summary: It can be useful when you want to setup `tintColor` for the image or get a reference to call `setNativeProps` then.

Reviewed By: ericvicenti

Differential Revision: D5158908

fbshipit-source-id: 873c1cae9bd0af711a42016dcc548231e3cf89e7
2017-06-01 14:16:14 -07:00
Kevin Gozali d41c9d94fd add --dev flag to the packager's dependencies command
Summary:
The packager dependencies CLI command always operates on --dev=true today. This means any tooling that needs to get the production dependencies (--dev=false) will always get the dev-mode list instead. For instance:

```
if (__DEV__) {
  require('Foobar');
}
```

Previously, `Foobar.js` will always be listed in the CLI output. With this change, setting `--dev false` option will correctly skip `Foobar.js` in the output.

Reviewed By: cpojer

Differential Revision: D5163184

fbshipit-source-id: 203221ee5d6ecb7df575442f12f6c4c489bfbd46
2017-06-01 14:03:34 -07:00
Pieter De Baets 220ff2321a Avoid calls to ReactBridge.staticInit being stripped
Reviewed By: michalgr

Differential Revision: D5166720

fbshipit-source-id: 15ce78b2bbafa9506e9023d7d931092ebd963eea
2017-06-01 13:47:40 -07:00
Dan Abramov 86fad4b2f3 Remove dependency on internal data structure
Summary:
See context for this change in https://github.com/facebook/react-devtools/pull/770.
We'll later stop exposing `instance` (because it is a Fiber and is private to React).
Closes https://github.com/facebook/react-native/pull/14290

Reviewed By: trueadm

Differential Revision: D5164997

Pulled By: gaearon

fbshipit-source-id: cda479dd8a18773f01319f6b005e832e8e61387a
2017-06-01 13:06:24 -07:00
Héctor Ramos 84f68804ac Clarify pros/cons on different navigation libraries
Summary: Closes https://github.com/facebook/react-native/pull/14292

Differential Revision: D5165551

Pulled By: hramos

fbshipit-source-id: a50c1c1eb8d4e7de619b73e1baf621dc11e00abc
2017-06-01 11:32:40 -07:00
Jhen cf51aee9a0 Support `options` param for `requestIdleCallback`
Summary:
The `requestIdleCallback` sometimes doesn't work in `Debug JS Remotely` mode if I use real device, the callback will never called. I guess it may be debugger worker and device caused by the time gap, or some cause websocket blocking, so it's just sometimes happening.

I think we can support [options](https://developer.mozilla.org/zh-TW/docs/Web/API/Window/requestIdleCallback#Parameters) for that.

Added an example `Run requestIdleCallback with timeout option` for Timers of UIExplorer, it use `{ timeout: 100 }` option with burn CPU 100ms, we can see `didTimeout` is true.
Closes https://github.com/facebook/react-native/pull/13116

Differential Revision: D4894348

Pulled By: hramos

fbshipit-source-id: 29c4c2fe5634b30a8bf8d3495305cd8f635ed922
2017-06-01 11:00:40 -07:00
Jean Lauliac b975342e7b metro-bundler: AssetServer: remove fs timeouts
Reviewed By: cpojer

Differential Revision: D5164550

fbshipit-source-id: 2d294906c7deb67468dd9f85aa5ca998bdadcef3
2017-06-01 10:19:52 -07:00
Jean Lauliac a33dd76e4f metro-bundler: fix integration test for OSS
Summary: This should fix the e2e test for OSS.

Reviewed By: cpojer

Differential Revision: D5164267

fbshipit-source-id: d858b4811f0eb80ca7363177f4f384b66af13994
2017-06-01 10:03:27 -07:00
Spencer Ahrens 2a3de8f192 Cleanup PerformanceLogger a bit
Summary: `prettier`, lint, etc.

Reviewed By: javache

Differential Revision: D5156709

fbshipit-source-id: a9e63602c10e6e413446660b32ff972f5591c6d1
2017-06-01 10:03:27 -07:00
Alex Dvornikov a93b7a2da0 Added stubs for some native modules
Reviewed By: javache

Differential Revision: D5111649

fbshipit-source-id: eef2f84556611dec01978d845b89fa145ec5d4db
2017-06-01 08:31:19 -07:00
Pieter De Baets bd5051adeb Move xreact/jni to react/jni
Reviewed By: mhorowitz

Differential Revision: D5155612

fbshipit-source-id: 871a23916c0069498691dc0dd3c94fd2e404cec9
2017-06-01 05:53:25 -07:00
Lukas Wöhrl 7c980c5ba5 Fix absolute position if wrap-reverse and align-items: flex-end
Summary:
This is a fix on top of 56b10fc. It takes the case into account were you have `wrap-reverse` and `align-items: flex-end` set.
Closes https://github.com/facebook/yoga/pull/568

Differential Revision: D5155521

Pulled By: emilsjolander

fbshipit-source-id: 7e5fcfa2fbb48b6c6279da46cc648a071ff2b079
2017-06-01 05:53:25 -07:00
Christoph Pojer c57545eecc Update to metro-bundler from npm
Reviewed By: kittens

Differential Revision: D5163718

fbshipit-source-id: c21d3b9b6201d1a9509686cf235b611549652975
2017-06-01 04:49:39 -07:00
Pieter De Baets f7ebf0c64e Cleanup perf logging in FacebookAppRouteHandler
Reviewed By: sahrens

Differential Revision: D5154561

fbshipit-source-id: 5a3a495bbb910153833bc910864b6d5c7dca6432
2017-06-01 04:15:57 -07:00
Jean Lauliac 365c1bfcf9 metro-bundler: Terminal: remove global state
Reviewed By: cpojer

Differential Revision: D5155075

fbshipit-source-id: 1d64bdd0ae13087aca620b65892832e3a1229c4a
2017-06-01 03:04:04 -07:00