Bump react-native-win32 and add pressable text test (#576)

* Change files

* Remove change file

* Bump react-native-win32

* Add pressable text example

* Change files

* move react-native-win32 to dependencies

* Move react-native-win32 back to devDependencies

* add react-native-win32 to fluent-tester dependencies

* move pressable usage into own test page for win32

* move react-native-win32 to dependencies

* change react-native-win32 to ^version for tester

* Remove platform guard for pressable test

* Edit link in pressable text

* remove react-native-win32 dep in tester-win32

* Change files

* delete old change file

* add react-native-win32 back to devDep
This commit is contained in:
Krystal Siler 2021-01-06 13:26:38 -05:00 коммит произвёл GitHub
Родитель dee8ccd45e
Коммит 07395b1141
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
27 изменённых файлов: 188 добавлений и 27 удалений

Просмотреть файл

@ -37,6 +37,7 @@
"@fluentui-react-native/themed-stylesheet": "^1.1.0",
"@fluentui-react-native/win32-theme": ">=0.5.1 <1.0.0",
"@fluentui/react-native": ">=0.21.7 <1.0.0",
"@office-iss/react-native-win32": "^0.62.6",
"react-native-svg": "^11.0.0"
},
"devDependencies": {

Просмотреть файл

@ -0,0 +1,53 @@
import * as React from 'react';
import { Alert, Linking, View } from 'react-native';
import { Stack } from '@fluentui-react-native/stack';
import { Text } from '@fluentui/react-native';
import { stackStyle } from '../Common/styles';
import { IKeyboardEvent, IHandledKeyboardEvent } from '@office-iss/react-native-win32';
export const PressableUsage: React.FunctionComponent<{}> = () => {
const _onPress = (): void => {
Linking.openURL('https://www.microsoft.com');
};
const _onKeyDown = (ev: IKeyboardEvent) => {
if (ev.nativeEvent.key === 'Enter' || ev.nativeEvent.key == 'Space') Linking.openURL('https://www.microsoft.com');
};
const _onPress2 = (): void => {
Alert.alert('Alert', 'Success!');
};
const _onKeyDown2 = (ev: IKeyboardEvent) => {
if (ev.nativeEvent.key === 'Enter' || ev.nativeEvent.key == ' ') Alert.alert('Alert', 'Success!');
};
const handledNativeKeyboardEvents: IHandledKeyboardEvent[] = [{ key: 'Enter' }, { key: 'Space' }];
return (
<View>
<Stack style={stackStyle} gap={5}>
<Text variant={'bodyStandard'}>
To learn more about microsoft, visit this{' '}
<Text variant={'bodyStandard'} color="blue" keyDownEvents={handledNativeKeyboardEvents} onPress={_onPress} onKeyDown={_onKeyDown}>
webpage
</Text>{' '}
for more details.
</Text>
<Text variant={'bodyStandard'}>
Press{' '}
<Text
variant={'bodyStandard'}
color="blue"
keyDownEvents={handledNativeKeyboardEvents}
onPress={_onPress2}
onKeyDown={_onKeyDown2}
>
here
</Text>{' '}
to view an alert.
</Text>
</Stack>
</View>
);
};

Просмотреть файл

@ -1,32 +1,34 @@
import * as React from 'react';
import { StandardUsage } from './StandardUsage';
import { CustomizeUsage } from './CustomizeUsage';
import { PressableUsage } from './PressableUsage';
import { Test, TestSection, PlatformStatus } from '../Test';
const textSections: TestSection[] = [
{
name: 'Standard Usage',
component: StandardUsage
component: StandardUsage,
},
{
name: 'Customize Usage',
component: CustomizeUsage
}
component: CustomizeUsage,
},
{
name: 'Pressable Usage',
component: PressableUsage,
},
];
export const TextTest: React.FunctionComponent<{}> = () => {
const status: PlatformStatus = {
win32Status: 'Experimental',
uwpStatus: 'Experimental',
iosStatus: 'Experimental',
macosStatus: 'Experimental',
androidStatus: 'Beta'
}
androidStatus: 'Beta',
};
const description = 'Text is a component for displaying text. You can use Text to standardize text across your app.'
const description = 'Text is a component for displaying text. You can use Text to standardize text across your app.';
return (
<Test name="Text Test" description={description} sections={textSections} status={status}></Test>
);
return <Test name="Text Test" description={description} sections={textSections} status={status}></Test>;
};

Просмотреть файл

@ -33,8 +33,8 @@
"react-native-svg": "^11.0.0"
},
"devDependencies": {
"@office-iss/react-native-win32": "0.62.3",
"@office-iss/rex-win32": "0.62.12-devmain.13420.10000",
"@office-iss/react-native-win32": "0.62.6",
"@react-native-community/eslint-config": "^1.1.0",
"@types/jasmine": "3.5.10",
"@types/react": "^16.9.34",
@ -60,7 +60,6 @@
"@wdio/sync": "5.20.1"
},
"peerDependencies": {
"@office-iss/react-native-win32": "0.62.3",
"react": "16.11.0",
"react-native": "0.62.2"
},

