Commit Graph

1529 Commits

Author SHA1 Message Date
Brent Vatne
d6ac633de5 [Docs] Tweak wording of JavaScriptEnvironment docs 2015-05-31 10:07:42 -07:00
Joshua Sierles
f9b3f9121f update JS environment documentation for Babel, and explain what a transpiler does. 2015-05-29 22:50:03 +02:00
Brent Vatne
1a4f270931 Merge branch 'debugging-docs' 2015-05-29 13:04:54 -07:00
Brent Vatne
ee8ba19ab1 [Docs] Tweak debugging docs to be more concise 2015-05-29 13:04:25 -07:00
Flip Stewart
1a3ee99365 [Docs] Clean up debugging docs 2015-05-29 13:03:33 -07:00
Brent Vatne
1efd2c87c8 Merge pull request #1237 from nickhudkins/patch-1
[Docs] Correct homepage code examples
2015-05-28 16:36:21 -07:00
Brent Vatne
18a3d715ce [Docs] Remove indentation from codeblocks 2015-05-28 16:33:52 -07:00
Tadeu Zagallo
41859e594d Merge pull request #1432 from tadeuzagallo/Update_Thu_28_May
Updates from Thu 28 May
2015-05-28 16:52:55 +01:00
Tadeu Zagallo
9d1960948c Updates from Thu 28 May 2015-05-28 16:17:37 +01:00
Tadeu Zagallo
ebae151f24 [ReactNative] Update sane fork + FileWatcher config 2015-05-28 07:12:41 -08:00
Tadeu Zagallo
2b8f44d446 [ReactNative] Update objc-test.sh to allow running local 2015-05-28 15:11:23 +01:00
Georgiy Kassabli
d63440576d Added accessibility sample for React Native 2015-05-28 04:22:57 -08:00
Tadeu Zagallo
6075cef070 [ReactNative] Relax flow jest-cli regex 2015-05-28 01:48:16 -08:00
Tadeu Zagallo
71216de931 [ReactNative] Fix sample app tests
Summary:
@public

After the refactor on RCTText, update the SampleApp's test to use the
accessibilityLabel instead of attributedText

Test Plan: Run the SampleApp tets
2015-05-28 01:45:36 -08:00
Tadeu Zagallo
21b3304a95 [ReactNative] Add option to file watcher to ignore node_modules 2015-05-28 01:18:47 -08:00
Tadeu Zagallo
7c0756fba6 [ReactNative] Increase number of flow retries on e2e
The flow server is taking too long to start on the e2e tests in Travis and 3
retries are not being enough, increase it to 10.
2015-05-28 06:03:21 +01:00
Tadeu Zagallo
3af55b58ad [ReactNative] Fix SampleApp flowconfig regex for commoner tests 2015-05-28 06:01:47 +01:00
Tadeu Zagallo
4fc15dbf17 [ReactNative] Implement proper event coalescing 2015-05-27 20:41:20 -08:00
Tadeu Zagallo
17e9cd6297 [ReactNative] Fix UIExplorer tests
Summary:
@public

Update RootView load check due to the updates to RCTText and the snapshot
reference images due to the updates to rendering

Test Plan: Run the UIExplorer tests
2015-05-27 18:16:02 -08:00
Tadeu Zagallo
380ba2aab4 [ReactNative] Add babel to package.json 2015-05-27 17:00:14 -08:00
Tadeu Zagallo
626e435c12 [ReactNative] Update flow commoner tests regex 2015-05-27 16:33:31 -08:00
Nick Lockwood
acc42e193d Big reduction in blending 2015-05-27 16:10:54 -08:00
Nick Lockwood
455281e44d Fixed crash in RCTContextExecutor when requireJSRef == undefined 2015-05-27 08:50:03 -08:00
Brent Vatne
731335eb7c [Docs] Add DeviceEventEmitter require to NativeModulesIOS docs 2015-05-27 09:43:44 -07:00
Nick Lockwood
8d992262ed Fixed loading flicker on RCTRootView 2015-05-27 02:51:32 -08:00
Spencer Ahrens
a4442e4576 [ReactNative] rename nativeProps const to NativeProps 2015-05-26 19:28:07 -08:00
Nick Lockwood
0689c0790e Fixed crash in RCTText due to NSTextContainer/NSLayoutManager being accessed concurrently from main and shadow queues 2015-05-26 18:52:46 -08:00
Brent Vatne
95517fca41 [RCTScrollView] Make ScrollView detect taps on sticky headers
Summary:
As per discussion with @nicklockwood in #875, make `RCTScrollView` check its sticky headers for hitTests first.

