Summary:
We want to pull RN API docs into exponent. So moving them into a module will be useful since we don't want to keep a duplicate list.
Run `npm start` in the `website` folder and see it still generates docs.
cc brentvatne
Closes https://github.com/facebook/react-native/pull/11712
Differential Revision: D4380320
fbshipit-source-id: 103e5deecdbe9aa1a4690496bf954b5cdd6be097
Summary:
Puts hierarchy and other inspector data in a fixed height scrollview so it never takes up
too much space and you can always scroll to see everything you want.
Reviewed By: fkgozali
Differential Revision: D4374819
fbshipit-source-id: 89356670c984c693db345ad66a97d4cb54a98aee
Summary:
Added permission code to handle the user permission accepted or denied cases which causes potential app crashing if not handled. Only a small piece of code added to the guide to resolve an issue I was facing with permission.
The app that I was testing following the guide available, it was crashing showing permission denied error on the android monitor, and there was no step for how to resolve the issue. So I tried out a solution so thought would share it on the official Guide to help people who are stuck with the same issue.
Closes https://github.com/facebook/react-native/pull/11687
Differential Revision: D4377882
Pulled By: ericvicenti
fbshipit-source-id: a7db104c7c1b7e1fb2590c83118715840c17927b
Summary:
Strangely comparing a pointer with zero will only be a clang warning when compiling with `-Wpedantic`, so this incorrect comparison is silently allowed.
**Test plan**
Compiles with `-Wpedantic`.
Closes https://github.com/facebook/react-native/pull/11709
Differential Revision: D4377512
Pulled By: ericvicenti
fbshipit-source-id: 483cf1f41d3f539c452d542ad2155c4c4b41616d
Summary:
updated this.state to reflect the different date type options in the DatePickerAndroid components.
Closes https://github.com/facebook/react-native/pull/11600
Differential Revision: D4376621
Pulled By: ericvicenti
fbshipit-source-id: 6802d346c200870e9b3de766c9e575c7d9f7e6df
Summary:
As mkonicek suggested in [#9568](https://github.com/facebook/react-native/pull/9568#issuecomment-267600043) I did some cleanup
**Test plan (required)**
Only one functional change:
> Run `react-native run-android --deviceId`
Before it was beginning to build the app and then failing because of the missing device "true" :-)
Now it's showing a message and stopping the build:
```
❯ react-native run-android --deviceId
Starting JS server...
Parameter missing (device id)
```
Closes https://github.com/facebook/react-native/pull/11703
Differential Revision: D4376615
Pulled By: ericvicenti
fbshipit-source-id: 3c6e0f12220ab22539c7bc3d390367e02c96728a
Summary:
Adds the feature to use percentage as a value unit.
You can use the function ```YGPx(float)``` and ```YGPercent(float)``` for convenience.
I did some benchmarks:
```
Without Percentage Feature - Release x86:
Stack with flex: median: 0.000000 ms, stddev: 0.146683 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.136525 ms
Nested flex: median: 0.000000 ms, stddev: 0.490101 ms
Huge nested layout: median: 23.000000 ms, stddev: 0.928291 ms
Stack with flex: median: 0.000000 ms, stddev: 0.170587 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.143384 ms
Nested flex: median: 0.000000 ms, stddev: 0.477791 ms
Huge nested layout: median: 22.000000 ms, stddev: 2.129779 ms
With Percentage Feature - Release x86:
Stack with flex: median: 0.000000 ms, stddev: 0.132951 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.136525 ms
Nested flex: median: 0.000000 ms, stddev: 0.489570 ms
Huge nested layout: median: 21.000000 ms, stddev: 1.390476 ms
Closes https://github.com/facebook/yoga/pull/258
Reviewed By: dshahidehpour
Differential Revision: D4361945
Pulled By: emilsjolander
fbshipit-source-id: a8f5bc63ad352eb9410d792729e56664468cd76a
Summary:
**Motivation**
New iOS project generation with react-native-cli should allow developers to build for Apple TV as well as iPhone/iPad.
**Test plan**
Added to `scripts/run-ci-e2e-tests.js` and `.travis.yml` to have the new tvOS target automatically built and tested in Travis CI.
Closes https://github.com/facebook/react-native/pull/11591
Differential Revision: D4375593
Pulled By: mkonicek
fbshipit-source-id: 4e241caa400a88e6b2f91416fa26b48ae01cb7b6
Summary:
For consistency (and maybe correctness?) use an array instead of a string with spaces in it for the `exclude_paths` value in the Podspec.
Closes https://github.com/facebook/react-native/pull/11664
Differential Revision: D4374863
fbshipit-source-id: b81773f418bd46d846bb935e038d240c98c0b71a
Summary:
Circle CI has an older m2repository version by default
Closes https://github.com/facebook/react-native/pull/11671
Differential Revision: D4372795
Pulled By: kentaromiura
fbshipit-source-id: ac563fe3825a57087fbf806c913383e1ade8535f
Summary: Update the Android RecyclerView, support v4, and annotation libraries to 23.4.0.
Differential Revision: D4345649
fbshipit-source-id: 859c6555bc79358b1c8ffed0629cdf0e83408a00
Summary:
Before this patch, each Node would always generate a node
region, representing the bounds of this particular Node. This set of Nodes was
used when handling touch to figure out whether we should intercept touch (i.e.
a flat Node is catching the draw), or let Android handle touch (i.e. a Node
mounted to a View will handle the touch).
This patch modifies the list of NodeRegions to exclude any Nodes that draw
nothing at all. These Nodes, having no draw output, are effectively layout
containers used to group items, so they shouldn't handle touch.
Reviewed By: sriramramani
Differential Revision: D4369484
fbshipit-source-id: 71b41611873580631f1639f368fa8d971995874f
Summary:
Fix the `path.sep` replacement for Windows, currently it just replace one segment:
```js
// Result: './lib/random\random-byte.js'
'./lib\\random\\random-byte.js'.replace(path.sep, '/')
```
Change to regex will work fine:
```js
// Result: './lib/random/random-byte.js' (correct)
'./lib\\random\\random-byte.js'.replace(new RegExp('\\' + path.sep, 'g'), '/')
```
Closes https://github.com/facebook/react-native/pull/11641
Differential Revision: D4368402
fbshipit-source-id: 46f456359d1cd2ca790881773e8a76af8616cd21
Summary: This caused a bunch of stuff to break, reverting and will fix the problems before committing next time.
Reviewed By: fkgozali
Differential Revision: D4363398
fbshipit-source-id: 55146c9da998f6a3883307c36422a9d440ea7f52
Summary:
Bandaid for #7070. Until this is fixed, the docs should at least be honest the state they're in, so people don't have to go search and wonder.
Closes https://github.com/facebook/react-native/pull/11626
Differential Revision: D4366925
Pulled By: mkonicek
fbshipit-source-id: 082a8a9916ad0f8fbb2955cffbf61142fa2a98a1
Summary:
Doing this from web so won't be able to screenshot the results. (also inadvertently deleted a line, oh well...)
Closes https://github.com/facebook/react-native/pull/11625
Differential Revision: D4366928
Pulled By: mkonicek
fbshipit-source-id: 966a3d8b90dde49b1de06e0249df110245943825
Summary:
Not re-calculate `paddingAndBorderAxisMain`/`paddingAndBorderAxisCross`/`paddingAndBorderAxisRow`/`paddingAndBorderAxisColumn` in Step1 of `YGNodelayoutImpl`.
They can be figure out by values calculated before.
Closes https://github.com/facebook/yoga/pull/298
Reviewed By: dshahidehpour
Differential Revision: D4365533
Pulled By: emilsjolander
fbshipit-source-id: 6caf60bc6ef3addd49915b39b48f01a8b4926e9c
Summary:
Fixes#11605
HelloWorld refers to CSSLayout even thought master has moved on and the library is now called Yoga.
Closes https://github.com/facebook/react-native/pull/11606
Differential Revision: D4365469
fbshipit-source-id: e0eaac400449f0ba767bf98f3bd8e8185fb6fd12
Summary:
As of iOS10 permission is required to access user photos and their galleries, I felt this really needed to be addressed. I hope to create a section dedicated to iOS permissions soon.
Closes https://github.com/facebook/react-native/pull/11259
Differential Revision: D4364354
Pulled By: hramos
fbshipit-source-id: 97bdeb09deba01995eebd038e00ccc84b08281c9
Summary:
- Use the same format when listing apps in a language other than English.
- Remove app (Calor) that is not actually available in the App Store.
- Remove subtitles from app names.
Closes https://github.com/facebook/react-native/pull/11551
Differential Revision: D4364185
Pulled By: hramos
fbshipit-source-id: 98901e60b5d81a53aad0651be46f195a33102071
Summary:
We turned them off on Wednesday Dec 14 when both CIs were busted. Once Circle runs on this PR it'll demonstrate they are functional again.
Closes https://github.com/facebook/react-native/pull/11547
Differential Revision: D4364177
Pulled By: hramos
fbshipit-source-id: 8a3b24a2795d0fcf4255cb3174acedc10ff6fbe7
Summary:
Transition animations are not very customizable right now with NavigationExperimental, unless I am missing something big. This PR allows NavigationCardStack to receive the `horizontalCardStyleInterpolator` and `verticalCardStyleInterpolator` props to override the default interpolators.
See the gif, transition animation changes from the default one (with scale) to a custom one (without scale) when passing in a custom interpolator. (The custom interpolator is an exact copy of the one in `NavigationCardStackStyleInterpolator.forHorizontal`, minus the scale transform.)
![cmz0gagoec](https://cloud.githubusercontent.com/assets/1389312/20552499/af33667c-b119-11e6-97e7-bea9986a58e0.gif)
Let me know if there's a robust way to test, but I couldn't find anything.
**To address**
The new `canUseNativeDriver` function on NavigationCardStackStyleInterpolator, which returns `true`, is dependent on the interpolator, so custom interpolators may need to falsify this. Didn't include it on the first pass since I wasn
Closes https://github.com/facebook/react-native/pull/11082
Differential Revision: D4362540
Pulled By: ericvicenti
fbshipit-source-id: 2ebd0047c147ac3d6c43ce880661c99de8fd0880
Summary:
Running `master` (at 260d68bf8b) I noticed `react-native link` fails when there is no windows project due to a bug in the code that fetches windows project configs (introduced 445182c707).
There's a guard to return early if `csSolution` (the relative path of the windows solution) is null but it needs to be a line earlier, because `path.join` errors when passed a non-string.
Tested locally on a non-windows project, `react-native link` errored previously and now succeeds.
Closes https://github.com/facebook/react-native/pull/11590
Differential Revision: D4362419
fbshipit-source-id: b3b9f6784d8b1d1a7c53abe0ee421b1dc6048571
Summary: AspectRatio is a new addition and soon after introduction we noticed use cases which is did not support. Specifically we wanted to support a node being as large as possible within a container while maintaining an arbitrary aspect ratio. This was not possible due to the low priority of AspectRatio, by increasing the priority of AspectRatio this is now possible as FlexGrow will grow an item to fit its parent unless the AspectRatio makes it too big in the cross axis, the AspectRatio will now override the FlexGrow in the main axis in that case.
Differential Revision: D4346720
fbshipit-source-id: 1f15613604190e3ad5ff4a467ba57db4bcfd2741
Summary: Aspect ratio being defined as width/height or height/width depending on the situation it was used in turned out to be very confusing. This diff makes aspect ratio always be defined as width/height irregardless of the usage.
Differential Revision: D4339132
fbshipit-source-id: e5da32750b55ddaf6acaf1cbd7662d86f2b480c3
Summary:
Virtual nodes do not have backing Yoga nodes, so measure
their first non-virtual parent instead of measuring them.
Reviewed By: sriramramani
Differential Revision: D4360540
fbshipit-source-id: 505d35fec74dddf67b002d29268acc29d2651b13
Summary:
Due to react-native-cli use yarn if yarn is available, we need to add yarn-error.log to .gitignore.
Closes https://github.com/facebook/react-native/pull/11583
Differential Revision: D4359507
fbshipit-source-id: 0c7582215a31e0d03dced138c8275225910713ee
Summary:
`declareOpts` is weakly typed. Since the callsite of Resolver constructor is itself flowifyed, we can get rid of `declareOpts`, and this provides us with much better typing.
Eventually I'd like to get rid of most of the defaults in the packager's inner code (ex. `watch` being false, `dev` being true). The reason is that defaults everywhere are prone to causing inconsistencies (for ex. some other code could have `dev` as false by default), problems that cannot be caught by Flow. Instead of having non-required options, I believe it is more sensible to provide helper functions that build sets of default options.
Reviewed By: davidaurelio, cpojer
Differential Revision: D4351874
fbshipit-source-id: 38653063f8939b4282c7c27cb6d5e3f3a25a9484
Summary:
**Motivation**
After reviewing changes between my PR https://github.com/facebook/react-native/pull/10427 and what was eventually manually imported to master, found two minor adjustments needed.
**Test plan**
Existing tests should still pass.
Closes https://github.com/facebook/react-native/pull/11548
Differential Revision: D4357216
Pulled By: javache
fbshipit-source-id: 571794cda104210bf5236462c0700e07a2a51d29
Summary:
Like its non-Nodes counterpart, FlatARTSurfaceViewShadowNode
should redraw when extra updates are collected.
Reviewed By: sriramramani
Differential Revision: D4355702
fbshipit-source-id: 6e7b90360958481f5bef9b806eca9fa888cb6a32