Просмотреть файл

@ -0,0 +1,8 @@
{
"type": "patch",
"comment": "Bump react-native-win32",
"packageName": "@fluentui-react-native/adapters",
"email": "krsiler@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-12-22T19:05:44.727Z"
}

Просмотреть файл

@ -0,0 +1,8 @@
{
"type": "patch",
"comment": "Bump react-native-win32",
"packageName": "@fluentui-react-native/button",
"email": "krsiler@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-12-22T19:05:26.941Z"
}

Просмотреть файл

@ -0,0 +1,8 @@
{
"type": "patch",
"comment": "Bump react-native-win32",
"packageName": "@fluentui-react-native/checkbox",
"email": "krsiler@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-12-22T19:05:28.923Z"
}

Просмотреть файл

@ -0,0 +1,8 @@
{
"type": "patch",
"comment": "Bump react-native-win32",
"packageName": "@fluentui-react-native/experimental-button",
"email": "krsiler@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-12-22T19:05:40.427Z"
}

Просмотреть файл

@ -0,0 +1,8 @@
{
"type": "patch",
"comment": "Bump react-native-win32",
"packageName": "@fluentui-react-native/icon",
"email": "krsiler@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-12-22T19:05:42.636Z"
}

Просмотреть файл

@ -0,0 +1,8 @@
{
"type": "patch",
"comment": "Bump react-native-win32",
"packageName": "@fluentui-react-native/interactive-hooks",
"email": "krsiler@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-12-22T19:05:47.414Z"
}

Просмотреть файл

@ -0,0 +1,8 @@
{
"type": "patch",
"comment": "Bump react-native-win32",
"packageName": "@fluentui-react-native/persona-coin",
"email": "krsiler@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-12-22T19:05:31.894Z"
}

Просмотреть файл

@ -0,0 +1,8 @@
{
"type": "patch",
"comment": "Bump react-native-win32",
"packageName": "@fluentui-react-native/radio-group",
"email": "krsiler@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-12-22T19:05:35.616Z"
}

Просмотреть файл

@ -0,0 +1,8 @@
{
"type": "patch",
"comment": "Bump react-native-win32",
"packageName": "@fluentui-react-native/separator",
"email": "krsiler@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-12-22T19:05:37.957Z"
}

Просмотреть файл

@ -0,0 +1,8 @@
{
"type": "patch",
"comment": "Bump react-native-win32",
"packageName": "@fluentui-react-native/tester",
"email": "krsiler@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-12-22T19:05:10.716Z"
}

Просмотреть файл

@ -0,0 +1,8 @@
{
"type": "patch",
"comment": "remove react-native-win32 dep in tester-win32",
"packageName": "@fluentui-react-native/tester-win32",
"email": "krsiler@microsoft.com",
"dependentChangeType": "patch",
"date": "2021-01-06T01:13:17.310Z"
}

Просмотреть файл

