Commit Graph

5167 Commits

Author SHA1 Message Date
Martin Konicek 189ef95bb6 [website] Update 404.js 2016-02-10 17:13:51 +00:00
wusuopu 97741af8b9 Fix warnings of StyleInspector
Summary:
Fix issue #5831
Closes https://github.com/facebook/react-native/pull/5832

Reviewed By: svcscm

Differential Revision: D2917760

Pulled By: vjeux

fb-gh-sync-id: 3808d14075b259dd21056a7111205edae1e3eb48
shipit-source-id: 3808d14075b259dd21056a7111205edae1e3eb48
2016-02-10 08:40:39 -08:00
Michael Anderson 197880518b Updating the native code to make it match reality.
Summary:
In the native code, you must use RCTLinkingManager instead of LinkingManager and you have to import it as well.
Closes https://github.com/facebook/react-native/pull/5830

Reviewed By: svcscm

Differential Revision: D2921718

Pulled By: androidtrunkagent

fb-gh-sync-id: a95ec358c69e8830b7f0fb2ec60baefc06139758
shipit-source-id: a95ec358c69e8830b7f0fb2ec60baefc06139758
2016-02-10 08:39:35 -08:00
Nick Lockwood e7005f7f54 Fixed missing rows on UIExplorer <ListView> - Grid Layout example
Summary:
public
I was looking into the missing panels at the bottom of the <ListView> - Grid Layout example, and found that it was caused by several problems, some in the example and some in ListView itself.

The first problem seemed to be a bug in the `_getDistanceFromEnd()` method, which calculates whether the ListView needs to load more content based on the distance of the visible content from the bottom of the scrollview. This was previously using the function

    Math.max(scrollProperties.contentLength, scrollProperties.visibleLength) - scrollProperties.visibleLength - scrollProperties.offset

to calculate the amount the user could scroll before they run out of content. This sort-of works in most cases because `scrollProperties.contentLength` is usually longer than `scrollProperties.visibleLength`, so this would generally evaluate to

    scrollProperties.contentLength - scrollProperties.visibleLength - scrollProperties.offset

which meant that it would be positive as long as there was content still to be displayed offscreen, and negative when you reached the end of the content. This logic breaks down if `contentLength` is less than `visibleLength`, however. For example, if you have 300pts of content loaded, and your scrollView is 500pts tall, and your scroll position is zero, this evaluates to

    Math.max(300, 500) - 500 - 0 = 0

In other words, the algorithm is saying that you have zero pts of scroll content remaining before you need to reload. But actually, the bottom 200pts of the screen are empty, so you're really 200pts in debt, and need to load extra rows to fill that space. The correct algorithm is simply to get rid of the `Math.max` and just use

    scrollProperties.contentLength - scrollProperties.visibleLength - scrollProperties.offset

I originally thought that this was the cause of the gap, but it isn't, because ListView has `DEFAULT_SCROLL_RENDER_AHEAD = 1000`, which means that it tries to load at least 1000pts more content than is currently visible, to avoid gaps. This masked the bug, so in practice it wasn't causing an issue.

The next problem I found was that there is an implict assumption in ListView that the first page of content you load is sufficient to cover the screen, or rather, that the first _ second page is sufficient. The constants `DEFAULT_INITIAL_ROWS = 10` and `DEFAULT_PAGE_SIZE = 1`, mean that when the ListView first loads, the following happens:

    1. It loads 10 rows of content.
    2. It checks if `_getDistanceFromEnd() < DEFAULT_SCROLL_RENDER_AHEAD` (1000).
    3. If it is, it loads another `DEFAULT_PAGE_SIZE` rows of content, then stops.

In the case of the ListView Grid Layout example, this meant that it first loaded 10 cells, then loaded another 1, for a total of 11. The problem was that going from 10 to 11 cells isn't sufficient to fill the visible scroll area, and it doesn't change the `contentSize` (since the cells wrap onto the same line), and since ListView doesn't try to load any more until the `contentSize` or `scrollOffset ` changes, it stops loading new rows at that point.

I tried fixing this by calling `_renderMoreRowsIfNeeded()` after `_pageInNewRows()` so that it will continue to fetch new rows until the `_getDistanceFromEnd()` is less than the threshold, rather than stopping after the first page and waiting until the `contentSize` or `scrollOffset` change, but although this solves the problem for the Grid Layout example, it leads to over-fetching in the more common case of a standard row-based ListView.

