Skip to content

Commit

Permalink
Merge branch 'master' into RevampPreparedScriptStore
Browse files Browse the repository at this point in the history
  • Loading branch information
hansenyy committed Nov 2, 2019
2 parents c2a47e5 + 8b87988 commit 472b6fb
Show file tree
Hide file tree
Showing 37 changed files with 589 additions and 114 deletions.

This file was deleted.

6 changes: 3 additions & 3 deletions packages/E2ETest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
},
"dependencies": {
"react": "16.8.6",
"react-native": "https://github.com/microsoft/react-native/archive/v0.60.0-microsoft.14.tar.gz",
"react-native-windows": "0.60.0-vnext.58",
"react-native-windows-extended": "0.60.14",
"react-native": "https://github.com/microsoft/react-native/archive/v0.60.0-microsoft.15.tar.gz",
"react-native-windows": "0.60.0-vnext.61",
"react-native-windows-extended": "0.60.15",
"rnpm-plugin-windows": "^0.3.7"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/microsoft-reactnative-sampleapps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
},
"dependencies": {
"react": "16.8.6",
"react-native": "https://github.com/microsoft/react-native/archive/v0.60.0-microsoft.14.tar.gz",
"react-native-windows": "0.60.0-vnext.58",
"react-native-windows-extended": "0.60.14",
"react-native": "https://github.com/microsoft/react-native/archive/v0.60.0-microsoft.15.tar.gz",
"react-native-windows": "0.60.0-vnext.61",
"react-native-windows-extended": "0.60.15",
"rnpm-plugin-windows": "^0.3.7"
},
"devDependencies": {
Expand Down
199 changes: 199 additions & 0 deletions packages/playground/Samples/scrollViewSnapSample.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
* @format
*/

import * as React from 'react';
import {
AppRegistry,
Switch,
StyleSheet,
View,
Text,
ScrollView,
TouchableOpacity,
} from 'react-native';

export default class Bootstrap extends React.Component<{}, any> {
state = {
horizontalValue: true,
snapToStartValue: false,
snapToEndValue: false,
zoomValue: false,
alignToStartValue: true,
};

toggleSwitch1 = (value: boolean) => {
this.setState({horizontalValue: value});
};

toggleSwitch2 = (value: boolean) => {
this.setState({snapToStartValue: value});
};

toggleSwitch3 = (value: boolean) => {
this.setState({snapToEndValue: value});
};

toggleSwitch4 = (value: boolean) => {
this.setState({zoomValue: value});
};

toggleSwitch5 = (value: boolean) => {
this.setState({alignToStartValue: value});
};

makeItems = (nItems: number, styles: Object): Array<any> => {
const items = [];
for (let i = 0; i < nItems; i++) {
items[i] = (
<TouchableOpacity key={i} style={styles}>
<Text>{'Item ' + i}</Text>
</TouchableOpacity>
);
}
return items;
};

render() {
const item = (
<View
style={{
flex: 1,
alignSelf: 'auto',
flexDirection: 'column',
justifyContent: 'flex-start',
}}>
<View style={{flex: 0.2, alignSelf: 'center', flexDirection: 'row'}}>
<View
style={{
flexDirection: 'column',
alignSelf: 'stretch',
justifyContent: 'center',
padding: 20,
}}>
<Text>
{this.state.horizontalValue ? 'Horizontal ' : 'Vertical '}
</Text>
<Switch
onValueChange={this.toggleSwitch1}
value={this.state.horizontalValue}
/>
</View>
<View
style={{
flexDirection: 'column',
alignSelf: 'stretch',
justifyContent: 'center',
padding: 20,
}}>
<Text>
{this.state.snapToStartValue
? 'SnapToStart On '
: 'SnapToStart Off '}
</Text>
<Switch
onValueChange={this.toggleSwitch2}
value={this.state.snapToStartValue}
/>
</View>
<View
style={{
flexDirection: 'column',
alignSelf: 'stretch',
justifyContent: 'center',
padding: 20,
}}>
<Text>
{this.state.snapToEndValue ? 'SnapToEnd On ' : 'SnapToEnd Off '}
</Text>
<Switch
onValueChange={this.toggleSwitch3}
value={this.state.snapToEndValue}
/>
</View>
<View
style={{
flexDirection: 'column',
alignSelf: 'stretch',
justifyContent: 'center',
padding: 20,
}}>
<Text>
{this.state.zoomValue ? 'Zoom 2.0 on ' : 'Zoom 2.0 Off '}
</Text>
<Switch
onValueChange={this.toggleSwitch4}
value={this.state.zoomValue}
/>
</View>
<View
style={{
flexDirection: 'column',
alignSelf: 'stretch',
justifyContent: 'center',
padding: 20,
}}>
<Text>
{this.state.alignToStartValue ? 'AlignToStart' : 'AlignToEnd'}
</Text>
<Switch
onValueChange={this.toggleSwitch5}
value={this.state.alignToStartValue}
/>
</View>
</View>
<View style={{flex: 0.8, alignSelf: 'center', flexDirection: 'column'}}>
<Text>SnapToOffsets[100, 500]</Text>
<View>
<ScrollView
style={
this.state.horizontalValue
? styles.horizontalScrollViewStyle
: styles.verticalScrollViewStyle
}
snapToOffsets={[100.0, 500.0]}
minimumZoomScale={0.1}
maximumZoomScale={2.0}
zoomScale={this.state.zoomValue ? 2.0 : 1.0}
snapToStart={this.state.snapToStartValue}
snapToEnd={this.state.snapToEndValue}
snapToAlignment={this.state.alignToStartValue ? 'start' : 'end'}
horizontal={this.state.horizontalValue}>
{this.makeItems(20, [styles.itemWrapper])}
</ScrollView>
</View>
</View>
</View>
);

return item;
}
}

const styles = StyleSheet.create({
horizontalScrollViewStyle: {
padding: 10,
width: 500,
height: 120,
},
verticalScrollViewStyle: {
padding: 10,
width: 120,
height: 500,
},
itemWrapper: {
backgroundColor: '#dddddd',
alignItems: 'center',
borderRadius: 5,
borderWidth: 5,
borderColor: '#a52a2a',
padding: 10,
margin: 5,
width: 90,
height: 90,
},
});

AppRegistry.registerComponent('Bootstrap', () => Bootstrap);
6 changes: 3 additions & 3 deletions packages/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
},
"dependencies": {
"react": "16.8.6",
"react-native": "https://github.com/microsoft/react-native/archive/v0.60.0-microsoft.14.tar.gz",
"react-native-windows": "0.60.0-vnext.58",
"react-native-windows-extended": "0.60.14",
"react-native": "https://github.com/microsoft/react-native/archive/v0.60.0-microsoft.15.tar.gz",
"react-native-windows": "0.60.0-vnext.61",
"react-native-windows-extended": "0.60.15",
"rnpm-plugin-windows": "^0.3.7"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ void HostingPane::InitComboBoxes() {
m_jsFileNames->Append(L"Samples\\image");
m_jsFileNames->Append(L"Samples\\index");
m_jsFileNames->Append(L"Samples\\mouse");
m_jsFileNames->Append(L"Samples\\scrollViewSnapSample");
m_jsFileNames->Append(L"Samples\\simple");
m_jsFileNames->Append(L"Samples\\text");
m_jsFileNames->Append(L"Samples\\textinput");
Expand Down
14 changes: 14 additions & 0 deletions packages/react-native-windows-extended/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
{
"name": "react-native-windows-extended",
"entries": [
{
"date": "Fri, 01 Nov 2019 23:40:12 GMT",
"tag": "react-native-windows-extended_v0.60.15",
"version": "0.60.15",
"comments": {
"patch": [
{
"comment": "Updating react-native to version: 0.60.0-microsoft.15",
"author": "[email protected]",
"commit": "87802f691c664b1170a782120562999c1c32932a"
}
]
}
},
{
"date": "Thu, 31 Oct 2019 18:11:20 GMT",
"tag": "react-native-windows-extended_v0.60.14",
Expand Down
8 changes: 7 additions & 1 deletion packages/react-native-windows-extended/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Change Log - react-native-windows-extended

This log was last generated on Thu, 31 Oct 2019 18:11:20 GMT and should not be manually modified.
This log was last generated on Fri, 01 Nov 2019 23:40:12 GMT and should not be manually modified.

## 0.60.15
Fri, 01 Nov 2019 23:40:12 GMT

### Patches

- Updating react-native to version: 0.60.0-microsoft.15 ([email protected])
## 0.60.14
Thu, 31 Oct 2019 18:11:20 GMT

Expand Down
8 changes: 4 additions & 4 deletions packages/react-native-windows-extended/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-windows-extended",
"version": "0.60.14",
"version": "0.60.15",
"description": "Additional react-native-windows components that are not part of RN lean-core.",
"main": "lib/index.js",
"repository": {
Expand All @@ -18,7 +18,7 @@
"license": "MIT",
"private": false,
"dependencies": {
"react-native-windows": "0.60.0-vnext.58"
"react-native-windows": "0.60.0-vnext.61"
},
"devDependencies": {
"@react-native-community/eslint-config": "^0.0.5",
Expand All @@ -34,12 +34,12 @@
"just-scripts": "^0.24.2",
"prettier": "1.13.6",
"react": "16.8.6",
"react-native": "https://github.com/microsoft/react-native/archive/v0.60.0-microsoft.14.tar.gz",
"react-native": "https://github.com/microsoft/react-native/archive/v0.60.0-microsoft.15.tar.gz",
"typescript": "3.5.3"
},
"peerDependencies": {
"react": "16.8.6",
"react-native": "^0.60.0 || 0.60.0-microsoft.14 || https://github.com/microsoft/react-native/archive/v0.60.0-microsoft.14.tar.gz"
"react-native": "^0.60.0 || 0.60.0-microsoft.15 || https://github.com/microsoft/react-native/archive/v0.60.0-microsoft.15.tar.gz"
},
"beachball": {
"disallowedChangeTypes": [
Expand Down
63 changes: 63 additions & 0 deletions vnext/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,69 @@
{
"name": "react-native-windows",
"entries": [
{
"date": "Fri, 01 Nov 2019 23:40:12 GMT",
"tag": "react-native-windows_v0.60.0-vnext.61",
"version": "0.60.0-vnext.61",
"comments": {
"none": [
{
"comment": "Move ScriptStore and RuntimeHolder to RNW.",
"author": "[email protected]",
"commit": "6a2c28a3e05f5026ef7c07f756a6393102cbd169"
}
],
"prerelease": [
{
"comment": "Updating react-native to version: 0.60.0-microsoft.15",
"author": "[email protected]",
"commit": "4988e4a8effa4b9d760410f6bead68e9f3f7555a"
}
]
}
},
{
"date": "Fri, 01 Nov 2019 21:25:27 GMT",
"tag": "react-native-windows_v0.60.0-vnext.60",
"version": "0.60.0-vnext.60",
"comments": {
"none": [
{
"comment": "Fix some nit suggestions from PR #3568.",
"author": "[email protected]",
"commit": "09b426a5bbf575ad23a721c50d0b374c84364b72"
}
],
"prerelease": [
{
"comment": "Support snapToStart and snapToEnd for ScrollView",
"author": "[email protected]",
"commit": "37662c94ca8556f3e63aeafbd474fabab71e40b4"
}
]
}
},
{
"date": "Fri, 01 Nov 2019 18:09:07 GMT",
"tag": "react-native-windows_v0.60.0-vnext.59",
"version": "0.60.0-vnext.59",
"comments": {
"none": [
{
"comment": "Implement ChakraRuntime::getPropertyNames() properly in native.",
"author": "[email protected]",
"commit": "7c96aa9beae65248b1b4c4c668b08ea56e4b4392"
}
],
"prerelease": [
{
"comment": "Call native animation callbacks only once",
"author": "[email protected]",
"commit": "141e2654c5b5ed958591c4933a82d85213b56e40"
}
]
}
},
{
"date": "Thu, 31 Oct 2019 18:11:20 GMT",
"tag": "react-native-windows_v0.60.0-vnext.58",
Expand Down
Loading

0 comments on commit 472b6fb

Please sign in to comment.