Closes https://github.com/facebook/react-native/pull/1415
Github Author: Brent Vatne <brent.vatne@madriska.com>

Test Plan:
 Have a sticky header in a ScrollView with a Touchable onPress action, scroll a bit after it docks and try tapping, should respond to tap.
2015-05-26 18:30:22 -08:00
Stan Chollet
76ea00483d TabBarIOS tintColor
Summary:
[Origin Pull request](https://github.com/facebook/react-native/pull/961) from [cmcewen](https://github.com/cmcewen)

All the work have been done by @cmcewen, I just rebased his work with the master.
Closes https://github.com/facebook/react-native/pull/1337
Github Author: Stan Chollet <stanislas.chollet@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-26 17:21:36 -08:00
Changgeng Li
84783dbac4 Add renderSeparator support to ListView 2015-05-26 15:20:29 -08:00
Jared Forsyth
b839ab32be add missing require("Map") 2015-05-26 15:08:33 -08:00
henter
2a76ca635e [GeoLocation] invalidate timer after success or error callback
Summary:
Just trying to [getCurrentPosition](https://github.com/facebook/react-native/blob/master/Libraries/Geolocation/Geolocation.js#L45) , and found the `errorBlock` of location request in timeout handler would cause red error like this:

```
2015-05-10 17:50:39.607 [warn][tid:com.facebook.React.JavaScript] "Warning: Cannot find callback with CBID 5. Native module may have invoked both the success callback and the error callback."
2015-05-10 17:50:39.610 [error][tid:com.facebook.React.JavaScript] "Error: null is not an object (evaluating 'cb.apply')
 stack:
  _invokeCallback  index.ios.bundle:7593
  <unknown>        index.ios.bundle:7656
  <unknown>        index.ios.bundle:7648
  perform          index.ios.bundle:6157
  batchedUpdates   index.ios.bundle:13786
  batchedUpdates   index.ios.bundle:4689
  <unknown>        index.ios.bundle:7647
  applyWithGuard   index.ios.bundle:882
  guardReturn      index.ios.bundle:7421
  processBatch     index.ios.bundle:7646
 URL: http://192.168.100.182:8081/index
Closes https://github.com/facebook/react-native/pull/1226
Github Author: henter <henter@henter.me>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-26 14:59:14 -08:00
James Ide
769efdfcef [Packager] Fix the --root, --assetRoots, and --platform options
Summary:
Looks like these options were handled as booleans when they should be handled as strings. Explicitly specify them as strings.

Closes https://github.com/facebook/react-native/pull/1377
Github Author: James Ide <ide@jameside.com>

Test Plan:
 `packager/packager.sh --root A --root B` works. Also tested `packager/packager.sh --root A,B`.
2015-05-26 14:19:22 -08:00
Nick Lockwood
e5b134368b Fixed crash due to nil backgroundColor 2015-05-26 12:59:24 -08:00
Philipp von Weitershausen
3269af227f Back out D2098670: Allow uploading a native file (e.g. photo) via XMLHttpRequest 2015-05-26 12:50:25 -08:00
Alex Kotliarskyi
cfa4b13472 [ReactNative] Element Inspector
Summary:
This adds new development feature to React Native that provides information
about selected element (see the demo in Test Plan).

This is how it works:

App's root component is rendered to a container that also has a hidden layer called
`<InspectorOverlay/>`. When activated, it shows full screen view and captures all
touches. On every touch we ask UIManager to find a view for given {x,y} coordinates.

Then, we use React's internals to find corresponding React component. `setRootInstance`
is used to remember the top level component to start search from, lmk if you have a
better idea how to do this. Given a component, we can climb up its owners tree
to provice more context on how/where the component is used.

In future we could use the `hierarchy` array to inspect and print their props/state.

Known bugs and limitations:
* InspectorOverlay sometimes receives touches with incorrect coordinates (wtf)
* Not integrated with React Chrome Devtools (maybe in followup diffs)
* Doesn't work with popovers (maybe put the element inspector into an `<Overlay/>`?)

@public

Test Plan:
https://www.facebook.com/pxlcld/mn5k
Works nicely with scrollviews
2015-05-26 11:19:49 -08:00
Philipp von Weitershausen
4273af9e29 Allow uploading a native file (e.g. photo) via XMLHttpRequest
Summary:
With this in place, it's possible to upload a picture from the `CameraRoll` to Parse, for instance:

    xhr = new XMLHttpRequest();
    xhr.onload = function() {
      data = JSON.parse(xhr.responseText);
      var parseFile = new Parse.File(data.name);
      parseFile._url = data.url;
      callback(parseFile);
    };
    xhr.setRequestHeader('X-Parse-Application-Id', appID);
    xhr.setRequestHeader('X-Parse-JavaScript-Key', appKey);
    xhr.open('POST', 'https://api.parse.com/1/files/image.jpg');
    // assetURI as provided e.g. by the CameraRoll API
    xhr.send(new NativeFile(assetURI));

Closes https://github.com/facebook/react-native/pull/1357
Github Author: Philipp von Weitershausen <philikon@fb.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-26 09:45:34 -08:00
Philipp von Weitershausen
7069e4cd3f XMLHttpRequest: ignore case for request headers
Summary:
HTTP headers are case-insensitive, so we should treat them that way when they're being set on `XMLHttpRequest`.
Closes https://github.com/facebook/react-native/pull/1381
Github Author: Philipp von Weitershausen <philikon@fb.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-26 08:15:42 -08:00
Nick Lockwood
b7c669aa73 Fixed root view background color propagation 2015-05-26 04:18:55 -08:00
Alex Akers
81401064e5 [React Native] Fix view clipping when border radius is set 2015-05-26 02:17:07 -08:00
James Ide
64ae42c10a Merge pull request #1395 from pwmckenna/touchableopacitysinglechilddocs
Add doc warning stating that TouchableOpacity can only support a single child
2015-05-25 22:20:19 -07:00
Patrick Williams
0466bbd616 Add doc warning stating that TouchableOpacity can only support a single child 2015-05-25 22:03:43 -07:00
Brent Vatne
1586f3114c [Docs] Add note about build being required for any change to Images.xcassets 2015-05-25 12:57:54 -07:00
Brent Vatne
c2aa16607f [Docs] Clarify image docs for the current state of asset packaging 2015-05-25 12:24:50 -07:00
Christopher Chedeau
68718fd3bc Merge pull request #1384 from dsibiski/cli-package-name-validation
[CLI] Validation check for "React" package name
2015-05-25 08:30:58 -07:00
Tadeu Zagallo
9062bda79b [ReactNative] Add RCTAssertThread and restrict -[UIManager addUIBlock:] to _shadowQueue
Summary:
@public

Add `RCTAssertThread` to `RCTAssert.h` for convenience when checking the current/queue,
it accepts either a `NSString *`, `NSThread *` or `dispatch_queue_t` as the object to be checked

Also add a check to `-[RCTUIManager addUIBlock:]` - There was a discussion on github (https://github.com/facebook/react-native/issues/1365)
due to the weird behavior caused by calling it from a different thread/queue (it might be added after `batchDidComplete` has been called
and will just be dispatched on the next call from JS to objc)

Test Plan:
Change `-[RCTAnimationExperimentalManager methodQueue]` to return `dispatch_get_main_queue()` and run the 2048 example,
it should dispatch with a helpful message (screenshot on the comments)
2015-05-25 05:23:27 -08:00
Brent Vatne
ffcdf21004 [Docs] Clarify the variables provided to RCT_CUSTOM_VIEW_PROPERTY body 2015-05-24 09:35:59 -07:00
Dave Sibiski
eb3bdd997e Fixes typo 2015-05-23 18:59:33 -04:00
Brent Vatne
571aa55ef5 Update CONTRIBUTING.md - ask for a runnable example for bugs 2015-05-23 15:49:41 -07:00
Dave Sibiski
90f15940fa Adds validation check for "React" package name
- "React" is a reserve word and cannot be used as a project name since it will break the Sample app when generated
2015-05-23 16:28:04 -04:00