@ -27,11 +27,11 @@
"@fluentui-react-native/pressable": ">=0.4.0 <1.0.0",
"@fluentui-react-native/text": ">=0.7.1 <1.0.0",
"@fluentui-react-native/tokens": ">=0.7.0 <1.0.0",
"@office-iss/react-native-win32": "0.62.6",
"@uifabricshared/foundation-composable": ">=0.7.0 <1.0.0",
"@uifabricshared/foundation-settings": ">=0.8.0 <1.0.0"
},
"devDependencies": {
"@office-iss/react-native-win32": "0.62.3",
"@types/react-native": "^0.62.0",
"@uifabricshared/build-native": "^0.1.1",
"@uifabricshared/eslint-config-rules": "^0.1.1",

Просмотреть файл

@ -30,7 +30,7 @@
"@uifabricshared/foundation-settings": ">=0.8.0 <1.0.0"
},
"devDependencies": {
"@office-iss/react-native-win32": "0.62.3",
"@office-iss/react-native-win32": "0.62.6",
"@types/react-native": "^0.62.0",
"@uifabricshared/build-native": "^0.1.1",
"@uifabricshared/eslint-config-rules": "^0.1.1",

Просмотреть файл

@ -30,7 +30,7 @@
"@uifabricshared/theming-ramp": ">=0.12.0 <1.0.0"
},
"devDependencies": {
"@office-iss/react-native-win32": "0.62.3",
"@office-iss/react-native-win32": "0.62.6",
"@types/react-native": "^0.62.0",
"@uifabricshared/build-native": "^0.1.1",
"@uifabricshared/eslint-config-rules": "^0.1.1",

Просмотреть файл

@ -32,7 +32,7 @@
"@uifabricshared/foundation-settings": ">=0.8.0 <1.0.0"
},
"devDependencies": {
"@office-iss/react-native-win32": "0.62.3",
"@office-iss/react-native-win32": "0.62.6",
"@types/react-native": "^0.62.0",
"@uifabricshared/build-native": "^0.1.1",
"@uifabricshared/eslint-config-rules": "^0.1.1",

Просмотреть файл

@ -24,7 +24,7 @@
"@fluentui-react-native/framework": ">=0.4.2 <1.0.0"
},
"devDependencies": {
"@office-iss/react-native-win32": "0.62.3",
"@office-iss/react-native-win32": "0.62.6",
"@types/react-native": "^0.62.0",
"@uifabricshared/build-native": "^0.1.1",
"@uifabricshared/eslint-config-rules": "^0.1.1",

Просмотреть файл

@ -30,7 +30,7 @@
},
"devDependencies": {
"@fluentui-react-native/test-tools": ">=0.1.1 <1.0.0",
"@office-iss/react-native-win32": "0.62.3",
"@office-iss/react-native-win32": "0.62.6",
"@types/react-native": "^0.62.0",
"@uifabricshared/build-native": "^0.1.1",
"@uifabricshared/eslint-config-rules": "^0.1.1",

Просмотреть файл

@ -25,7 +25,7 @@
"@fluentui-react-native/tokens": ">=0.7.0 <1.0.0"
},
"devDependencies": {
"@office-iss/react-native-win32": "0.62.3",
"@office-iss/react-native-win32": "0.62.6",
"@types/react-native": "^0.62.0",
"@uifabricshared/build-native": "^0.1.1",
"@uifabricshared/eslint-config-rules": "^0.1.1",

Просмотреть файл

@ -22,7 +22,7 @@
},
"dependencies": {},
"devDependencies": {
"@office-iss/react-native-win32": "0.62.3",
"@office-iss/react-native-win32": "0.62.6",
"@types/jest": "^25.1.4",
"@types/react-native": "^0.62.0",
"@uifabricshared/build-native": "^0.1.1",

Просмотреть файл

@ -1,8 +1,9 @@
import { TextProps, ViewProps, ImageProps } from 'react-native';
import { IFilterMask } from './filter.types';
import { ITextWin32Props } from '@office-iss/react-native-win32';
// export core interface types
export type ITextProps = TextProps;
export type ITextProps = TextProps & Partial<ITextWin32Props>;
export type IViewProps = ViewProps;
export type IImageProps = ImageProps;
@ -102,6 +103,16 @@ const _textMask: IFilterMask<ITextProps> = {
selectable: true,
selectionColor: true,
suppressHighlighting: true,
accessibilityDescribedBy: true,
accessibilityLabeledBy: true,
keyDownEvents: true,
keyUpEvents: true,
onKeyDown: true,
onKeyDownCapture: true,
onKeyUp: true,
onKeyUpCapture: true,
textStyle: true,
tooltip: true,
};
const _imageMask: IFilterMask<IImageProps> = {

Просмотреть файл

@ -87,14 +87,21 @@ const _textMask: IFilterMask<ITextProps> = {
ellipsizeMode: true,
lineBreakMode: true,
numberOfLines: true,
keyDownEvents: true,
keyUpEvents: true,
onKeyDown: true,
onKeyDownCapture: true,
onKeyUp: true,
onKeyUpCapture: true,
onLayout: true,
onLongPress: true,
onPress: true,
style: true,
selectable: true,
nativeID: true,
maxFontSizeMultiplier: true,
textStyle: true,
tooltip: true
tooltip: true,
};
const _imageMask: IFilterMask<IImageProps> = {

Просмотреть файл

@ -24,7 +24,7 @@
"invariant": "^2.2.0"
},
"devDependencies": {
"@office-iss/react-native-win32": "0.62.3",
"@office-iss/react-native-win32": "0.62.6",
"@types/react": "^16.9.34",
"@types/react-native": "^0.62.0",
"@uifabricshared/build-native": "^0.1.1",

Просмотреть файл

@ -2003,10 +2003,10 @@
stacktrace-parser "^0.1.3"
whatwg-fetch "^3.0.0"
"@office-iss/react-native-win32@0.62.3":
version "0.62.3"
resolved "https://registry.yarnpkg.com/@office-iss/react-native-win32/-/react-native-win32-0.62.3.tgz#599d7c8adfa0d3fc1dbbaa3b4acea180c6b3b101"
integrity sha512-Xwn15sqEOhmitYQ0iWfhUcGgMEyMqxe0Qjf28Q5qRUA6YTWsOXCeGyrrJhjzB5ZVRC/521vfoY1Iy3f2q+MPUQ==
"@office-iss/react-native-win32@0.62.6", "@office-iss/react-native-win32@^0.62.6":
version "0.62.6"
resolved "https://registry.yarnpkg.com/@office-iss/react-native-win32/-/react-native-win32-0.62.6.tgz#8a3f5cf21c2891d12095785376989b9175ff32c1"
integrity sha512-Q8PBz5TFC+gLwx2E0rbCj+61Lq63HzH/efTSoL/MrXtII/njF+mfBtbHfKeqQCYzuN9rPxz/QkG/J2DLPP+14A==
dependencies:
"@babel/runtime" "^7.8.4"
abort-controller "^3.0.0"