In the end, I just increased the `pageSize` to 3 for the Grid Layout example, which makes more sense anyway since loading a page that is not a multiple of the number of cells per row confuses the `_renderMoreRowsIfNeeded` algorithm, and leads to gaps at the bottom of the view.

This solved the problem, however there was still a "pop-in" effect, where the additional rows were paged in after the ListView appeared. This was simply a misconfiguration in the example itself: The default of 10 rows was insufficient to fill the screen, so I changed the `initialListSize` prop to `20`.

Reviewed By: javache

Differential Revision: D2911690

fb-gh-sync-id: 8d6bd78843335fb091e7e24f7c2e6a416b0321d3
shipit-source-id: 8d6bd78843335fb091e7e24f7c2e6a416b0321d3
2016-02-10 08:37:57 -08:00
Andy Street bab48182d9 Add Object.getPropertyNames() and Object.toJSONMap APIs
Summary:
Adds APIs to get all the enumerable property names of an object and to get an object as a map of property names to JSON values.

public

Reviewed By: lexs

Differential Revision: D2916238

fb-gh-sync-id: 0d9ee1eb4886d58fba8241537f6a0dad6024bd0e
shipit-source-id: 0d9ee1eb4886d58fba8241537f6a0dad6024bd0e
2016-02-10 08:14:35 -08:00
Konstantin Raev e6b6aedd86 new way to update stable website 2016-02-10 15:50:52 +00:00
Dave Miller c9a1956c4f Fix promises on iOS to no longer wrap values in Arrays
Summary:
public
In 9baff8f437 (diff-8d9841e5b53fd6c9cf3a7f431827e319R331), I incorrectly assumed that iOS was wrapping promises in an extra Array.  What was really happening is that all the callers were doing this.  I removed the wrapping in the callers and the special case handling MessageQueue.

Now one can pass whatever object one wants to resolve and it will show properly in the resolve call on the js side.  This fixes issue https://github.com/facebook/react-native/issues/5851

Reviewed By: nicklockwood

Differential Revision: D2921565

fb-gh-sync-id: 9f81e2a87f6a48e9197413b843e452db345a7ff9
shipit-source-id: 9f81e2a87f6a48e9197413b843e452db345a7ff9
2016-02-10 07:25:35 -08:00
Konstantin Raev d7f787665c Added .travis.yml to fbsource to support github PR with it
Reviewed By: mkonicek

Differential Revision: D2921590

fb-gh-sync-id: 714813270268e5b83e7068f3fe12ee442cd2eb69
shipit-source-id: 714813270268e5b83e7068f3fe12ee442cd2eb69
2016-02-10 07:07:09 -08:00
Konstantin Raev 152f1ee58c removed temporarilty .travis.yml
It will be synced from fbsource in an hour
2016-02-10 14:21:06 +00:00
Andreas Stütz 142f8c92de Fixed icon handling
Summary:
[This commit](e730a9fdd0) (_Load assets from same folder as JSbundle (Android)_) causes React Native to look for assets inside the same folder the JSBundle was loaded from and generates asset URIs containing the absolute path to the asset (e.g. _/sdcard/bundle/drawable-xxhdpi/ic_back.png_).

While this is fine for a normal `ImageView`, `ToolbarAndroid`/`ReactToolbar` currently crashes if the icons are located on the file system. This happens because when setting an icon on `ReactToolbar`, Fresco is only used if the icon URI contains `http:// `or `https://`. For all other cases (like in this case where it starts with `file://`), the view tries to load the Drawable from the Android App Resources by it's name (which in this case is an absolute file-URI) and therefore causes it to crash (`getDrawableResourceByName` returns 0 if the Drawable was not found, then `getResources().getDrawable(DrawableRes int id)` throws an Exception if th
Closes https://github.com/facebook/react-native/pull/5753

Reviewed By: svcscm

Differential Revision: D2921418

Pulled By: foghina

fb-gh-sync-id: 7a3f81b530a8c1530e98e7b592ee7e44c8f19df1
shipit-source-id: 7a3f81b530a8c1530e98e7b592ee7e44c8f19df1
2016-02-10 05:01:35 -08:00
Christopher Dro a11f980a34 Remove isRequired on source prop for Android
Summary:
Makes source required across both platforms.
Closes https://github.com/facebook/react-native/pull/5845

