Summary:
@public
1. Default to first class support of popular image formats
2. Add tests to make sure we support other than png
Test Plan:
1. ./runJestTests.sh
2. Add test.png and test.jpg images in the Playground app dir
3. require both images and render then in the playground app
4. they render
Summary:
Fixes https://github.com/facebook/react-native/issues/1332
When the absolute left position is not set to zero on a provided sceneStyle, scene enabling is broken and no scene will be visible when it is pushed. This was broken recently when the scene disabling was modified to push the scenes offscreen.
Closes https://github.com/facebook/react-native/pull/1347
Github Author: Eric Vicenti <evv@fb.com>
@public
Test Plan: Tested when pushing a scene Navigator in the UIExplorer example while sceneStyle is set on the Navigator
Summary:
Fixes https://github.com/facebook/react-native/issues/1252
Scenes dismissed/popped via a gesture were not being removed. This is probably a regression from an earlier refactor.
Test plan: log statements after scene focusing now reports that `navigator.getCurrentRoutes().length` lowers after gesture. Tested on UIExplorer Navigator example
Closes https://github.com/facebook/react-native/pull/1346
Github Author: Eric Vicenti <evv@fb.com>
@public
Test Plan: Imported from GitHub, without a `Test Plan:` line.
Summary:
Closes https://github.com/facebook/react-native/pull/1260
Github Author: Luke <kejinlu@gmail.com>
Test Plan: Created `class Foo extends React.Component` and made sure error messages were good.
Summary:
D2052669 introduced a block for objects that had to be invalidated on the main
thread, but after the JS thread objects, but the block was being dispatched on
the JS thread.
@public
Test Plan:
I added `RCTAssertMainThread()` to the `mainThreadInvalidate` block, it was
crashing on reload, but now it should work as expected.
Summary:
ActivityIndicator was forwarding all of its props except `style` to the inner native view. This meant that onLayout would report a zero-sized frame that was relative to the wrapper view instead of the parent of the ActivityIndicator.
This diff adds `onLayout` to the wrapper view instead of the native view.
In general, all components that forward props need to be audited in this manner.
Closes https://github.com/facebook/react-native/pull/1292
Github Author: James Ide <ide@jameside.com>
Test Plan: `<ActivityIndicator onLayout={...} />` reports the size of the spinner plus a position relative to its parent view.
Summary:
Many apps don't need AdSupport, especially not when people are making a sample app to learn React. Apps that do want it can link it in like any other library.
Fixes#1303, see the discussion there.
Closes https://github.com/facebook/react-native/pull/1305
Github Author: James Ide <ide@jameside.com>
Test Plan: Imported from GitHub, without a `Test Plan:` line.
Summary:
@public
Apparently trailing commas transform isn't exported by react-tools. We need to pull it out manually. This is not so clean but we're swtching to babel very shortly.
Test Plan:
* npm start
* write `foo(a,b,c,)` in some file
* request that file in the browser and make sure that trailing comma is gone
Summary:
ListViewDataSource's default data extractor can actually expect another data form:
`{ sectionID_1: [ <rowData1>, <rowData2>, ... ], ... }`
Closes https://github.com/facebook/react-native/pull/1285
Github Author: Zhao Han <cx.chenghai+github@gmail.com>
Test Plan: Changed the ListViewExample to make sure all three formats work.
Summary:
`TextInput` does not automatically forward all props using the spread operator so we need to explicitly forward the `onLayout` prop.
Closes https://github.com/facebook/react-native/pull/1296
Github Author: James Ide <ide@jameside.com>
Test Plan:
Mount a TextInput component with an `onLayout` prop and see that the callback handler is invoked with the TextInput's frame.
Summary:
The parent RCTBridge no longer tracks the JS loading since that has been handed off to the RCTBatchedBridge. To make the `loading` property accurate again, just expose the batch bridge's loading property from the parent bridge (note: I didn't make it KVO-compliant).
Fixes#1199
Closes https://github.com/facebook/react-native/pull/1200
Github Author: James Ide <ide@jameside.com>
Test Plan: Imported from GitHub, without a `Test Plan:` line.
Summary:
When I read documents, I usually 'search within page' to see where they talk about specific things.
So I found this fix to be pretty useful. Hope it'll be merged!
Closes https://github.com/facebook/react-native/pull/1146
Github Author: Yuta Okazaki <s04155yo@gmail.com>
Test Plan: Imported from GitHub, without a `Test Plan:` line.
Summary:
Some of the RCTTextView properties weren't set up correctly which would cause bugs when you'd set a property and then unset it, trying to revert to the default. This requires reading the default value from the dummy view instance, but some of these properties didn't have getters which was causing issues.
Fixes#1174
Closes https://github.com/facebook/react-native/pull/1175
Github Author: James Ide <ide@jameside.com>
Test Plan: Create a `<TextInput multiline={true}>` component. Give it a style with `color: 'blue'`, and then on the next render pass remove the style. No more red box.
Summary:
Fix the following problems resulting from running `npm run lint`:
```
Examples/Movies/SearchScreen.js
118:4 error 'fetch' is not defined no-undef
177:4 error 'fetch' is not defined no-undef
Examples/UIExplorer/MapViewExample.js
32:1 warning Missing semicolon semi
Examples/UIExplorer/NavigatorIOSColorsExample.js
48:26 warning ['lightContent'] is better written in dot notation dot-notation
Examples/UIExplorer/TabBarIOSExample.js
81:16 warning Trailing spaces not allowed no-trailing-spaces
Examples/UIExplorer/TextInputExample.js
390:7 warning Missing semicolon semi
✖ 6 problems
```
Closes https://github.com/facebook/react-native/pull/1254
Github Author: Eric Sauter <esauter@lgscout.com>
Test Plan: Imported from GitHub, without a `Test Plan:` line.
Summary:
Generated icons of the proper sizes so they show up on the home screen. It's not beautiful since the images have a transparent background but this also makes build warnings go away.
Closes https://github.com/facebook/react-native/pull/1267
Github Author: James Ide <ide@jameside.com>
Test Plan: Run app, see icon on simulator home screen
Summary:
Pretty sure this shouldn't be @provides
Closes https://github.com/facebook/react-native/pull/837
Github Author: James Ide <ide@jameside.com>
Test Plan: Imported from GitHub, without a `Test Plan:` line.
Summary:
`mountSafeCallback` simply wraps a callback in an `isMounted()` check to prevent crashes when old callbacks are called on unmounted components.
@public
Test Plan:
Added logging and made sure callbacks were getting called through
`mountSafeCallback` and that things worked (e.g. photo viewer rotation etc).