Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
1aaa528
Add mock for the Linking library
Apr 13, 2017
9eed7b6
Log to console in RCTTestRunner
javache Apr 13, 2017
eeb8645
fix typo
vonovak Apr 13, 2017
7a7e087
Find hasConstant status via preprocessing
Apr 13, 2017
d419ccb
Fix typo in documentation: "…controls how rows…"
yas375 Apr 13, 2017
3c8608e
fix mock for AsyncLocalStorage
ZauberNerd Apr 13, 2017
833ef42
Fix sizing of non strech items
woehrl01 Apr 13, 2017
6cb1979
Correct fix for flexing grandchildren
Apr 13, 2017
b87de4d
Let measure behave more like on the web
woehrl01 Apr 13, 2017
7c8c57a
Add Geolocation API Jest mock
willdurand Apr 13, 2017
d8ff02b
Revert D4878875: [yoga][PR] Fix sizing of non strech items
Apr 13, 2017
8565f4f
packager: ResolutionRequest: correct mistaken callsite
Apr 13, 2017
f588c81
packager: preprocess outdated dependencies
Apr 13, 2017
2682e14
Remove references to CSSLayoutDEPRECATED
Apr 13, 2017
a311d12
Fixed bad ReactPropTypes reference in ViewPagerAndroid
Apr 13, 2017
e25f4fa
Revert D4850458: [yoga][PR] Let measure behave more like on the web
Apr 13, 2017
6835aca
disable removeClippedSubviews by default
sahrens Apr 13, 2017
d1e8cd7
Revert D4875343: Correct fix for flexing grandchildren
Apr 14, 2017
da296eb
make mHasDispatchScheduledCount in EventDispatcher atomic
Apr 14, 2017
fd8c816
loosen the ReactChoreographer UI thread assert
Apr 14, 2017
810e9b5
Ran React.PropTypes codemod on fbsource again in case anything was mi…
Apr 14, 2017
2a86d74
Make invalid scrolling bugs easier to track down
sahrens Apr 14, 2017
591499b
clean up NativeAnimatedModule
Apr 14, 2017
f54fda4
Add missing prop-types dependency to website/package.json
douglowder Apr 14, 2017
1bc27a9
Don't build js bundles for debug simulator build configurations
Apr 15, 2017
ee058b3
Change Promise.done to Promise.then
kubik369 Apr 16, 2017
4705ee1
Align ios api with android
Apr 17, 2017
2c0c3f4
Upgrade to v0.44.0
gabelevi Apr 17, 2017
3abadb3
make mReactChoreographer final in Timing.java
Apr 17, 2017
9747ad2
Instrumentation tests for apps that provide a testPayload
ayc1 Apr 17, 2017
e99b389
update the infer-annotation jar for open source to unblock D4883219
Apr 17, 2017
620b625
Fix bug - FlatList component did not render more items when content w…
Apr 18, 2017
5708951
make ReactInstanceManager safer threading wise
Apr 18, 2017
9140b34
move calls that need to be on the UI thread out of setupReactContext()
Apr 18, 2017
efac41b
Construct ModuleHolder from ReactModuleInfo
javache Apr 18, 2017
204f70d
Protect against fatal YellowBox error when stack frame has no file
terribleben Apr 18, 2017
c319542
packager: remove Cache
Apr 18, 2017
dc764d1
packager: Module: remove dead cacheTransformResults option
Apr 18, 2017
e303b9f
packager: buck: transform-module: add support for assets
Apr 18, 2017
1c601cd
packager: ResolutionRequest: stronger option typing
Apr 18, 2017
419700f
Bump the flow-bin version to ^0.44.2
gabelevi Apr 18, 2017
693cfb2
`getTransformOptions` can only return promises
davidaurelio Apr 18, 2017
ab4e87d
Rename JSCSamplingProfiler to RCTJSCSamplingProfiler
mhorowitz Apr 18, 2017
66d4e02
Update Colors.md, removed duplicate colors
himanshupathakpwd Apr 18, 2017
00eb6ba
Omit units from zero values.
sueannioanis Apr 18, 2017
5fe0c85
More verbose error messages for iOS
cooperka Apr 18, 2017
3485a58
Fixed a typo in open function documentation
mohamed-habib Apr 18, 2017
0f14a14
Explicitly cast to (bool) where needed on objc with folly::dynamic
mhorowitz Apr 18, 2017
8fc4af5
Remove immutable-js
Apr 18, 2017
a87e783
ListItem JSX tag is not closed when used in SectionList
Gregoirevda Apr 18, 2017
f949a65
React Native Fiber: Fix errors in children management
sophiebits Apr 19, 2017
2f93998
clear DraweeControllerBuilder after usage
Apr 19, 2017
aa69e76
launch conversion from ASyncTask to Thread
Apr 19, 2017
05981c2
Use uri instead of url in source property of Image
mehcode Apr 19, 2017
b87987b
Fixing Race condition that happens with _wasBatchActive
Apr 19, 2017
62f0a52
Pin newly updated F8 2017 conference app in the showcase
hramos Apr 19, 2017
c932b1c
packager: GlobalTransformCache: cache the transform options digest
Apr 19, 2017
11976ad
Mock Linking - openURL & canOpenURL
manosim Apr 19, 2017
15191a1
Udpate scrollTo example
franrios Apr 19, 2017
4e87964
Update documentation to use newer version of fresco - fixes #13345
forki Apr 19, 2017
94b3816
Added documentation for additional fields of Image
DanielMSchmidt Apr 19, 2017
6488555
packager: worker: strenghten TransformOptions
Apr 19, 2017
dce2553
packager: buck: fix messed up file types
Apr 19, 2017
aa6cd06
packager: assetPathUtils: @flow
Apr 19, 2017
ec328f0
packager: GlobalTransformCache: throat() the file fetching function
Apr 19, 2017
4b7dae5
Fix run-ios when specifying a scheme as cli arg
pesterhazy Apr 19, 2017
ddc6314
Only start observing in requestPermissions() if not already observing
Apr 19, 2017
9e8b012
Correcting Flex fix within Experimental feature
Apr 19, 2017
5f0b3c1
Enable dev menu in tvOS simulator
cmcewen Apr 19, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-3]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-3]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-4]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-4]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