Reviewed By: svcscm

Differential Revision: D2920250

Pulled By: vjeux

fb-gh-sync-id: 21845b601df32dc2e12a95544afa3db4c0414746
shipit-source-id: 21845b601df32dc2e12a95544afa3db4c0414746
2016-02-09 19:16:38 -08:00
Henry Kirkness 272096ce7c Added Choke to showcase
Summary: Closes https://github.com/facebook/react-native/pull/5848

Reviewed By: svcscm

Differential Revision: D2920042

Pulled By: androidtrunkagent

fb-gh-sync-id: e45d4789200e1825e319eaf7bb70d3ff52c12325
shipit-source-id: e45d4789200e1825e319eaf7bb70d3ff52c12325
2016-02-09 18:47:34 -08:00
David Aurelio 7c03b16a1b / [node-haste] Remove support for asynchronous dependencies (`System.import`)
Summary:
public
Remove the unused feature for async dependencies / bundle layouts. We can bring it back later, if needed.

Reviewed By: cpojer

Differential Revision: D2916543

fb-gh-sync-id: 3a3890f10d7d275a4cb9371a6e9cace601a82b2c
shipit-source-id: 3a3890f10d7d275a4cb9371a6e9cace601a82b2c
2016-02-09 17:17:57 -08:00
Sam de3b942b4d make copyright render the current year
Summary:
As discussed here https://github.com/facebook/react-native/pull/5835 now the copyright is computed from `Date`
Closes https://github.com/facebook/react-native/pull/5847

Reviewed By: svcscm

Differential Revision: D2918854

Pulled By: androidtrunkagent

fb-gh-sync-id: bd5a56111aec1282857ffd469b91f7476b67221d
shipit-source-id: bd5a56111aec1282857ffd469b91f7476b67221d
2016-02-09 16:22:35 -08:00
Adam Miskiewicz 9f01f96770 Move `react` to peerDependencies
Summary:
This PR moves `react` from dependencies to peerDependencies.

In general, this would have only been important for those people using packages that depend on `react` and were using npm@2...npm@3 would automatically de-dupe.

However, when #5812 gets merged, dependencies will be scoped to react-native (on both npm@2 & npm@3), thus breaking projects that are using a package like `react-redux` for example, which depends on `react`. There would be two copies of React installed, and due to the use of haste modules in `react`, this would break the packager and cause naming collisions.

This PR does three things -

1. Moves the dependency from dependencies to peerDependencies
2. Updates the local-cli to run `npm install react --save` when a new project is initialized.
3. Updates `react-native upgrade` to warn if `react` is not listed in the package.json's dependencies.

**Note: This will require a shrinkwrap update.**
Closes https://github.com/facebook/react-native/pull/5813

Reviewed By: svcscm

Differential Revision: D2918380

Pulled By: androidtrunkagent

fb-gh-sync-id: 6e4234a45284be2fdf6fedf29e70b2d2d0262486
shipit-source-id: 6e4234a45284be2fdf6fedf29e70b2d2d0262486
2016-02-09 15:38:37 -08:00
Pieter De Baets d97223bc3b Replace usages of hexToRgb with setNormalizedColorAlpha
Reviewed By: vjeux

Differential Revision: D2906507

fb-gh-sync-id: 671ec5b9f5a701891c3601a8f78968b99476a2b5
shipit-source-id: 671ec5b9f5a701891c3601a8f78968b99476a2b5
2016-02-09 14:58:34 -08:00
Chris Hopman d80ee0a8ac Clean up some includes/dependencies
Reviewed By: astreet

Differential Revision: D2905196

fb-gh-sync-id: d92f0e0296f4877b589cac674e388a5dbabc7d71
shipit-source-id: d92f0e0296f4877b589cac674e388a5dbabc7d71
2016-02-09 13:02:04 -08:00
Chris Hopman 48f82e4e2b Use our own noncopyable in react/
Reviewed By: astreet

Differential Revision: D2905195

fb-gh-sync-id: feede5288ef2d5de9dbd9802280e51f8782070ec
shipit-source-id: feede5288ef2d5de9dbd9802280e51f8782070ec
2016-02-09 13:01:59 -08:00
Chris Hopman 7cda49d516 Use c++ exceptions in react/
Reviewed By: astreet

Differential Revision: D2905193

