Commit Graph

3063 Commits

Author SHA1 Message Date
Martin Konicek 2d7747ecb7 Add NativeMethodsMixin docs to website 2015-10-07 18:04:55 +01:00
Kyle Corbitt 381e2acd18 Document NativeMethodsMixin
Summary: This is related to the discussion in #3155.

I've documented the methods in this mixin, and pointed to other appropriate documentation where necessary as well.

I didn't end up adding any examples. I wanted to add a `focus()`/`blur()` example to the UIExplorer app, but the app seems to be broken on master at the moment (`Requiring unknown module "event-target-shim"`) and I didn't bother trying to fix it. I think the last thing necessary for making the usage of these methods clear is an example of calling one or more of them on a `ref` or view captured in some other way. However, `setNativeProps` is well documented in the "Direct Manipulation" guide, which I link to from this page, so by extension it should be possible to figure out the functionality of the other methods.

cc @mkonicek @​astreet
Closes https://github.com/facebook/react-native/pull/3238

Reviewed By: @​svcscm

Differential Revision: D2517187

Pulled By: @mkonicek

fb-gh-sync-id: 4e68b2bc44ace83f06ae2e364ca0c23a7c461b20
2015-10-07 09:43:22 -07:00
Satyajit Sahoo f4857a6d42 Implement WebSocket module for Android. Fixes #2837
Summary: The JavaScript code for Android is same as the iOS counterpart, I just added few new lines and used arrow functions instead of binding `this`.
Closes https://github.com/facebook/react-native/pull/2839

Reviewed By: @​svcscm, @vjeux

Differential Revision: D2498703

Pulled By: @mkonicek

fb-gh-sync-id: 3fe958dd5af0efba00df07515f8e33b5d87eb05b
2015-10-07 08:36:22 -07:00
Martin Konicek 57a7387d85 Merge pull request #3061 from satya164/signed-apk
[Android] Added docs about generating a signed APK
2015-10-07 16:28:35 +01:00
Andrei Coman c805157cac Fix touch target computation
Differential Revision: D2516811

fb-gh-sync-id: 1f3490f969912f1eb8f4d49a5daa976314bbc25f
2015-10-07 01:54:22 -07:00
Mike Armstrong fb90ba6ded Use new hybrid inheritance for NativeArray and descendants
Differential Revision: D2516708

fb-gh-sync-id: 75bc2d7095ffe2c397d5ffb34b621b322b858c3e
2015-10-07 01:02:24 -07:00
Mike Armstrong 8251f1c905 Systrace stub fixes
Differential Revision: D2516670

fb-gh-sync-id: 89d7fdce569d4b37633fb4ab4acbeef707d54bac
2015-10-06 23:58:23 -07:00
James Ide 9dfd487810 Merge pull request #3258 from winfieldco/master
Adding AIGA Design Conference app to showcase
2015-10-06 23:23:59 -07:00
Christopher Auyeung ffd3f6941b Adding AIGA Design Conference app to showcase 2015-10-06 23:56:44 -04:00
Martin Konicek 0a419650ce Open source ViewPagerAndroid
Reviewed By: @foghina

Differential Revision: D2513014

fb-gh-sync-id: d9bb668d76939ad85b657233c8b7beac9b244fab
2015-10-06 20:01:21 -07:00
Sebastian Markbage 6244fd003d Refactor Attribute Processing (Step 3)
Reviewed By: @spicyj

Differential Revision: D2514193

fb-gh-sync-id: 8ba55014e8d052c69d8e1def327284ec974d6837
2015-10-06 15:36:32 -07:00
Sebastian Markbage 2ea3b93784 Add warning to setNativeProps and Animated for non-nested styles
Summary: These were accidentally supported because they were merged at a lower
level. That's an implementation detail. setNativeProps should still
normalize the API.

I fixed some callers.

Setting props the normal way used to ignore these. Unfortunately we can't
warn for those cases because lots of extra props are spread. (The classic
transferPropsTo issue.)

@​public

Reviewed By: @vjeux

Differential Revision: D2514228