unsafe.enable_getters_and_setters=true

[version]
^0.43.1
^0.44.0
4 changes: 2 additions & 2 deletions Examples/UIExplorer/js/ImageExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ exports.examples = [
<View style={{flexDirection: 'row'}}>
<Image
source={{
url: 'ImageInBundle',
uri: 'ImageInBundle',
bundle: 'UIExplorerBundle',
width: 100,
height: 100,
Expand All @@ -665,7 +665,7 @@ exports.examples = [
/>
<Image
source={{
url: 'ImageInAssetCatalog',
uri: 'ImageInAssetCatalog',
bundle: 'UIExplorerBundle',
width: 100,
height: 100,
Expand Down
6 changes: 3 additions & 3 deletions Libraries/Animated/examples/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ html, h1, h2 {
height: 50px;
position: absolute;
display: inline-block;
box-shadow: 0px 1px 2px #999;
text-shadow: 0px 1px 2px #999;
box-shadow: 0 1px 2px #999;
text-shadow: 0 1px 2px #999;
background-image: url(pic1.jpg);
background-size: cover;
line-height: 80px;
Expand All @@ -34,7 +34,7 @@ html, h1, h2 {
}

div.code {
box-shadow: 0px 1px 2px #999;
box-shadow: 0 1px 2px #999;
width: 600px;
padding: 5px;
position: relative;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class DatePickerAndroid {
*
* - `date` (`Date` object or timestamp in milliseconds) - date to show by default
* - `minDate` (`Date` or timestamp in milliseconds) - minimum date that can be selected
* - `maxDate` (`Date` object or timestamp in milliseconds) - minimum date that can be selected
* - `maxDate` (`Date` object or timestamp in milliseconds) - maximum date that can be selected
* - `mode` (`enum('calendar', 'spinner', 'default')`) - To set the date-picker mode to calendar/spinner/default
* - 'calendar': Show a date picker in calendar mode.
* - 'spinner': Show a date picker in spinner mode.
Expand Down
12 changes: 6 additions & 6 deletions Libraries/Components/ScrollResponder.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@

var Dimensions = require('Dimensions');
var FrameRateLogger = require('FrameRateLogger');
var Platform = require('Platform');
var Keyboard = require('Keyboard');
var ReactNative = require('ReactNative');
var Subscribable = require('Subscribable');
var TextInputState = require('TextInputState');
var UIManager = require('UIManager');
var warning = require('fbjs/lib/warning');

var { getInstanceFromNode } = require('ReactNativeComponentTree');
var { ScrollViewManager } = require('NativeModules');

var invariant = require('fbjs/lib/invariant');
var nullthrows = require('fbjs/lib/nullthrows');
var performanceNow = require('fbjs/lib/performanceNow');
var warning = require('fbjs/lib/warning');

var { ScrollViewManager } = require('NativeModules');
var { getInstanceFromNode } = require('ReactNativeComponentTree');

/**
* Mixin that can be integrated in order to handle scrolling that plays well
Expand Down Expand Up @@ -412,7 +412,7 @@ var ScrollResponderMixin = {
({x, y, animated} = x || {});
}
UIManager.dispatchViewManagerCommand(
this.scrollResponderGetScrollableNode(),
nullthrows(this.scrollResponderGetScrollableNode()),
UIManager.RCTScrollView.Commands.scrollTo,
[x || 0, y || 0, animated !== false],
);
Expand Down
4 changes: 2 additions & 2 deletions Libraries/Components/ScrollView/ScrollView.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const ColorPropType = require('ColorPropType');
const EdgeInsetsPropType = require('EdgeInsetsPropType');
const Platform = require('Platform');
const PointPropType = require('PointPropType');
const PropTypes = require('prop-types');
const React = require('React');
const ReactNative = require('ReactNative');
const ScrollResponder = require('ScrollResponder');
Expand All @@ -30,7 +31,6 @@ const dismissKeyboard = require('dismissKeyboard');
const flattenStyle = require('flattenStyle');
const invariant = require('fbjs/lib/invariant');
const processDecelerationRate = require('processDecelerationRate');
const PropTypes = React.PropTypes;
const requireNativeComponent = require('requireNativeComponent');

/**
Expand Down Expand Up @@ -436,7 +436,7 @@ const ScrollView = React.createClass({
*
* Example:
*
* `scrollTo({x: 0; y: 0; animated: true})`
* `scrollTo({x: 0, y: 0, animated: true})`
*
* Note: The weird function signature is due to the fact that, for historical reasons,
* the function also accepts separate arguments as an alternative to the options object.
Expand Down
14 changes: 7 additions & 7 deletions Libraries/Components/ViewPager/ViewPagerAndroid.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class ViewPagerAndroid extends React.Component {
* Index of initial page that should be selected. Use `setPage` method to
* update the page, and `onPageSelected` to monitor page changes
*/
initialPage: ReactPropTypes.number,
initialPage: PropTypes.number,

/**
* Executed when transitioning between pages (ether because of animation for
Expand All @@ -96,7 +96,7 @@ class ViewPagerAndroid extends React.Component {
* Value x means that (1 - x) fraction of the page at "position" index is
* visible, and x fraction of the next page is visible.
*/
onPageScroll: ReactPropTypes.func,
onPageScroll: PropTypes.func,

/**
* Function called when the page scrolling state has changed.
Expand All @@ -106,28 +106,28 @@ class ViewPagerAndroid extends React.Component {
* - settling, meaning that there was an interaction with the page scroller, and the
* page scroller is now finishing it's closing or opening animation
*/
onPageScrollStateChanged: ReactPropTypes.func,
onPageScrollStateChanged: PropTypes.func,

/**
* This callback will be called once ViewPager finish navigating to selected page
* (when user swipes between pages). The `event.nativeEvent` object passed to this
* callback will have following fields:
* - position - index of page that has been selected
*/
onPageSelected: ReactPropTypes.func,
onPageSelected: PropTypes.func,

/**
* Blank space to show between pages. This is only visible while scrolling, pages are still
* edge-to-edge.
*/
pageMargin: ReactPropTypes.number,
pageMargin: PropTypes.number,

/**
* Determines whether the keyboard gets dismissed in response to a drag.
* - 'none' (the default), drags do not dismiss the keyboard.
* - 'on-drag', the keyboard is dismissed when a drag begins.
*/
keyboardDismissMode: ReactPropTypes.oneOf([
keyboardDismissMode: PropTypes.oneOf([
'none', // default
'on-drag',
]),
Expand All @@ -136,7 +136,7 @@ class ViewPagerAndroid extends React.Component {
* When false, the content does not scroll.
* The default value is true.
*/
scrollEnabled: ReactPropTypes.bool,
scrollEnabled: PropTypes.bool,
};

componentDidMount() {
Expand Down
10 changes: 5 additions & 5 deletions Libraries/Image/Image.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,17 @@ const ImageViewManager = NativeModules.ImageViewManager;
* ```
* dependencies {
* // If your app supports Android versions before Ice Cream Sandwich (API level 14)
* compile 'com.facebook.fresco:animated-base-support:0.11.0'
* compile 'com.facebook.fresco:animated-base-support:1.0.1'
*
* // For animated GIF support
* compile 'com.facebook.fresco:animated-gif:0.11.0'
* compile 'com.facebook.fresco:animated-gif:1.0.1'
*
* // For WebP support, including animated WebP
* compile 'com.facebook.fresco:animated-webp:0.11.0'
* compile 'com.facebook.fresco:webpsupport:0.11.0'
* compile 'com.facebook.fresco:animated-webp:1.0.1'
* compile 'com.facebook.fresco:webpsupport:1.0.1'
*
* // For WebP support, without animations
* compile 'com.facebook.fresco:webpsupport:0.11.0'
* compile 'com.facebook.fresco:webpsupport:1.0.1'
* }
* ```
*
Expand Down
10 changes: 6 additions & 4 deletions Libraries/Lists/FlatList.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ type OptionalProps<ItemT> = {
* Set this true while waiting for new data from a refresh.
*/
refreshing?: ?boolean,
/**
* Note: may have bugs (missing content) in some circumstances - use at your own risk.
*
* This may improve scroll performance for large lists.
*/
removeClippedSubviews?: boolean,
/**
* See `ViewabilityHelper` for flow type and further documentation.
*/
Expand Down Expand Up @@ -273,10 +279,6 @@ type DefaultProps = typeof defaultProps;
* - By default, the list looks for a `key` prop on each item and uses that for the React key.
* Alternatively, you can provide a custom `keyExtractor` prop.
*
* NOTE: `removeClippedSubviews` might not be necessary and may cause bugs. If you see issues with
* content not rendering, e.g when using `LayoutAnimation`, try setting
* `removeClippedSubviews={false}`, and we may change the default in the future after more
* experimentation in production apps.
*/
class FlatList<ItemT> extends React.PureComponent<DefaultProps, Props<ItemT>, void> {
static defaultProps: DefaultProps = defaultProps;
Expand Down
11 changes: 9 additions & 2 deletions Libraries/Lists/MetroListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type NormalProps = {

// Provide either `items` or `sections`
items?: ?Array<Item>, // By default, an Item is assumed to be {key: string}
// $FlowFixMe - Something is a little off with the type Array<Item>
sections?: ?Array<{key: string, data: Array<Item>}>,

/**
Expand All @@ -39,10 +40,16 @@ type NormalProps = {
* Set this true while waiting for new data from a refresh.
*/
refreshing?: boolean,
/**
* If true, renders items next to each other horizontally instead of stacked vertically.
*/
horizontal?: ?boolean,
};
type DefaultProps = {
keyExtractor: (item: Item) => string,
keyExtractor: (item: Item, index: number) => string,
};
/* $FlowFixMe - the renderItem passed in from SectionList is optional there but
* required here */
type Props = NormalProps & DefaultProps;

/**
Expand Down Expand Up @@ -74,7 +81,7 @@ class MetroListView extends React.Component {
return this._listRef;
}
static defaultProps: DefaultProps = {
keyExtractor: (item, index) => item.key || index,
keyExtractor: (item, index) => item.key || String(index),
renderScrollComponent: (props: Props) => {
if (props.onRefresh) {
return (
Expand Down
14 changes: 9 additions & 5 deletions Libraries/Lists/SectionList.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ type OptionalProps<SectionT: SectionBase<any>> = {
* Set this true while waiting for new data from a refresh.
*/
refreshing?: ?boolean,
/**
* Note: may have bugs (missing content) in some circumstances - use at your own risk.
*
* This may improve scroll performance for large lists.
*/
removeClippedSubviews?: boolean,
/**
* Rendered at the top of each section. These stick to the top of the `ScrollView` by default on
* iOS. See `stickySectionHeadersEnabled`.
Expand All @@ -150,6 +156,8 @@ type OptionalProps<SectionT: SectionBase<any>> = {
* enabled by default on iOS because that is the platform standard there.
*/
stickySectionHeadersEnabled?: boolean,

legacyImplementation?: ?boolean,
};

type Props<SectionT> = RequiredProps<SectionT>
Expand Down Expand Up @@ -183,7 +191,7 @@ type DefaultProps = typeof defaultProps;
* Simple Examples:
*
* <SectionList
* renderItem={({item}) => <ListItem title={item.title}}
* renderItem={({item}) => <ListItem title={item.title} />}
* renderSectionHeader={({section}) => <H1 title={section.key} />}
* sections={[ // homogenous rendering between sections
* {data: [...], key: ...},
Expand Down Expand Up @@ -217,10 +225,6 @@ type DefaultProps = typeof defaultProps;
* - By default, the list looks for a `key` prop on each item and uses that for the React key.
* Alternatively, you can provide a custom `keyExtractor` prop.
*
* NOTE: `removeClippedSubviews` might not be necessary and may cause bugs. If you see issues with
* content not rendering, e.g when using `LayoutAnimation`, try setting
* `removeClippedSubviews={false}`, and we may change the default in the future after more
* experimentation in production apps.
*/
class SectionList<SectionT: SectionBase<any>>
extends React.PureComponent<DefaultProps, Props<SectionT>, void>
Expand Down
Loading