fb-gh-sync-id: ddb4c615ede606e99c92a09a96a15141b912ef72
shipit-source-id: ddb4c615ede606e99c92a09a96a15141b912ef72
2016-02-09 13:01:52 -08:00
Chris Hopman 229c8c35c9 Remove jni dependencies from Bridge.h/cpp
Reviewed By: astreet

Differential Revision: D2905191

fb-gh-sync-id: 7510ef1d1b87ff50f35195d5ca8c0dd98f81526f
shipit-source-id: 7510ef1d1b87ff50f35195d5ca8c0dd98f81526f
2016-02-09 13:01:44 -08:00
Martin Konicek 1d561fd604 New release process: Fix installArchives
Reviewed By: mkonicek

Differential Revision:D2917191
Ninja: Only related to open source React Native, does not affect any fb apps

fb-gh-sync-id: c4fc80ebdd520942e75161a4a30ea4d18030bec4
shipit-source-id: c4fc80ebdd520942e75161a4a30ea4d18030bec4
2016-02-09 10:30:32 -08:00
Corentin Smith 157b5274b7 Update debugging docs with YellowBox/RedBox
Summary:
See https://github.com/facebook/react-native/issues/5271
Closes https://github.com/facebook/react-native/pull/5737

Reviewed By: svcscm

Differential Revision: D2917002

Pulled By: mkonicek

fb-gh-sync-id: 9c7cb62b3141d8af1b0213c795cf7c3f334eecd6
shipit-source-id: 9c7cb62b3141d8af1b0213c795cf7c3f334eecd6
2016-02-09 10:23:34 -08:00
sunnylqm 54da3926d9 Make the docs of time and date picker in order
Summary: Closes https://github.com/facebook/react-native/pull/5841

Reviewed By: svcscm

Differential Revision: D2916710

Pulled By: androidtrunkagent

fb-gh-sync-id: b698cefc29ded291952b35feaad86cff023c8c6e
shipit-source-id: b698cefc29ded291952b35feaad86cff023c8c6e
2016-02-09 09:16:34 -08:00
Martin Konicek e0f0bd2832 New release process: simplify installArchives
Summary:
Output the Android artifacts in the new location so we can simply
do `./gradlew :ReactAndroid:installArchives` and `npm publish`.

**Test Plan**

Same as test plan of 702f999b05 without having to manually move the artifacts.

public

Reviewed By: bestander

Differential Revision: D2916664

fb-gh-sync-id: 27dcc711b3055a5a6c554ed1e69cf4a64add849c
shipit-source-id: 27dcc711b3055a5a6c554ed1e69cf4a64add849c
2016-02-09 08:34:59 -08:00
Krzysztof Magiera 788e25894e Move SimpleArray and SimpleMap from test to src.
Summary:
As a part of this change I'm also renaming SimpleArray to JavaOnlyArray and SimpleMap to JavaOnlyMap. The main reason for the change is to support use-cases such as driving animations form the native code. In the case of native "animated" I'd like to be able to use the same interface as JS is using for updating the View properties. As view setters can take ReadableMap and ReadableArray as an argument in some cases it is necessary to create and pass those types to the setter. Using WritableNativeArray and WritableNativeMap for this purpose seems to me like a misuse and IMO will be less performant (vs java-only map/array) as those implementations of ReadableMap and ReadableArray proxies all their methods through JNI.

I'm also adding some additional class-level comments for the moved classes to avoid confusion and hopefuly prevent people from using those classess accidentally while writing native modules or methods that calls to JS.
Closes https://github.com/facebook/react-native/pull/5816

Reviewed By: svcscm

Differential Revision: D2911339

Pulled By: foghina