fb-gh-sync-id: 00ed6073827dc1924da20f3d80cbdf68d8a8a8fc
2015-10-06 15:36:23 -07:00
Martín Bigio 82b3a6b967 Merge pull request #3204 from benvinegar/GH-3202
Add --write-sourcemap option to 'bundle' cli command (fixes #3202)
2015-10-06 18:18:05 -04:00
James Ide 9d8ecb65e4 Merge pull request #3253 from yamill/showcase-wpv
Add WPV app to Showcase
2015-10-06 12:05:18 -07:00
Yamill Vallecillo 0aaa45c434 Add WPV app to Showcase 2015-10-06 14:52:28 -04:00
Andrei Coman a876b234c6 Fix element inspector
Differential Revision: D2513268

fb-gh-sync-id: c0c91cc96926eb6d222c7cbc8855342e8594a09f
2015-10-06 11:41:32 -07:00
Robert Fleischmann 0de9e0104a Provide default loading view for React views in Wilde
Reviewed By: @javache

Differential Revision: D2496540

fb-gh-sync-id: 31488a6d1fc1f679ab4361d6a8d48f19b2347703
2015-10-06 10:39:28 -07:00
Pieter De Baets 9e81dec5e4 Only dismiss <Modal> once
Reviewed By: @nicklockwood

Differential Revision: D2512593

fb-gh-sync-id: b56eacd3965de76d6b7288199eabeaa5f63547cd
2015-10-06 10:29:27 -07:00
Spencer Ahrens 36cbe74f99 introduce universal switch
Reviewed By: @vjeux, @mkonicek

Differential Revision: D2441456

fb-gh-sync-id: c4050ec86f30234ea29c38205d668157bde65a35
2015-10-06 10:29:22 -07:00
Felix Oghina 8f7748748e Revert [React Native] Refactor Attribute Processing (Step 3)
Reviewed By: @kmagiera, @mikearmstrong001

Differential Revision: D2512548

fb-gh-sync-id: bcae3a8c85bfcfa468f2128288a25f406d78cf08
2015-10-06 10:29:18 -07:00
Mike Armstrong 5d682d65f6 set JS profiling global to true, fix to parsing of strings with ascii value >=128
Reviewed By: @mkonicek

Differential Revision: D2512320

fb-gh-sync-id: 098727cd664f0f0cdb0092875a9934a5d7b577f2
2015-10-06 10:29:11 -07:00
Felix Oghina b5890e1283 use listview for redbox stacktrace, open file on click
Reviewed By: @andreicoman11

Differential Revision: D2512364

fb-gh-sync-id: 5f2c90db7eca010185080f726fd3ef0ee519cdbc
2015-10-06 10:29:06 -07:00
Pieter De Baets 06ef95799a Allow nil tabbar item icon
Reviewed By: @nicklockwood

Differential Revision: D2508310

fb-gh-sync-id: e4eaf1237cca380b74d154c3cda50379fbafcf00
2015-10-06 10:29:01 -07:00
Pieter De Baets 81278d1a39 Fix UIExplorer integration tests
Reviewed By: @vjeux

Differential Revision: D2510761

fb-gh-sync-id: 21ec8988305ba9f3526277a8b445676ac4fcf3aa
2015-10-06 10:28:57 -07:00
Andrei Coman ea8d0b6c1f Protect against SQLiteFullExceptions
Reviewed By: @kmagiera

Differential Revision: D2512317

fb-gh-sync-id: 93fd65ebd88e42b5afc4e06c0612576101f15c97
2015-10-06 10:28:51 -07:00
Bret Johnson b7b83e4f12 Fixed to use ; instead of : as the path delimiter on Windows, for NDK_MODULE_PATH
Summary: Also fixed the extra slash before first-party in that path (it was ...//first-party
and is now .../first-party).  The $dir funct always produces a result that ends with
a /, so APP_MK_DIR always ends in a / and no extra / is needed when appending to it.
With these two changes all of React Native for Android, including C++, seems to
build OK on Windows 😄
Closes https://github.com/facebook/react-native/pull/2961

Reviewed By: @​svcscm

Differential Revision: D2512239

Pulled By: @kmagiera

fb-gh-sync-id: 4fbc9fc85bab455b8ed1e07a8ac299a48921753e
2015-10-06 10:28:46 -07:00
Sebastian Markbage ac5b7548d2 Refactor Attribute Processing (Step 3)
Summary: Decouple processStyle from the main reconciliation. It is now a process
extension to the style attribute `transform`. This effectively decouples a
large portion of special cases and helper dependencies from the reconciler.

The transform attribute becomes translated into the transformMatrix attribute on
the native side so this becomes a little weird in that I have to special case
it. I don't think it is worth while having a general solution for this so I
intend to rename the native attribute to `transform` and just have it accept the
resolved transform. Then I can remove the special cases.

The next step is generalizing the flattenStyle function and optimizing it.

@​public

Reviewed By: @vjeux

Differential Revision: D2460465

fb-gh-sync-id: 243e7fd77d282b401bc2c028aec8d57f24522a8e
2015-10-06 10:28:41 -07:00
Sebastian Markbage 8e3ce0ff98 Refactor Attribute Processing (Step 2)
Summary: Move the ViewAttributes and StyleAttributes configuration into the
Components library since they're coupled and change with the
native component configuration.

This also decouples StyleAttributes from the reconciler by adding it
to the ReactViewAttributes.

To do that, I refactored the property diffing to allow for recursive
configurations. Now an attribute configuration can be a nested object,
a custom configuration (diff/process) or true.

The requireNativeComponent path incorrectly gets its attributes set up
on the root validAttributes instead of the nested style object.
So I also have to add the nested form. Effectively these currently allow
these attributes on props or nested.

@​public

Reviewed By: @vjeux

Differential Revision: D2456842

fb-gh-sync-id: cd5405bd8316c2fcb016d06c61244ce7719c26c0
2015-10-06 10:28:35 -07:00
Sebastian Markbage 6c5024ec58 Refactor Attribute Processing (Step 1)
Summary: Concolidate the creation of the "update payload" into
ReactNativeAttributePayload which now has a create
and a diff version. The create version can be used by
both mountComponent and setNativeProps. This means that
diffRawProperties moves into ReactNativeAttributePayload.

Instead of storing previousFlattenedStyle as memoized
state in the component tree, I recalculate it every
time. This allows better use of the generational GC.
However, it is still probably a fairly expensive
technique so I will follow it up with a diff that
walks both nested array trees to do the diffing in a
follow up.

This is the first diff of several steps.

@​public

Reviewed By: @vjeux

Differential Revision: D2440644

fb-gh-sync-id: 1d0da4f6e2bf716f33e119df947c044abb918471
2015-10-06 10:28:27 -07:00
Madelaine Boyd 62e8ddc205 Revert g90f63f5c6fbbadd3ce6486e65d6fe6f967f56db6: [RN] add allTime vs. perBatch UIManager stats
fb-gh-sync-id: cef98420bcb8e708196bd5e162fa5dc4003b4fa2
2015-10-05 17:34:23 -07:00
Martin Bigio 725e3eba6e Fix bad require
Reviewed By: @vjeux, @​swarr

Differential Revision: D2509919

fb-gh-sync-id: 8c3555d080a2b49c3a1effbe5c7e1d31a9a04767
2015-10-05 15:32:22 -07:00
Spencer Ahrens 340229303f add allTime vs. perBatch UIManager stats
Summary: @​public

UIManagerStatTracker now provides allTime and perBatch stats so it's easy to see
how bit each batch is.

Reviewed By: @vjeux

Differential Revision: D2506218

fb-gh-sync-id: 635556185245d2bd6cb149497ea60b503b2523ce
2015-10-05 14:19:08 -07:00
Spencer Ahrens b0bdd4e45d Fix ListView bug where onEndReached wouldn't trigger initially
Summary: @​public

Sometimes we want to load a very small number of rows initially and want the
onEndReached callback to be called immediately to trigger more data to be
loaded without waiting for the  user to scroll at all.  This diff makes that
happen by also checking on mount instead of only when scrolling.

Reviewed By: @vjeux

Differential Revision: D2507184

fb-gh-sync-id: ea8e47667d00387a935a426dd45afe978fd6d8cd
2015-10-05 13:49:00 -07:00
Christopher Chedeau d409f13abe Merge pull request #3241 from vjeux/warning_cli
[cli] Add a big warning to stop people from modifying the global cli
2015-10-05 11:21:51 -07:00
Christopher Chedeau cfd19bb6cd [cli] Add a big warning to stop people from modifying the global cli 2015-10-05 11:20:04 -07:00
Tadeu Zagallo ad622f20f2 Fix wrong source map test
Reviewed By: @javache
2015-10-05 11:15:20 -07:00
Alexey Lang 7b514c63df Log native modules init time and config inject time separately
Reviewed By: @jspahrsummers

Differential Revision: D2508010
2015-10-05 11:05:23 -07:00
Martin Konicek fd124f0cbe Merge pull request #3240 from vjeux/cli_contributing
[cli] Use contributing.md as readme
2015-10-05 19:02:42 +01:00
Christopher Chedeau 92fd668653 [cli] Use contributing.md as readme
The readme is basically empty but contributing has a ton of useful information. Github's interface show everything in readme inline when you open the folder, so might as well make this information more visible.
2015-10-05 10:57:39 -07:00
Martin Konicek 2c522cd16c Update KnownIssues.md 2015-10-05 18:53:00 +01:00
Andrei Coman 166a96bcee Fix keyboardShouldPersistTaps default value
Reviewed By: @astreet

Differential Revision: D2507878
2015-10-05 10:25:21 -07:00
Pieter De Baets babdeb33ba Make processColor more efficient
Reviewed By: @nicklockwood, @vjeux

Differential Revision: D2507684
2015-10-05 10:15:34 -07:00
Felix Oghină 787895e903 check for destroyed instance before calling native method
Differential Revision: D2508050
2015-10-05 09:30:51 -07:00
Martin Konicek 85370ecba6 Update KnownIssues.md 2015-10-05 17:23:57 +01:00
Martín Bigio 9a22b1e78b Introduce internal `server` command
Reviewed By: @frantic

Differential Revision: D2449459
2015-10-05 09:21:34 -07:00
Martín Bigio 7ad418a396 Move fbobjc bundle command to cli
Reviewed By: @frantic

Differential Revision: D2457072
2015-10-05 09:21:27 -07:00
Martin Konicek fe477fbdb4 Update KnownIssues.md 2015-10-05 17:20:13 +01:00
Martin Konicek c99e8cbb5e Update KnownIssues.md 2015-10-05 16:51:28 +01:00
Tadeu Zagallo 753cc7683c Fix minified source maps
Summary: @​public

The source maps generated by uglify are already stringified, and therefore were
being stringified twice.

Reviewed By: @martinbigio

Differential Revision: D2498242
2015-10-05 08:48:25 -07:00
Mike Armstrong 17c49e2879 systrace of Fresco
Differential Revision: D2507874
2015-10-05 08:07:31 -07:00