45 Commits

Author SHA1 Message Date
Gabe Levi
184bb1151a [Flow] v0.11.0 cleaning - Part 14 (react-native-github) 2015-05-13 13:24:36 -07:00
Spencer Ahrens
1ef4e00fba [ReactNative] Introduce onLayout events
Summary:
Simply add an `onLayout` callback to a native view component, and the callback
will be invoked with the current layout information when the view is mounted and
whenever the layout changes.

The only limitation is that scroll position and other stuff the layout system
isn't aware of is not taken into account.  This is because onLayout events
wouldn't be triggered for these changes and if they are desired they should be
tracked separately (e.g. with `onScroll`) and combined.

Also fixes some bugs with LayoutAnimation callbacks.

@public

Test Plan:
- Run new LayoutEventsExample in UIExplorer and see it work correctly.
- New integration test passes internally (IntegrationTest project seems busted).
- New jest test case passes.

{F22318433}

```
2015-05-06 15:45:05.848 [info][tid:com.facebook.React.JavaScript] "Running application "UIExplorerApp" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF"
2015-05-06 15:45:05.881 [info][tid:com.facebook.React.JavaScript] "received text layout event
", {"target":27,"layout":{"y":123,"x":12.5,"width":140.5,"height":18}}
2015-05-06 15:45:05.882 [info][tid:com.facebook.React.JavaScript] "received image layout event
", {"target":23,"layout":{"y":12.5,"x":122,"width":50,"height":50}}
2015-05-06 15:45:05.883 [info][tid:com.facebook.React.JavaScript] "received view layout event
", {"target":22,"layout":{"y":70.5,"x":20,"width":294,"height":204}}
2015-05-06 15:45:05.897 [info][tid:com.facebook.React.JavaScript] "received text layout event
", {"target":27,"layout":{"y":206.5,"x":12.5,"width":140.5,"height":18}}
2015-05-06 15:45:05.897 [info][tid:com.facebook.React.JavaScript] "received view layout event
", {"target":22,"layout":{"y":70.5,"x":20,"width":294,"height":287.5}}
2015-05-06 15:45:09.847 [info][tid:com.facebook.React.JavaScript] "layout animation done."
2015-05-06 15:45:09.847 [info][tid:com.facebook.React.JavaScript] "received image layout event
", {"target":23,"layout":{"y":12.5,"x":82,"width":50,"height":50}}
2015-05-06 15:45:09.848 [info][tid:com.facebook.React.JavaScript] "received view layout event
", {"target":22,"layout":{"y":110.5,"x":60,"width":214,"height":287.5}}
2015-05-06 15:45:09.862 [info][tid:com.facebook.React.JavaScript] "received text layout event
", {"target":27,"layout":{"y":206.5,"x":12.5,"width":120,"height":68}}
2015-05-06 15:45:09.863 [info][tid:com.facebook.React.JavaScript] "received image layout event
", {"target":23,"layout":{"y":12.5,"x":55,"width":50,"height":50}}
2015-05-06 15:45:09.863 [info][tid:com.facebook.React.JavaScript] "received view layout event
", {"target":22,"layout":{"y":128,"x":60,"width":160,"height":337.5}}
```
2015-05-07 12:27:44 -08:00
Alex Akers
1a17cceb17 [React Native] Save UIExplorer search state 2015-05-05 05:46:53 -08:00
Clay Allsopp
11f204748d Add SegmentedControlIOS
Summary:
Fixes #534:

![screen shot 2015-03-31 at 7 52 10 pm](https://cloud.githubusercontent.com/assets/153704/6934038/742ddd34-d7e3-11e4-8f55-3eb7d9d3f1cd.png)

```jsx
<SegmentedControlIOS
  tintColor="#ff0000"
  values={['One', 'Two', 'Three', 'Four']}
  selectedtIndex={0}
  momentary={false}
  enabled={true}
  onValueChange={ (value) => console.log(value) } />
```

This only supports string-based segments, not images. Also doesn't support full customization (no separator images etc); I figure this is a good MVP to lock-down a basic API

I also included a snapshot test case, but the images keep coming out funky. When I look at the sim, I see that the text labels show up for the selected segment, but the snapshot keeps coming out with no text on those segments. I tried forcing a delay, but same result. Is that explainable?

Obviously happy to change anything about the API, code-style nitpicks, etc
Closes https://github.com/facebook/react-native/pull/564
Github Author: Clay Allsopp <clay.allsopp@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-29 08:08:45 -08:00
Gabe Levi
b6e6dae6ba [Flow] Properly fix new errors as of Flow v0.10. 2015-04-27 14:56:21 -08:00
Nick Lockwood
77e38b26c5 Improved RCTActivityIndicatorView and fixed some flow errors 2015-04-26 02:17:13 -08:00
Eduardo
aa3d343547 NavigatorIOS custom nav bar colors
Summary:
NavigatorIOS with custom nav bar custom colors, working example included in
UIExplorer.

Based on pull request #318 to complete pending work based on comments.
Closes https://github.com/facebook/react-native/pull/695
Github Author: Eduardo <edo.lomeli@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-23 06:32:35 -08:00
Tadeu Zagallo
8d651a0353 [ReactNative] Sort UIExplorer examples 2015-04-13 04:34:23 -08:00
Christopher Chedeau
e8155c94dd [ReactNative] Normalize name for examples 2015-03-31 20:49:24 -08:00
Amjad Masad
c94f7c3656 [React Native] Sync from github 2015-03-27 22:09:11 -08:00
Nick Lockwood
330c1abbff [React Native] [FRC - Don't accept] View border support 2015-03-26 01:32:26 -08:00
Tadeu Zagallo
558b8c65e0 [ReactNative] s/ReactNavigator/Navigator/ 2015-03-25 20:20:57 -08:00
Nick Lockwood
f124c32143 [WIP] Added support for italics and additional font weights 2015-03-25 16:09:08 -08:00
Spencer Ahrens
15f6783f34 [ReactNative] Add snapshot tests for examples 2015-03-24 21:48:49 -08:00
Eric Vicenti
7311260e58 [ReactNative] Rename JSNavigationStack to ReactNavigator, rename scene config 2015-03-24 19:27:59 -08:00
Eric Vicenti
f9f219efcb [ReactNative] OSS Responder example 2015-03-24 11:13:48 -08:00
Eric Vicenti
c9a40a989b [ReactNative] OSS JSNavigationStack w/ Examples 2015-03-24 09:39:40 -08:00
Tadeu Zagallo
8ae0eacf17 [ReactNative] Open Source PushNotifications and move Badge Number methods and permission into it 2015-03-24 04:31:34 -08:00
Christopher Chedeau
e1ef0328d9 [ReactNative] Expanded license on js files 2015-03-23 13:17:54 -08:00
Basil Hosmer
d6bb48d972 more UIExplorer flow 2015-03-23 11:21:08 -08:00
Christopher Chedeau
87f42ab450 [ReactNative] Remove react-native/package.json 2015-03-22 20:17:01 -08:00
Tadeu Zagallo
da2b122e21 [ReactNative] Add search to UIExplorer 2015-03-19 11:03:28 -08:00
Christopher Chedeau
13e054a714 Convert UIExplorer to ListView
Summary:
Using <ListView> is not that much more work but gives us section headers for free :) Now there are two groups: Components and APIs. It mirrors the documentation.

Closes https://github.com/facebook/react-native/pull/163
Github Author: Christopher Chedeau <vjeux@fb.com>

Test Plan: ![ios simulator screen shot mar 17 2015 9 09 07 pm](https://cloud.githubusercontent.com/assets/197597/6702577/d40c00ae-ccea-11e4-8035-cfb46367ea1d.png)
2015-03-18 17:52:53 -08:00
Tadeu Zagallo
196bc85629 [ReactNative] Remove ExpandingText 2015-03-18 13:08:23 -08:00
Tadeu Zagallo
8cb6dc2ff6 [ReactNative] Rename Slider to SliderIOS 2015-03-18 08:36:12 -08:00
Spencer Ahrens
9be95db726 [ReactNative] Add TimerExample 2015-03-17 22:09:04 -08:00
Joe Stanton
f8ab8415d5 [RCTVibration] Basic Vibration API
Summary:
* Exposed as `VibrationIOS.vibrate();`
* Included a UI Explorer example.
* Vibration patterns are currently unsupported as there is no API to produce a vibration of less than 1 second on iOS.
Closes https://github.com/facebook/react-native/pull/154
Github Author: Joe Stanton <joe.stanton@red-badger.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-03-16 20:41:33 -08:00
Eric Vicenti
310aef9dcc [ReactNative] NetworkInformation.reachability API w/ example 2015-03-16 13:44:40 -08:00
Nick Lockwood
66bb821a31 Unforked RKWebView 2015-03-14 00:22:43 -08:00
Eric Vicenti
85bcbd4bf3 [ReactNative] AlertIOS.alert and examples 2015-03-13 17:34:13 -08:00
Tadeu Zagallo
28e38afb68 [ReactNative] Oss ActionSheet 2015-03-13 10:51:06 -08:00
Eric Vicenti
5c853c4433 [ReactNative] AppState cleanup, remove Subscribable, add in OSS examples 2015-03-11 20:35:57 -08:00
Nick Lockwood
2424711a03 Unforked ExceptionsManager, AlertManager and AppState 2015-03-11 13:46:35 -08:00
Spencer Ahrens
221ddd3cfe [ReactNative] OSS AsyncStorage with example 2015-03-11 11:54:09 -08:00
Alex Akers
a8aedb3e78 [React Native][Device ID][wip] implement most basic js access 2015-03-10 11:56:47 -08:00
Spencer Ahrens
184ae2314d [ReactNative] OSS Picker 2015-03-10 09:29:53 -08:00
Tadeu Zagallo
fa87d83af5 [ReactNative] Oss GeoMap 2015-03-09 17:55:40 -08:00
Tadeu Zagallo
78ec0df464 [ReactNative] OSS CameraRoll 2015-03-09 16:48:02 -08:00
Tadeu Zagallo
2640002d0e [ReactNative] Oss RCTSlider 2015-03-09 14:43:53 -08:00
Tadeu Zagallo
c79cb09c14 [ReactNative] Oss RCTSwitch 2015-03-09 13:22:11 -08:00
Nick Lockwood
705a8e0144 Improved Geolocation API 2015-03-09 02:50:16 -08:00
Spencer Ahrens
444e3e703f [ReactNative] OSS DatePicker 2015-03-06 18:28:45 -08:00
Nick Lockwood
fb2f063ef5 Ported TabBarIOS to OSS and unified implementation 2015-03-05 17:16:19 -08:00
Christopher Chedeau
878bc9d491 [ReactNative] Migrate navigator.geolocation to open source 2015-02-28 21:25:27 -08:00
Spencer Ahrens
efae175a8e [react-packager][streamline oss] Move open sourced JS source to react-native-github 2015-02-19 21:25:11 -08:00