fb-gh-sync-id: 5b9a98d64f48d8bba34c15e3eecba2151da3577a
shipit-source-id: 5b9a98d64f48d8bba34c15e3eecba2151da3577a
2016-02-09 08:18:21 -08:00
Martin Konicek 47dac4ff50 New release process: Fix path in release.sh 2016-02-09 16:13:33 +00:00
Martin Konicek 8a9996c5c7 New release process: Update release script and docs 2016-02-09 16:09:10 +00:00
Martin Konicek f7468ec356 Update Releases.md 2016-02-09 16:00:49 +00:00
Martin Konicek 702f999b05 Consume Android artifacts from npm
Summary:
This lets us say goodbye to Maven Central. This will greatly simplify
and speed up the release process as releasing Android artifacts to
Maven Central adds a lot of [complexity](https://github.com/facebook/react-native/blob/master/Releases-publish.md)
and delays the whole release by several hours when we have to wait
for the artifacts to propagate.

This diff assumes there's a local Maven repo at
`node_modules/react-native/android`.

The second part once this lands is to change our `release.sh` script to
output the artifacts under `react-native/android` before publishing to
npm.

This adds 3.7MB to the size of `node_modules` of any app. However,
we just download eagerly what we'd normally download later via Gradle.

**Test plan**

Released RN including a local Maven repo into Sinopia:

    $ cd react-native
    # Updated version in gradle.properties to 0.21.0
    $ ./gradlew ReactAndroid:installArchives
    # Moved everything in .m2/repository/com/facebook/react to react-native/android
    $ ls react-native/android
    com/facebook/react/react-native/0.21.0/react-native-0.21.0.aar
    com/facebook/react/react-native/0.21.0/react-native-0.21.0.pom
    com/facebook/react/react-native/maven-metadata.xml
    ...

    # Set version in package.json to 0.21.0
    $ npm set registry http://localhost:4873/
    $ npm publish

Created and ran an app:

   $ cd /tmp
   $ react-native init AndroidNpm
   $ cd AndroidNpm
   $ react-native run-android

It worked.

Checked that we're using the artifacts from node_modules/react-native/android:

    $ cd android
    $ ./gradlew app:dependencies
    compile - Classpath for compiling the main sources.
    +--- com.android.support:appcompat-v7:23.0.1
    |    \--- com.android.support:support-v4:23.0.1
    |         \--- com.android.support:support-annotations:23.0.1
    \--- com.facebook.react:react-native:+ -> 0.21.0
         +--- com.google.code.findbugs:jsr305:3.0.0
         +--- com.facebook.stetho:stetho-okhttp:1.2.0
    ...

Checked that Android Studio can find the source jars (you can navigate to RN sources in Android Studio). Opened the new project as described in the [docs](https://facebook.github.io/react-native/docs/android-setup.html#editing-your-app-s-java-code-in-android-studio).

public

Reviewed By: bestander

Differential Revision: D2912557

fb-gh-sync-id: 251c180518a3fb9bb8e80963b236e982d65533be
shipit-source-id: 251c180518a3fb9bb8e80963b236e982d65533be
2016-02-09 06:37:34 -08:00
slycoder 758d9e8304 Add observers for local notifications
Summary:
This commit adds the delegate hooks so that local notifications get
passed onto the JS and adds a new event listener type for local
notifications.

Also add functions to clear local notifications
Closes https://github.com/facebook/react-native/pull/2084

Reviewed By: svcscm

Differential Revision: D2908096

Pulled By: nicklockwood

fb-gh-sync-id: 759d299ea35abea177e72934076297d666d3ea20
shipit-source-id: 759d299ea35abea177e72934076297d666d3ea20
2016-02-09 05:46:33 -08:00
Ryan Linton c6366e4dd8 Use media url instead of reference url when picking movie types in image picker
Summary:
I ran into an issue trying to upload videos selected with ImagePickerIOS to S3. The file would upload just fine but would be reduced in size and have no duration. It appears to be just a thumbnail of the video. Using the media url resolves this.
Closes https://github.com/facebook/react-native/pull/5771

Reviewed By: svcscm

Differential Revision: D2905720

Pulled By: nicklockwood

fb-gh-sync-id: 4b0200652c3b6a62cdb65deb582fbc5829c577a6
shipit-source-id: 4b0200652c3b6a62cdb65deb582fbc5829c577a6
2016-02-09 04:45:33 -08:00
Nick Lockwood 855d411321 Moved constants export to bridge init
Summary:
public
Lazy export of module constants required a sync dispatch to the main thread, which was deadlocking in some of our projects.

This moves the constants export to the initial bridge init, which may slightly increase initial startup time, but avoids the deadlock.

Reviewed By: javache

Differential Revision: D2911295

fb-gh-sync-id: 0d14a629ac4fc7ee21acd293c09595c18232659b
shipit-source-id: 0d14a629ac4fc7ee21acd293c09595c18232659b
2016-02-09 03:30:32 -08:00
Eric Vicenti 7b2b0c3c1c Navigation Back support and examples for Android
Summary:
public
- Intro new back action
- Add support in the two main reducers
- Use it in examples to support Android back button
- Disable NavigationCard gestures on Android

Reviewed By: hedgerwang

Differential Revision: D2914154

fb-gh-sync-id: d4dce6538e19613a2ffca21e2e3b2ecaded3d5dc
shipit-source-id: d4dce6538e19613a2ffca21e2e3b2ecaded3d5dc
2016-02-08 20:03:31 -08:00
Hedger Wang 7b57b5c84a re-render the whole navigation bar while calling immediatelyResetRouteStack
Summary:
public

Navigator expects that the navigation bar implements the method to refresh itself.
NavigatorNavigationBar already has this method but not for NavigatorBreadcrumbNavigationBar.

Fix diff fixes this with the same fix as D2751922 did.

Reviewed By: wenjingw

Differential Revision: D2914475

fb-gh-sync-id: a2960bad5df3b403bdd2ab1dc4d349d7251b86c8
shipit-source-id: a2960bad5df3b403bdd2ab1dc4d349d7251b86c8
2016-02-08 19:51:35 -08:00
chirag04 05e4236b80 document date and timer picker android
Summary: Closes https://github.com/facebook/react-native/pull/5826

Reviewed By: svcscm

Differential Revision: D2913829

Pulled By: vjeux

fb-gh-sync-id: a4adeb6ba402bbd0ff3cea00429e79c140b965dd
shipit-source-id: a4adeb6ba402bbd0ff3cea00429e79c140b965dd
2016-02-08 15:41:34 -08:00
Martin Konicek abdca047b0 Add a note about Android Studio to docs, fix formatting
Summary:
We should use 4 spaces of indentation in the MainActivity template as this
is the most common setting outside fb.

public

Reviewed By: bestander

Differential Revision: D2911952

fb-gh-sync-id: 3b5285945f0033d7342348b7a7cbafa32809f7dc
shipit-source-id: 3b5285945f0033d7342348b7a7cbafa32809f7dc
2016-02-08 15:25:32 -08:00
Renyu Liu 843b556769 Fix the perspective projection
Reviewed By: kukulski

Differential Revision: D2907261

fb-gh-sync-id: 3954b015ece9c4339a674c4fcc2c2c7187b6da41
shipit-source-id: 3954b015ece9c4339a674c4fcc2c2c7187b6da41
2016-02-08 15:06:32 -08:00
Adam Miskiewicz 194092e729 Adding 'transform-symbol-member' transform to preset.
Summary:
Turns out, even after discussion that was had in https://github.com/facebook/react-native/pull/5294#issuecomment-174397103, we really do need this transform.

I've just included it in the preset...let me know if you all would rather publish to npm.

The actual reason why this is necessary is because in the latest sync from FB, fbjs was updated to use the `Symbol.iterator` express in it's isEmpty function: 064a484e18

We use this in RN in the ListView...and this change (once #5084 is merged) will cause ListView to break on older JSC context's.

This resolves that, and is probably something we should have had all along.
Closes https://github.com/facebook/react-native/pull/5824

Reviewed By: svcscm

Differential Revision: D2913315

Pulled By: vjeux

fb-gh-sync-id: abaf484a9431b3111e8118d01db8d2c0d2dd73ca
shipit-source-id: abaf484a9431b3111e8118d01db8d2c0d2dd73ca
2016-02-08 15:01:36 -08:00
Andrei Coman 5a109ae43b Make keyboard detection more robust
Reviewed By: nspaun

Differential Revision: D2905647

fb-gh-sync-id: 0bd5405f32a5e63c9f85178b4d1f777fe032f8d5
2016-02-08 11:46:39 -08:00
Andrei Coman 4254e8a0a9 Fix DisplayMetrics KeyboardListener dependency
Summary:
public
KeyboardListener needs DisplayMetrics to be initialized when it is attached. At
the moment, this breaks easily whenever we change these components, since DisplayMetrics are intialized
in a module and KeyboardListener is created eagerly in ReactRootView, whereas
ReactRootView can exist without the instance.
This changes to create DisplayMetrics as soon as possible, when the react
instance is built. The KeyboardListener is created and attached after the ReactRootView is
attached to an existing instance, point at which DisplayMetrics have to be
initialized.

Reviewed By: dmmiller

Differential Revision: D2911351

fb-gh-sync-id: 64d1805c5d5b2f6876adb694b565a2df059b381d
2016-02-08 11:46:32 -08:00
David Aurelio 6b74535e97 Clean up Bundler
Summary:
The bundler class had duplicated code and parts that were hard to follow, because functions accepted heterogenous arguments, leading to a lot of conditionals.

This commit tries to remove duplication between build steps of different type of bundles, and by accepting less different types of arguments. These differences are now handled further up the call stack.

public

Reviewed By: sebmarkbage

Differential Revision: D2905807

fb-gh-sync-id: ef85ea0d461a9a06a4a64480e014a5324c4ef532
2016-02-08 11:19:31 -08:00
mattds 4937a4c5cd Added support for corner radii in Android
Summary:
This is a cut down version of a previous pull request with just the 4 corners catered for.
Closes https://github.com/facebook/react-native/pull/4252

Reviewed By: svcscm

Differential Revision: D2911959

Pulled By: androidtrunkagent

fb-gh-sync-id: 7ddcd684d90d4d92ccefed906c0126e92818dcde
2016-02-08 10:43:35 -08:00
sospartan 17fcc9440f allow use external typeface in native code
Summary:
Expose method to implement changing font family cache.  Like ide suggested in #4420 , this will helpful for using remote font file (use `Typeface#createFromFile` to load downloaded font file).
iOS's CoreText  already allow this in native code.
Closes https://github.com/facebook/react-native/pull/4696

Reviewed By: bestander

Differential Revision: D2911762

Pulled By: andreicoman11

fb-gh-sync-id: a931e2e711dd94fa0df6fdd066827756d862a4ba
2016-02-08 10:10:32 -08:00
Csaba Palfi 0a6604fa96 Fix Movies example deprecation warning
Summary: Closes https://github.com/facebook/react-native/pull/5802

Reviewed By: svcscm

Differential Revision: D2911814

Pulled By: androidtrunkagent

fb-gh-sync-id: b623827442fdde53a64e17b7d7842e3a268cf016
2016-02-08 10:07:35 -08:00
Andrei Coman 6b63afb097 Add invariant for null root ids
Reviewed By: astreet

Differential Revision: D2911414

fb-gh-sync-id: 7d7a4144765e093de18b442f7304693556fdfc2f
2016-02-08 09:16:56 -08:00
Jagdeep Nagpal 1cf605dda3 Fix Product Flavour builds
Summary:
- Capitalise productFlavorName for target path
- Capitalise buildType in sourceName when flavour exists
- Fix the path the assets are added.
- Backward compatibility with bundleIn(buildTypeName) when flavours are added
Closes https://github.com/facebook/react-native/pull/5580

Reviewed By: svcscm

Differential Revision: D2911735

Pulled By: mkonicek

fb-gh-sync-id: 6fb391a12ee27ee2a503961d8779a85d31cf5367
2016-02-08 09:05:31 -08:00
sunnylqm fca18652d0 fix markdown format problem
Summary: Closes https://github.com/facebook/react-native/pull/5819

Reviewed By: svcscm

Differential Revision: D2911774

Pulled By: vjeux

fb-gh-sync-id: 07737648216c775889742c81b82ec9b08e003a8f
2016-02-08 08:55:30 -08:00
Konstantin Raev 3c74a2595a Disable proguard
Summary:
until we have an automated test in CI
Closes https://github.com/facebook/react-native/pull/5775

Reviewed By: svcscm

Differential Revision: D2911639

Pulled By: mkonicek

fb-gh-sync-id: 26d8194dd5a6fd7210f4b014787e6847217dd7f1
2016-02-08 08:15:37 -08:00
Tadeu Zagallo c00049ce4f Expose flow events to JS + add JS -> Native flows
Summary:
public

Expose JS hooks to create flow events in systrace (the nice arrows to show async work flow) +
add support to the showing all the work enqueued from the JS thread as added in D2743733

Depends on D2743733

Reviewed By: jspahrsummers

Differential Revision: D2815293

fb-gh-sync-id: 4278f61a67a6e78cf2704bacce34b1389328c6df
2016-02-08 07:07:34 -08:00
Pieter De Baets 042862a010 Update Interpolation to use new color format
Reviewed By: bestander

Differential Revision: D2911363

fb-gh-sync-id: eddfc1f1e33ee6c74f3a492a69f6d93de018e4ae
2016-02-08 04:49:33 -08:00