From b08c108821dafe6c3756edc43dfb2fe472acf003 Mon Sep 17 00:00:00 2001 From: Ruriko Araki Date: Mon, 28 Nov 2022 13:33:51 -0800 Subject: [PATCH 1/8] Update config --- packages/components/Callout/jest.config.js | 2 +- packages/components/Callout/package.json | 1 + packages/components/Checkbox/jest.config.js | 2 ++ packages/components/Menu/jest.config.js | 2 +- packages/components/Menu/package.json | 1 + packages/components/MenuButton/jest.config.js | 2 +- packages/components/MenuButton/package.json | 1 + packages/components/Separator/jest.config.js | 2 +- packages/components/Tabs/jest.config.js | 2 +- packages/experimental/MenuButton/jest.config.js | 2 +- packages/experimental/MenuButton/package.json | 1 + packages/experimental/Switch/jest.config.js | 2 +- packages/experimental/Tabs/jest.config.js | 2 +- 13 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 packages/components/Checkbox/jest.config.js diff --git a/packages/components/Callout/jest.config.js b/packages/components/Callout/jest.config.js index 051098f649..f6813bad78 100644 --- a/packages/components/Callout/jest.config.js +++ b/packages/components/Callout/jest.config.js @@ -1,2 +1,2 @@ const { configureReactNativeJest } = require('@fluentui-react-native/scripts'); -module.exports = configureReactNativeJest('android'); +module.exports = configureReactNativeJest('win32'); diff --git a/packages/components/Callout/package.json b/packages/components/Callout/package.json index ad6073c2bf..99fca06d43 100644 --- a/packages/components/Callout/package.json +++ b/packages/components/Callout/package.json @@ -40,6 +40,7 @@ "devDependencies": { "@fluentui-react-native/eslint-config-rules": "^0.1.1", "@fluentui-react-native/scripts": "^0.1.1", + "@office-iss/react-native-win32": "^0.68.0", "@types/react-native": "^0.68.0", "react": "17.0.2", "react-native": "^0.68.0" diff --git a/packages/components/Checkbox/jest.config.js b/packages/components/Checkbox/jest.config.js new file mode 100644 index 0000000000..f6813bad78 --- /dev/null +++ b/packages/components/Checkbox/jest.config.js @@ -0,0 +1,2 @@ +const { configureReactNativeJest } = require('@fluentui-react-native/scripts'); +module.exports = configureReactNativeJest('win32'); diff --git a/packages/components/Menu/jest.config.js b/packages/components/Menu/jest.config.js index a8bf7c4f87..f6813bad78 100644 --- a/packages/components/Menu/jest.config.js +++ b/packages/components/Menu/jest.config.js @@ -1,2 +1,2 @@ const { configureReactNativeJest } = require('@fluentui-react-native/scripts'); -module.exports = configureReactNativeJest('ios'); +module.exports = configureReactNativeJest('win32'); diff --git a/packages/components/Menu/package.json b/packages/components/Menu/package.json index 0fce1f17db..3d96e60e89 100644 --- a/packages/components/Menu/package.json +++ b/packages/components/Menu/package.json @@ -43,6 +43,7 @@ "@fluentui-react-native/eslint-config-rules": "^0.1.1", "@fluentui-react-native/scripts": "^0.1.1", "@fluentui-react-native/test-tools": ">=0.1.1 <1.0.0", + "@office-iss/react-native-win32": "^0.68.0", "@types/react-native": "^0.68.0", "react": "17.0.2", "react-native": "^0.68.0" diff --git a/packages/components/MenuButton/jest.config.js b/packages/components/MenuButton/jest.config.js index a8bf7c4f87..f6813bad78 100644 --- a/packages/components/MenuButton/jest.config.js +++ b/packages/components/MenuButton/jest.config.js @@ -1,2 +1,2 @@ const { configureReactNativeJest } = require('@fluentui-react-native/scripts'); -module.exports = configureReactNativeJest('ios'); +module.exports = configureReactNativeJest('win32'); diff --git a/packages/components/MenuButton/package.json b/packages/components/MenuButton/package.json index 59a76a0085..368207b247 100644 --- a/packages/components/MenuButton/package.json +++ b/packages/components/MenuButton/package.json @@ -42,6 +42,7 @@ "devDependencies": { "@fluentui-react-native/eslint-config-rules": "^0.1.1", "@fluentui-react-native/scripts": "^0.1.1", + "@office-iss/react-native-win32": "^0.68.0", "@types/react-native": "^0.68.0", "react": "17.0.2", "react-native": "^0.68.0" diff --git a/packages/components/Separator/jest.config.js b/packages/components/Separator/jest.config.js index 051098f649..f6813bad78 100644 --- a/packages/components/Separator/jest.config.js +++ b/packages/components/Separator/jest.config.js @@ -1,2 +1,2 @@ const { configureReactNativeJest } = require('@fluentui-react-native/scripts'); -module.exports = configureReactNativeJest('android'); +module.exports = configureReactNativeJest('win32'); diff --git a/packages/components/Tabs/jest.config.js b/packages/components/Tabs/jest.config.js index 051098f649..f6813bad78 100644 --- a/packages/components/Tabs/jest.config.js +++ b/packages/components/Tabs/jest.config.js @@ -1,2 +1,2 @@ const { configureReactNativeJest } = require('@fluentui-react-native/scripts'); -module.exports = configureReactNativeJest('android'); +module.exports = configureReactNativeJest('win32'); diff --git a/packages/experimental/MenuButton/jest.config.js b/packages/experimental/MenuButton/jest.config.js index a8bf7c4f87..f6813bad78 100644 --- a/packages/experimental/MenuButton/jest.config.js +++ b/packages/experimental/MenuButton/jest.config.js @@ -1,2 +1,2 @@ const { configureReactNativeJest } = require('@fluentui-react-native/scripts'); -module.exports = configureReactNativeJest('ios'); +module.exports = configureReactNativeJest('win32'); diff --git a/packages/experimental/MenuButton/package.json b/packages/experimental/MenuButton/package.json index 26c218ab05..43d8de4e3e 100644 --- a/packages/experimental/MenuButton/package.json +++ b/packages/experimental/MenuButton/package.json @@ -35,6 +35,7 @@ "devDependencies": { "@fluentui-react-native/eslint-config-rules": "^0.1.1", "@fluentui-react-native/scripts": "^0.1.1", + "@office-iss/react-native-win32": "^0.68.0", "@types/react-native": "^0.68.0", "react": "17.0.2", "react-native": "^0.68.0" diff --git a/packages/experimental/Switch/jest.config.js b/packages/experimental/Switch/jest.config.js index 051098f649..f6813bad78 100644 --- a/packages/experimental/Switch/jest.config.js +++ b/packages/experimental/Switch/jest.config.js @@ -1,2 +1,2 @@ const { configureReactNativeJest } = require('@fluentui-react-native/scripts'); -module.exports = configureReactNativeJest('android'); +module.exports = configureReactNativeJest('win32'); diff --git a/packages/experimental/Tabs/jest.config.js b/packages/experimental/Tabs/jest.config.js index 051098f649..f6813bad78 100644 --- a/packages/experimental/Tabs/jest.config.js +++ b/packages/experimental/Tabs/jest.config.js @@ -1,2 +1,2 @@ const { configureReactNativeJest } = require('@fluentui-react-native/scripts'); -module.exports = configureReactNativeJest('android'); +module.exports = configureReactNativeJest('win32'); From 2feb79ad460fd2ca470bd5c897b0ed724b0282c1 Mon Sep 17 00:00:00 2001 From: Ruriko Araki Date: Mon, 28 Nov 2022 13:34:08 -0800 Subject: [PATCH 2/8] Update snapshot --- .../__snapshots__/Checkbox.test.tsx.snap | 241 +++-- .../__snapshots__/Menu.test.tsx.snap | 916 +++++++++++++----- .../__snapshots__/MenuButton.test.tsx.snap | 21 +- .../__snapshots__/Tabs.test.tsx.snap | 134 ++- .../__snapshots__/MenuButton.test.tsx.snap | 41 +- .../__snapshots__/Switch.test.tsx.snap | 46 +- .../__snapshots__/Tabs.test.tsx.snap | 320 +++++- 7 files changed, 1285 insertions(+), 434 deletions(-) diff --git a/packages/components/Checkbox/src/__tests__/__snapshots__/Checkbox.test.tsx.snap b/packages/components/Checkbox/src/__tests__/__snapshots__/Checkbox.test.tsx.snap index 1983da7421..64962e1ed4 100644 --- a/packages/components/Checkbox/src/__tests__/__snapshots__/Checkbox.test.tsx.snap +++ b/packages/components/Checkbox/src/__tests__/__snapshots__/Checkbox.test.tsx.snap @@ -20,16 +20,25 @@ exports[`Checkbox component tests Checkbox all props 1`] = ` } accessible={true} defaultChecked={true} - disabled={true} enableFocusRing={true} focusable={false} + keyUpEvents={ + Array [ + Object { + "key": " ", + }, + ] + } labelPosition="before" onAccessibilityAction={[Function]} onBlur={[Function]} onChange={[Function]} onClick={[Function]} onFocus={[Function]} - onPress={[Function]} + onKeyDown={[Function]} + onKeyUp={[Function]} + onMouseEnter={[Function]} + onMouseLeave={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} onResponderRelease={[Function]} @@ -52,20 +61,26 @@ exports[`Checkbox component tests Checkbox all props 1`] = ` } > All Props Checkbox @@ -212,9 +237,9 @@ exports[`Checkbox component tests Checkbox all tokens 1`] = ` > @@ -300,17 +328,22 @@ exports[`Checkbox component tests Checkbox composed 1`] = ` accessible={true} enableFocusRing={true} focusable={true} + keyUpEvents={ + Array [ + Object { + "key": " ", + }, + ] + } onAccessibilityAction={[Function]} onBlur={[Function]} - onClick={[Function]} onFocus={[Function]} + onHoverIn={[Function]} + onHoverOut={[Function]} + onKeyUp={[Function]} onPress={[Function]} - onResponderGrant={[Function]} - onResponderMove={[Function]} - onResponderRelease={[Function]} - onResponderTerminate={[Function]} - onResponderTerminationRequest={[Function]} - onStartShouldSetResponder={[Function]} + onPressIn={[Function]} + onPressOut={[Function]} style={ Object { "alignItems": "center", @@ -320,7 +353,7 @@ exports[`Checkbox component tests Checkbox composed 1`] = ` "display": "flex", "flexDirection": "row", "padding": 8, - "paddingHorizontal": undefined, + "paddingHorizontal": 12, } } > @@ -329,7 +362,7 @@ exports[`Checkbox component tests Checkbox composed 1`] = ` Object { "alignItems": "center", "backgroundColor": "#ffffff", - "borderColor": "#323130", + "borderColor": "#616161", "borderRadius": 2, "borderWidth": 1, "height": 16, @@ -340,9 +373,8 @@ exports[`Checkbox component tests Checkbox composed 1`] = ` > @@ -427,12 +460,22 @@ exports[`Checkbox component tests Checkbox default 1`] = ` defaultChecked={false} enableFocusRing={true} focusable={true} + keyUpEvents={ + Array [ + Object { + "key": " ", + }, + ] + } onAccessibilityAction={[Function]} onBlur={[Function]} onChange={[Function]} onClick={[Function]} onFocus={[Function]} - onPress={[Function]} + onKeyDown={[Function]} + onKeyUp={[Function]} + onMouseEnter={[Function]} + onMouseLeave={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} onResponderRelease={[Function]} @@ -448,7 +491,7 @@ exports[`Checkbox component tests Checkbox default 1`] = ` "display": "flex", "flexDirection": "row", "padding": 8, - "paddingHorizontal": undefined, + "paddingHorizontal": 12, } } > @@ -457,7 +500,7 @@ exports[`Checkbox component tests Checkbox default 1`] = ` Object { "alignItems": "center", "backgroundColor": "#ffffff", - "borderColor": "#323130", + "borderColor": "#616161", "borderRadius": 2, "borderWidth": 1, "height": 16, @@ -468,9 +511,8 @@ exports[`Checkbox component tests Checkbox default 1`] = ` > @@ -555,12 +599,22 @@ exports[`Checkbox component tests Checkbox no label 1`] = ` defaultChecked={false} enableFocusRing={true} focusable={true} + keyUpEvents={ + Array [ + Object { + "key": " ", + }, + ] + } onAccessibilityAction={[Function]} onBlur={[Function]} onChange={[Function]} onClick={[Function]} onFocus={[Function]} - onPress={[Function]} + onKeyDown={[Function]} + onKeyUp={[Function]} + onMouseEnter={[Function]} + onMouseLeave={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} onResponderRelease={[Function]} @@ -585,7 +639,7 @@ exports[`Checkbox component tests Checkbox no label 1`] = ` Object { "alignItems": "center", "backgroundColor": "#ffffff", - "borderColor": "#323130", + "borderColor": "#616161", "borderRadius": 2, "borderWidth": 1, "height": 16, @@ -596,9 +650,8 @@ exports[`Checkbox component tests Checkbox no label 1`] = ` > @@ -68,7 +92,16 @@ exports[`Menu component tests Menu default 1`] = ` exports[`Menu component tests Menu defaultOpen 1`] = ` Array [ @@ -135,7 +183,7 @@ Array [ borderWidth={1} doNotTakePointerCapture={false} onDismiss={[Function]} - setInitialFocus={false} + setInitialFocus={true} style={ Object { "backgroundColor": "#faf9f8", @@ -158,7 +206,7 @@ Array [ "display": "flex", "maxWidth": 300, "minWidth": 128, - "padding": 8, + "paddingVertical": 4, } } > @@ -171,13 +219,26 @@ Array [ } } accessible={true} - collapsable={false} enableFocusRing={true} focusable={true} + keyDownEvents={ + Array [ + Object { + "key": " ", + }, + Object { + "key": "Enter", + }, + ] + } onAccessibilityTap={[Function]} onBlur={[Function]} onClick={[Function]} onFocus={[Function]} + onKeyDown={[Function]} + onKeyUp={[Function]} + onMouseEnter={[Function]} + onMouseLeave={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} onResponderRelease={[Function]} @@ -188,24 +249,27 @@ Array [ Object { "alignItems": "center", "backgroundColor": "#ffffff", - "borderRadius": 4, + "borderRadius": 0, "display": "flex", "flexDirection": "row", "maxWidth": 300, - "minHeight": 32, + "minHeight": 24, "minWidth": 160, + "padding": 4, + "paddingHorizontal": 8, } } > @@ -349,7 +452,7 @@ Array [ } doNotTakePointerCapture={false} onDismiss={[Function]} - setInitialFocus={false} + setInitialFocus={true} style={ Object { "backgroundColor": "#faf9f8", @@ -372,7 +475,7 @@ Array [ "display": "flex", "maxWidth": 300, "minWidth": 128, - "padding": 8, + "paddingVertical": 4, } } > @@ -385,13 +488,26 @@ Array [ } } accessible={true} - collapsable={false} enableFocusRing={true} focusable={true} + keyDownEvents={ + Array [ + Object { + "key": " ", + }, + Object { + "key": "Enter", + }, + ] + } onAccessibilityTap={[Function]} onBlur={[Function]} onClick={[Function]} onFocus={[Function]} + onKeyDown={[Function]} + onKeyUp={[Function]} + onMouseEnter={[Function]} + onMouseLeave={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} onResponderRelease={[Function]} @@ -402,24 +518,27 @@ Array [ Object { "alignItems": "center", "backgroundColor": "#ffffff", - "borderRadius": 4, + "borderRadius": 0, "display": "flex", "flexDirection": "row", "maxWidth": 300, - "minHeight": 32, + "minHeight": 24, "minWidth": 160, + "padding": 4, + "paddingHorizontal": 8, } } > @@ -510,7 +653,7 @@ Array [ } doNotTakePointerCapture={false} onDismiss={[Function]} - setInitialFocus={false} + setInitialFocus={true} style={ Object { "backgroundColor": "#faf9f8", @@ -533,7 +676,7 @@ Array [ "display": "flex", "maxWidth": 300, "minWidth": 128, - "padding": 8, + "paddingVertical": 4, } } > @@ -554,13 +697,26 @@ Array [ } } accessible={true} - collapsable={false} enableFocusRing={true} focusable={true} + keyDownEvents={ + Array [ + Object { + "key": " ", + }, + Object { + "key": "Enter", + }, + ] + } onAccessibilityAction={[Function]} onBlur={[Function]} onClick={[Function]} onFocus={[Function]} + onKeyDown={[Function]} + onKeyUp={[Function]} + onMouseEnter={[Function]} + onMouseLeave={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} onResponderRelease={[Function]} @@ -571,12 +727,14 @@ Array [ Object { "alignItems": "center", "backgroundColor": "#ffffff", - "borderRadius": 4, + "borderRadius": 0, "display": "flex", "flexDirection": "row", "maxWidth": 300, - "minHeight": 32, + "minHeight": 24, "minWidth": 160, + "padding": 4, + "paddingHorizontal": 8, } } > @@ -584,7 +742,7 @@ Array [ align="xMidYMid" bbHeight={16} bbWidth={16} - color={4282532418} + color={4280558628} focusable={false} height={16} meetOrSlice={0} @@ -597,7 +755,7 @@ Array [ "borderWidth": 0, }, Object { - "marginEnd": 8, + "marginEnd": 4, }, Object { "flex": 0, @@ -607,9 +765,9 @@ Array [ }, ] } - tintColor={4282532418} - vbHeight={16} - vbWidth={16} + tintColor={4280558628} + vbHeight={12} + vbWidth={12} width={16} xml=" @@ -635,12 +793,13 @@ Array [ @@ -722,7 +895,7 @@ Array [ "borderWidth": 0, }, Object { - "marginEnd": 8, + "marginEnd": 4, }, Object { "flex": 0, @@ -733,8 +906,8 @@ Array [ ] } tintColor={4290624957} - vbHeight={16} - vbWidth={16} + vbHeight={12} + vbWidth={12} width={16} xml=" @@ -760,12 +933,13 @@ Array [ @@ -856,7 +1054,7 @@ Array [ } doNotTakePointerCapture={false} onDismiss={[Function]} - setInitialFocus={false} + setInitialFocus={true} style={ Object { "backgroundColor": "#faf9f8", @@ -879,7 +1077,7 @@ Array [ "display": "flex", "maxWidth": 300, "minWidth": 128, - "padding": 8, + "paddingVertical": 4, } } > @@ -900,13 +1098,26 @@ Array [ } } accessible={true} - collapsable={false} enableFocusRing={true} focusable={true} + keyDownEvents={ + Array [ + Object { + "key": " ", + }, + Object { + "key": "Enter", + }, + ] + } onAccessibilityAction={[Function]} onBlur={[Function]} onClick={[Function]} onFocus={[Function]} + onKeyDown={[Function]} + onKeyUp={[Function]} + onMouseEnter={[Function]} + onMouseLeave={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} onResponderRelease={[Function]} @@ -917,12 +1128,14 @@ Array [ Object { "alignItems": "center", "backgroundColor": "#ffffff", - "borderRadius": 4, + "borderRadius": 0, "display": "flex", "flexDirection": "row", "maxWidth": 300, - "minHeight": 32, + "minHeight": 24, "minWidth": 160, + "padding": 4, + "paddingHorizontal": 8, } } > @@ -930,7 +1143,7 @@ Array [ align="xMidYMid" bbHeight={16} bbWidth={16} - color={4282532418} + color={4280558628} focusable={false} height={16} meetOrSlice={0} @@ -943,7 +1156,7 @@ Array [ "borderWidth": 0, }, Object { - "marginEnd": 8, + "marginEnd": 4, }, Object { "flex": 0, @@ -953,9 +1166,9 @@ Array [ }, ] } - tintColor={4282532418} - vbHeight={16} - vbWidth={16} + tintColor={4280558628} + vbHeight={12} + vbWidth={12} width={16} xml=" @@ -981,12 +1194,13 @@ Array [ @@ -1055,7 +1283,7 @@ Array [ align="xMidYMid" bbHeight={16} bbWidth={16} - color={4282532418} + color={4280558628} focusable={false} height={16} meetOrSlice={0} @@ -1068,7 +1296,7 @@ Array [ "borderWidth": 0, }, Object { - "marginEnd": 8, + "marginEnd": 4, }, Object { "flex": 0, @@ -1078,9 +1306,9 @@ Array [ }, ] } - tintColor={4282532418} - vbHeight={16} - vbWidth={16} + tintColor={4280558628} + vbHeight={12} + vbWidth={12} width={16} xml=" @@ -1106,12 +1334,13 @@ Array [ @@ -1202,7 +1455,7 @@ Array [ } doNotTakePointerCapture={false} onDismiss={[Function]} - setInitialFocus={false} + setInitialFocus={true} style={ Object { "backgroundColor": "#faf9f8", @@ -1225,7 +1478,7 @@ Array [ "display": "flex", "maxWidth": 300, "minWidth": 128, - "padding": 8, + "paddingVertical": 4, } } > @@ -1246,13 +1499,26 @@ Array [ } } accessible={true} - collapsable={false} enableFocusRing={true} focusable={true} + keyDownEvents={ + Array [ + Object { + "key": " ", + }, + Object { + "key": "Enter", + }, + ] + } onAccessibilityAction={[Function]} onBlur={[Function]} onClick={[Function]} onFocus={[Function]} + onKeyDown={[Function]} + onKeyUp={[Function]} + onMouseEnter={[Function]} + onMouseLeave={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} onResponderRelease={[Function]} @@ -1263,12 +1529,14 @@ Array [ Object { "alignItems": "center", "backgroundColor": "#ffffff", - "borderRadius": 4, + "borderRadius": 0, "display": "flex", "flexDirection": "row", "maxWidth": 300, - "minHeight": 32, + "minHeight": 24, "minWidth": 160, + "padding": 4, + "paddingHorizontal": 8, } } > @@ -1276,7 +1544,7 @@ Array [ align="xMidYMid" bbHeight={16} bbWidth={16} - color={4282532418} + color={4280558628} focusable={false} height={16} meetOrSlice={0} @@ -1289,7 +1557,7 @@ Array [ "borderWidth": 0, }, Object { - "marginEnd": 8, + "marginEnd": 4, }, Object { "flex": 0, @@ -1299,9 +1567,9 @@ Array [ }, ] } - tintColor={4282532418} - vbHeight={16} - vbWidth={16} + tintColor={4280558628} + vbHeight={12} + vbWidth={12} width={16} xml=" @@ -1327,12 +1595,13 @@ Array [ @@ -1401,7 +1684,7 @@ Array [ align="xMidYMid" bbHeight={16} bbWidth={16} - color={4282532418} + color={4280558628} focusable={false} height={16} meetOrSlice={0} @@ -1414,7 +1697,7 @@ Array [ "borderWidth": 0, }, Object { - "marginEnd": 8, + "marginEnd": 4, }, Object { "flex": 0, @@ -1424,9 +1707,9 @@ Array [ }, ] } - tintColor={4282532418} - vbHeight={16} - vbWidth={16} + tintColor={4280558628} + vbHeight={12} + vbWidth={12} width={16} xml=" @@ -1452,12 +1735,13 @@ Array [ @@ -1548,7 +1856,7 @@ Array [ } doNotTakePointerCapture={false} onDismiss={[Function]} - setInitialFocus={false} + setInitialFocus={true} style={ Object { "backgroundColor": "#faf9f8", @@ -1571,7 +1879,7 @@ Array [ "display": "flex", "maxWidth": 300, "minWidth": 128, - "padding": 8, + "paddingVertical": 4, } } > @@ -1592,13 +1900,26 @@ Array [ } } accessible={true} - collapsable={false} enableFocusRing={true} focusable={true} + keyDownEvents={ + Array [ + Object { + "key": " ", + }, + Object { + "key": "Enter", + }, + ] + } onAccessibilityAction={[Function]} onBlur={[Function]} onClick={[Function]} onFocus={[Function]} + onKeyDown={[Function]} + onKeyUp={[Function]} + onMouseEnter={[Function]} + onMouseLeave={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} onResponderRelease={[Function]} @@ -1609,12 +1930,14 @@ Array [ Object { "alignItems": "center", "backgroundColor": "#ffffff", - "borderRadius": 4, + "borderRadius": 0, "display": "flex", "flexDirection": "row", "maxWidth": 300, - "minHeight": 32, + "minHeight": 24, "minWidth": 160, + "padding": 4, + "paddingHorizontal": 8, } } > @@ -1622,7 +1945,7 @@ Array [ align="xMidYMid" bbHeight={16} bbWidth={16} - color={4282532418} + color={4280558628} focusable={false} height={16} meetOrSlice={0} @@ -1635,7 +1958,7 @@ Array [ "borderWidth": 0, }, Object { - "marginEnd": 8, + "marginEnd": 4, }, Object { "flex": 0, @@ -1645,9 +1968,9 @@ Array [ }, ] } - tintColor={4282532418} - vbHeight={16} - vbWidth={16} + tintColor={4280558628} + vbHeight={12} + vbWidth={12} width={16} xml=" @@ -1673,12 +1996,13 @@ Array [ @@ -1735,7 +2073,7 @@ Array [ align="xMidYMid" bbHeight={16} bbWidth={16} - color={4282532418} + color={4280558628} focusable={false} height={16} meetOrSlice={0} @@ -1748,7 +2086,7 @@ Array [ "borderWidth": 0, }, Object { - "marginEnd": 8, + "marginEnd": 4, }, Object { "flex": 0, @@ -1758,9 +2096,9 @@ Array [ }, ] } - tintColor={4282532418} - vbHeight={16} - vbWidth={16} + tintColor={4280558628} + vbHeight={12} + vbWidth={12} width={16} xml=" @@ -1786,12 +2124,13 @@ Array [ @@ -1882,7 +2245,7 @@ Array [ } doNotTakePointerCapture={false} onDismiss={[Function]} - setInitialFocus={false} + setInitialFocus={true} style={ Object { "backgroundColor": "#faf9f8", @@ -1905,7 +2268,7 @@ Array [ "display": "flex", "maxWidth": 300, "minWidth": 128, - "padding": 8, + "paddingVertical": 4, } } > @@ -1918,13 +2281,26 @@ Array [ } } accessible={true} - collapsable={false} enableFocusRing={true} focusable={true} + keyDownEvents={ + Array [ + Object { + "key": " ", + }, + Object { + "key": "Enter", + }, + ] + } onAccessibilityTap={[Function]} onBlur={[Function]} onClick={[Function]} onFocus={[Function]} + onKeyDown={[Function]} + onKeyUp={[Function]} + onMouseEnter={[Function]} + onMouseLeave={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} onResponderRelease={[Function]} @@ -1935,24 +2311,27 @@ Array [ Object { "alignItems": "center", "backgroundColor": "#ffffff", - "borderRadius": 4, + "borderRadius": 0, "display": "flex", "flexDirection": "row", "maxWidth": 300, - "minHeight": 32, + "minHeight": 24, "minWidth": 160, + "padding": 4, + "paddingHorizontal": 8, } } > diff --git a/packages/experimental/Switch/src/__tests__/__snapshots__/Switch.test.tsx.snap b/packages/experimental/Switch/src/__tests__/__snapshots__/Switch.test.tsx.snap index a793d49002..ecc6adfafb 100644 --- a/packages/experimental/Switch/src/__tests__/__snapshots__/Switch.test.tsx.snap +++ b/packages/experimental/Switch/src/__tests__/__snapshots__/Switch.test.tsx.snap @@ -18,12 +18,25 @@ exports[`Switch Default 1`] = ` } } accessible={true} - collapsable={false} focusable={true} + keyUpEvents={ + Array [ + Object { + "key": " ", + }, + Object { + "key": "Enter", + }, + ] + } onAccessibilityAction={[Function]} onBlur={[Function]} onClick={[Function]} onFocus={[Function]} + onKeyDown={[Function]} + onKeyUp={[Function]} + onMouseEnter={[Function]} + onMouseLeave={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} onResponderRelease={[Function]} @@ -34,7 +47,7 @@ exports[`Switch Default 1`] = ` Object { "alignItems": "center", "alignSelf": "flex-start", - "borderColor": undefined, + "borderColor": "transparent", "borderRadius": 4, "borderWidth": 2, "flexDirection": "row-reverse", @@ -47,9 +60,9 @@ exports[`Switch Default 1`] = ` Date: Mon, 28 Nov 2022 15:34:25 -0800 Subject: [PATCH 3/8] Change files --- ...ative-callout-2353e654-a33d-4332-bdba-15016919dd5e.json | 7 +++++++ ...tive-checkbox-2b1e8ed6-68b5-4cc1-8e31-b95d80890f9a.json | 7 +++++++ ...l-menu-button-09df49ad-e313-4238-bd05-ca0a50db03c0.json | 7 +++++++ ...rimental-tabs-3be95058-8fb3-4d8b-bbd6-7c867c50d758.json | 7 +++++++ ...t-native-menu-51e955dd-72a6-4395-b59f-b6fc9ae709b7.json | 7 +++++++ ...e-menu-button-3afadf0b-fcd3-42e3-944a-b36c4916e6fe.json | 7 +++++++ ...ive-separator-8d7117e8-d628-4279-93c1-491ebeca44e0.json | 7 +++++++ ...native-switch-c306b7e9-db06-44be-961b-6c55c12b73d8.json | 7 +++++++ ...t-native-tabs-6f4389fd-8c7b-4625-9558-34345cb9109a.json | 7 +++++++ 9 files changed, 63 insertions(+) create mode 100644 change/@fluentui-react-native-callout-2353e654-a33d-4332-bdba-15016919dd5e.json create mode 100644 change/@fluentui-react-native-checkbox-2b1e8ed6-68b5-4cc1-8e31-b95d80890f9a.json create mode 100644 change/@fluentui-react-native-experimental-menu-button-09df49ad-e313-4238-bd05-ca0a50db03c0.json create mode 100644 change/@fluentui-react-native-experimental-tabs-3be95058-8fb3-4d8b-bbd6-7c867c50d758.json create mode 100644 change/@fluentui-react-native-menu-51e955dd-72a6-4395-b59f-b6fc9ae709b7.json create mode 100644 change/@fluentui-react-native-menu-button-3afadf0b-fcd3-42e3-944a-b36c4916e6fe.json create mode 100644 change/@fluentui-react-native-separator-8d7117e8-d628-4279-93c1-491ebeca44e0.json create mode 100644 change/@fluentui-react-native-switch-c306b7e9-db06-44be-961b-6c55c12b73d8.json create mode 100644 change/@fluentui-react-native-tabs-6f4389fd-8c7b-4625-9558-34345cb9109a.json diff --git a/change/@fluentui-react-native-callout-2353e654-a33d-4332-bdba-15016919dd5e.json b/change/@fluentui-react-native-callout-2353e654-a33d-4332-bdba-15016919dd5e.json new file mode 100644 index 0000000000..5f145b4251 --- /dev/null +++ b/change/@fluentui-react-native-callout-2353e654-a33d-4332-bdba-15016919dd5e.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Update config", + "packageName": "@fluentui-react-native/callout", + "email": "ruaraki@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-checkbox-2b1e8ed6-68b5-4cc1-8e31-b95d80890f9a.json b/change/@fluentui-react-native-checkbox-2b1e8ed6-68b5-4cc1-8e31-b95d80890f9a.json new file mode 100644 index 0000000000..b2903b036c --- /dev/null +++ b/change/@fluentui-react-native-checkbox-2b1e8ed6-68b5-4cc1-8e31-b95d80890f9a.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Update config", + "packageName": "@fluentui-react-native/checkbox", + "email": "ruaraki@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-menu-button-09df49ad-e313-4238-bd05-ca0a50db03c0.json b/change/@fluentui-react-native-experimental-menu-button-09df49ad-e313-4238-bd05-ca0a50db03c0.json new file mode 100644 index 0000000000..15e0454246 --- /dev/null +++ b/change/@fluentui-react-native-experimental-menu-button-09df49ad-e313-4238-bd05-ca0a50db03c0.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Update config", + "packageName": "@fluentui-react-native/experimental-menu-button", + "email": "ruaraki@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-tabs-3be95058-8fb3-4d8b-bbd6-7c867c50d758.json b/change/@fluentui-react-native-experimental-tabs-3be95058-8fb3-4d8b-bbd6-7c867c50d758.json new file mode 100644 index 0000000000..7f4ea5da6a --- /dev/null +++ b/change/@fluentui-react-native-experimental-tabs-3be95058-8fb3-4d8b-bbd6-7c867c50d758.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Update config", + "packageName": "@fluentui-react-native/experimental-tabs", + "email": "ruaraki@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-menu-51e955dd-72a6-4395-b59f-b6fc9ae709b7.json b/change/@fluentui-react-native-menu-51e955dd-72a6-4395-b59f-b6fc9ae709b7.json new file mode 100644 index 0000000000..d1ff287fda --- /dev/null +++ b/change/@fluentui-react-native-menu-51e955dd-72a6-4395-b59f-b6fc9ae709b7.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Update config", + "packageName": "@fluentui-react-native/menu", + "email": "ruaraki@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-menu-button-3afadf0b-fcd3-42e3-944a-b36c4916e6fe.json b/change/@fluentui-react-native-menu-button-3afadf0b-fcd3-42e3-944a-b36c4916e6fe.json new file mode 100644 index 0000000000..4d3914f32a --- /dev/null +++ b/change/@fluentui-react-native-menu-button-3afadf0b-fcd3-42e3-944a-b36c4916e6fe.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Update config", + "packageName": "@fluentui-react-native/menu-button", + "email": "ruaraki@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-separator-8d7117e8-d628-4279-93c1-491ebeca44e0.json b/change/@fluentui-react-native-separator-8d7117e8-d628-4279-93c1-491ebeca44e0.json new file mode 100644 index 0000000000..83d175cf53 --- /dev/null +++ b/change/@fluentui-react-native-separator-8d7117e8-d628-4279-93c1-491ebeca44e0.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Update config", + "packageName": "@fluentui-react-native/separator", + "email": "ruaraki@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-switch-c306b7e9-db06-44be-961b-6c55c12b73d8.json b/change/@fluentui-react-native-switch-c306b7e9-db06-44be-961b-6c55c12b73d8.json new file mode 100644 index 0000000000..6470312175 --- /dev/null +++ b/change/@fluentui-react-native-switch-c306b7e9-db06-44be-961b-6c55c12b73d8.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Update config", + "packageName": "@fluentui-react-native/switch", + "email": "ruaraki@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-tabs-6f4389fd-8c7b-4625-9558-34345cb9109a.json b/change/@fluentui-react-native-tabs-6f4389fd-8c7b-4625-9558-34345cb9109a.json new file mode 100644 index 0000000000..db363d2ca6 --- /dev/null +++ b/change/@fluentui-react-native-tabs-6f4389fd-8c7b-4625-9558-34345cb9109a.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Update config", + "packageName": "@fluentui-react-native/tabs", + "email": "ruaraki@microsoft.com", + "dependentChangeType": "patch" +} From d7ec80e52ad45723fdd46a0c5d5b78d5b42bad25 Mon Sep 17 00:00:00 2001 From: Ruriko Araki Date: Mon, 28 Nov 2022 16:25:05 -0800 Subject: [PATCH 4/8] Revert "Change files" This reverts commit f8754cca21209e1a80dc8503fb25715d0c37e2a2. --- ...ative-callout-2353e654-a33d-4332-bdba-15016919dd5e.json | 7 ------- ...tive-checkbox-2b1e8ed6-68b5-4cc1-8e31-b95d80890f9a.json | 7 ------- ...l-menu-button-09df49ad-e313-4238-bd05-ca0a50db03c0.json | 7 ------- ...rimental-tabs-3be95058-8fb3-4d8b-bbd6-7c867c50d758.json | 7 ------- ...t-native-menu-51e955dd-72a6-4395-b59f-b6fc9ae709b7.json | 7 ------- ...e-menu-button-3afadf0b-fcd3-42e3-944a-b36c4916e6fe.json | 7 ------- ...ive-separator-8d7117e8-d628-4279-93c1-491ebeca44e0.json | 7 ------- ...native-switch-c306b7e9-db06-44be-961b-6c55c12b73d8.json | 7 ------- ...t-native-tabs-6f4389fd-8c7b-4625-9558-34345cb9109a.json | 7 ------- 9 files changed, 63 deletions(-) delete mode 100644 change/@fluentui-react-native-callout-2353e654-a33d-4332-bdba-15016919dd5e.json delete mode 100644 change/@fluentui-react-native-checkbox-2b1e8ed6-68b5-4cc1-8e31-b95d80890f9a.json delete mode 100644 change/@fluentui-react-native-experimental-menu-button-09df49ad-e313-4238-bd05-ca0a50db03c0.json delete mode 100644 change/@fluentui-react-native-experimental-tabs-3be95058-8fb3-4d8b-bbd6-7c867c50d758.json delete mode 100644 change/@fluentui-react-native-menu-51e955dd-72a6-4395-b59f-b6fc9ae709b7.json delete mode 100644 change/@fluentui-react-native-menu-button-3afadf0b-fcd3-42e3-944a-b36c4916e6fe.json delete mode 100644 change/@fluentui-react-native-separator-8d7117e8-d628-4279-93c1-491ebeca44e0.json delete mode 100644 change/@fluentui-react-native-switch-c306b7e9-db06-44be-961b-6c55c12b73d8.json delete mode 100644 change/@fluentui-react-native-tabs-6f4389fd-8c7b-4625-9558-34345cb9109a.json diff --git a/change/@fluentui-react-native-callout-2353e654-a33d-4332-bdba-15016919dd5e.json b/change/@fluentui-react-native-callout-2353e654-a33d-4332-bdba-15016919dd5e.json deleted file mode 100644 index 5f145b4251..0000000000 --- a/change/@fluentui-react-native-callout-2353e654-a33d-4332-bdba-15016919dd5e.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "Update config", - "packageName": "@fluentui-react-native/callout", - "email": "ruaraki@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-native-checkbox-2b1e8ed6-68b5-4cc1-8e31-b95d80890f9a.json b/change/@fluentui-react-native-checkbox-2b1e8ed6-68b5-4cc1-8e31-b95d80890f9a.json deleted file mode 100644 index b2903b036c..0000000000 --- a/change/@fluentui-react-native-checkbox-2b1e8ed6-68b5-4cc1-8e31-b95d80890f9a.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "Update config", - "packageName": "@fluentui-react-native/checkbox", - "email": "ruaraki@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-native-experimental-menu-button-09df49ad-e313-4238-bd05-ca0a50db03c0.json b/change/@fluentui-react-native-experimental-menu-button-09df49ad-e313-4238-bd05-ca0a50db03c0.json deleted file mode 100644 index 15e0454246..0000000000 --- a/change/@fluentui-react-native-experimental-menu-button-09df49ad-e313-4238-bd05-ca0a50db03c0.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "Update config", - "packageName": "@fluentui-react-native/experimental-menu-button", - "email": "ruaraki@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-native-experimental-tabs-3be95058-8fb3-4d8b-bbd6-7c867c50d758.json b/change/@fluentui-react-native-experimental-tabs-3be95058-8fb3-4d8b-bbd6-7c867c50d758.json deleted file mode 100644 index 7f4ea5da6a..0000000000 --- a/change/@fluentui-react-native-experimental-tabs-3be95058-8fb3-4d8b-bbd6-7c867c50d758.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "Update config", - "packageName": "@fluentui-react-native/experimental-tabs", - "email": "ruaraki@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-native-menu-51e955dd-72a6-4395-b59f-b6fc9ae709b7.json b/change/@fluentui-react-native-menu-51e955dd-72a6-4395-b59f-b6fc9ae709b7.json deleted file mode 100644 index d1ff287fda..0000000000 --- a/change/@fluentui-react-native-menu-51e955dd-72a6-4395-b59f-b6fc9ae709b7.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "Update config", - "packageName": "@fluentui-react-native/menu", - "email": "ruaraki@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-native-menu-button-3afadf0b-fcd3-42e3-944a-b36c4916e6fe.json b/change/@fluentui-react-native-menu-button-3afadf0b-fcd3-42e3-944a-b36c4916e6fe.json deleted file mode 100644 index 4d3914f32a..0000000000 --- a/change/@fluentui-react-native-menu-button-3afadf0b-fcd3-42e3-944a-b36c4916e6fe.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "Update config", - "packageName": "@fluentui-react-native/menu-button", - "email": "ruaraki@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-native-separator-8d7117e8-d628-4279-93c1-491ebeca44e0.json b/change/@fluentui-react-native-separator-8d7117e8-d628-4279-93c1-491ebeca44e0.json deleted file mode 100644 index 83d175cf53..0000000000 --- a/change/@fluentui-react-native-separator-8d7117e8-d628-4279-93c1-491ebeca44e0.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "Update config", - "packageName": "@fluentui-react-native/separator", - "email": "ruaraki@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-native-switch-c306b7e9-db06-44be-961b-6c55c12b73d8.json b/change/@fluentui-react-native-switch-c306b7e9-db06-44be-961b-6c55c12b73d8.json deleted file mode 100644 index 6470312175..0000000000 --- a/change/@fluentui-react-native-switch-c306b7e9-db06-44be-961b-6c55c12b73d8.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "Update config", - "packageName": "@fluentui-react-native/switch", - "email": "ruaraki@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-native-tabs-6f4389fd-8c7b-4625-9558-34345cb9109a.json b/change/@fluentui-react-native-tabs-6f4389fd-8c7b-4625-9558-34345cb9109a.json deleted file mode 100644 index db363d2ca6..0000000000 --- a/change/@fluentui-react-native-tabs-6f4389fd-8c7b-4625-9558-34345cb9109a.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "Update config", - "packageName": "@fluentui-react-native/tabs", - "email": "ruaraki@microsoft.com", - "dependentChangeType": "patch" -} From 5457f4027a3eecbc072bb7ada35b693ee5917316 Mon Sep 17 00:00:00 2001 From: Ruriko Araki Date: Mon, 28 Nov 2022 16:28:29 -0800 Subject: [PATCH 5/8] Undo passing components --- packages/components/Callout/jest.config.js | 2 +- packages/components/Callout/package.json | 1 - packages/components/Menu/jest.config.js | 2 +- packages/components/Menu/package.json | 1 - packages/components/MenuButton/jest.config.js | 2 +- packages/components/MenuButton/package.json | 1 - packages/components/Separator/jest.config.js | 2 +- packages/components/Tabs/jest.config.js | 2 +- packages/experimental/MenuButton/jest.config.js | 2 +- packages/experimental/MenuButton/package.json | 1 - packages/experimental/Tabs/jest.config.js | 2 +- 11 files changed, 7 insertions(+), 11 deletions(-) diff --git a/packages/components/Callout/jest.config.js b/packages/components/Callout/jest.config.js index f6813bad78..051098f649 100644 --- a/packages/components/Callout/jest.config.js +++ b/packages/components/Callout/jest.config.js @@ -1,2 +1,2 @@ const { configureReactNativeJest } = require('@fluentui-react-native/scripts'); -module.exports = configureReactNativeJest('win32'); +module.exports = configureReactNativeJest('android'); diff --git a/packages/components/Callout/package.json b/packages/components/Callout/package.json index 8895838730..2cef7a5ab0 100644 --- a/packages/components/Callout/package.json +++ b/packages/components/Callout/package.json @@ -40,7 +40,6 @@ "devDependencies": { "@fluentui-react-native/eslint-config-rules": "^0.1.1", "@fluentui-react-native/scripts": "^0.1.1", - "@office-iss/react-native-win32": "^0.68.0", "@types/react-native": "^0.68.0", "react": "17.0.2", "react-native": "^0.68.0" diff --git a/packages/components/Menu/jest.config.js b/packages/components/Menu/jest.config.js index f6813bad78..a8bf7c4f87 100644 --- a/packages/components/Menu/jest.config.js +++ b/packages/components/Menu/jest.config.js @@ -1,2 +1,2 @@ const { configureReactNativeJest } = require('@fluentui-react-native/scripts'); -module.exports = configureReactNativeJest('win32'); +module.exports = configureReactNativeJest('ios'); diff --git a/packages/components/Menu/package.json b/packages/components/Menu/package.json index 4f7538b31c..56281b9d90 100644 --- a/packages/components/Menu/package.json +++ b/packages/components/Menu/package.json @@ -43,7 +43,6 @@ "@fluentui-react-native/eslint-config-rules": "^0.1.1", "@fluentui-react-native/scripts": "^0.1.1", "@fluentui-react-native/test-tools": ">=0.1.1 <1.0.0", - "@office-iss/react-native-win32": "^0.68.0", "@types/react-native": "^0.68.0", "react": "17.0.2", "react-native": "^0.68.0" diff --git a/packages/components/MenuButton/jest.config.js b/packages/components/MenuButton/jest.config.js index f6813bad78..a8bf7c4f87 100644 --- a/packages/components/MenuButton/jest.config.js +++ b/packages/components/MenuButton/jest.config.js @@ -1,2 +1,2 @@ const { configureReactNativeJest } = require('@fluentui-react-native/scripts'); -module.exports = configureReactNativeJest('win32'); +module.exports = configureReactNativeJest('ios'); diff --git a/packages/components/MenuButton/package.json b/packages/components/MenuButton/package.json index 28c66e9571..cbe733cdc1 100644 --- a/packages/components/MenuButton/package.json +++ b/packages/components/MenuButton/package.json @@ -42,7 +42,6 @@ "devDependencies": { "@fluentui-react-native/eslint-config-rules": "^0.1.1", "@fluentui-react-native/scripts": "^0.1.1", - "@office-iss/react-native-win32": "^0.68.0", "@types/react-native": "^0.68.0", "react": "17.0.2", "react-native": "^0.68.0" diff --git a/packages/components/Separator/jest.config.js b/packages/components/Separator/jest.config.js index f6813bad78..051098f649 100644 --- a/packages/components/Separator/jest.config.js +++ b/packages/components/Separator/jest.config.js @@ -1,2 +1,2 @@ const { configureReactNativeJest } = require('@fluentui-react-native/scripts'); -module.exports = configureReactNativeJest('win32'); +module.exports = configureReactNativeJest('android'); diff --git a/packages/components/Tabs/jest.config.js b/packages/components/Tabs/jest.config.js index f6813bad78..051098f649 100644 --- a/packages/components/Tabs/jest.config.js +++ b/packages/components/Tabs/jest.config.js @@ -1,2 +1,2 @@ const { configureReactNativeJest } = require('@fluentui-react-native/scripts'); -module.exports = configureReactNativeJest('win32'); +module.exports = configureReactNativeJest('android'); diff --git a/packages/experimental/MenuButton/jest.config.js b/packages/experimental/MenuButton/jest.config.js index f6813bad78..a8bf7c4f87 100644 --- a/packages/experimental/MenuButton/jest.config.js +++ b/packages/experimental/MenuButton/jest.config.js @@ -1,2 +1,2 @@ const { configureReactNativeJest } = require('@fluentui-react-native/scripts'); -module.exports = configureReactNativeJest('win32'); +module.exports = configureReactNativeJest('ios'); diff --git a/packages/experimental/MenuButton/package.json b/packages/experimental/MenuButton/package.json index 821a2e76d6..506a1c5938 100644 --- a/packages/experimental/MenuButton/package.json +++ b/packages/experimental/MenuButton/package.json @@ -35,7 +35,6 @@ "devDependencies": { "@fluentui-react-native/eslint-config-rules": "^0.1.1", "@fluentui-react-native/scripts": "^0.1.1", - "@office-iss/react-native-win32": "^0.68.0", "@types/react-native": "^0.68.0", "react": "17.0.2", "react-native": "^0.68.0" diff --git a/packages/experimental/Tabs/jest.config.js b/packages/experimental/Tabs/jest.config.js index f6813bad78..051098f649 100644 --- a/packages/experimental/Tabs/jest.config.js +++ b/packages/experimental/Tabs/jest.config.js @@ -1,2 +1,2 @@ const { configureReactNativeJest } = require('@fluentui-react-native/scripts'); -module.exports = configureReactNativeJest('win32'); +module.exports = configureReactNativeJest('android'); From e4432336a45a6d7ed18c2e076cbf6a78f516d325 Mon Sep 17 00:00:00 2001 From: Ruriko Araki Date: Tue, 29 Nov 2022 10:56:40 -0800 Subject: [PATCH 6/8] Undo snap updates --- .../__snapshots__/Menu.test.tsx.snap | 916 +++++------------- .../__snapshots__/MenuButton.test.tsx.snap | 21 +- .../__snapshots__/Tabs.test.tsx.snap | 134 +-- .../__snapshots__/MenuButton.test.tsx.snap | 41 +- .../__snapshots__/Tabs.test.tsx.snap | 320 +----- 5 files changed, 331 insertions(+), 1101 deletions(-) diff --git a/packages/components/Menu/src/__tests__/__snapshots__/Menu.test.tsx.snap b/packages/components/Menu/src/__tests__/__snapshots__/Menu.test.tsx.snap index 33ba6ba21f..02ba61a438 100644 --- a/packages/components/Menu/src/__tests__/__snapshots__/Menu.test.tsx.snap +++ b/packages/components/Menu/src/__tests__/__snapshots__/Menu.test.tsx.snap @@ -2,16 +2,7 @@ exports[`Menu component tests Menu default 1`] = ` @@ -92,16 +68,7 @@ exports[`Menu component tests Menu default 1`] = ` exports[`Menu component tests Menu defaultOpen 1`] = ` Array [ @@ -183,7 +135,7 @@ Array [ borderWidth={1} doNotTakePointerCapture={false} onDismiss={[Function]} - setInitialFocus={true} + setInitialFocus={false} style={ Object { "backgroundColor": "#faf9f8", @@ -206,7 +158,7 @@ Array [ "display": "flex", "maxWidth": 300, "minWidth": 128, - "paddingVertical": 4, + "padding": 8, } } > @@ -219,26 +171,13 @@ Array [ } } accessible={true} + collapsable={false} enableFocusRing={true} focusable={true} - keyDownEvents={ - Array [ - Object { - "key": " ", - }, - Object { - "key": "Enter", - }, - ] - } onAccessibilityTap={[Function]} onBlur={[Function]} onClick={[Function]} onFocus={[Function]} - onKeyDown={[Function]} - onKeyUp={[Function]} - onMouseEnter={[Function]} - onMouseLeave={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} onResponderRelease={[Function]} @@ -249,27 +188,24 @@ Array [ Object { "alignItems": "center", "backgroundColor": "#ffffff", - "borderRadius": 0, + "borderRadius": 4, "display": "flex", "flexDirection": "row", "maxWidth": 300, - "minHeight": 24, + "minHeight": 32, "minWidth": 160, - "padding": 4, - "paddingHorizontal": 8, } } > @@ -452,7 +349,7 @@ Array [ } doNotTakePointerCapture={false} onDismiss={[Function]} - setInitialFocus={true} + setInitialFocus={false} style={ Object { "backgroundColor": "#faf9f8", @@ -475,7 +372,7 @@ Array [ "display": "flex", "maxWidth": 300, "minWidth": 128, - "paddingVertical": 4, + "padding": 8, } } > @@ -488,26 +385,13 @@ Array [ } } accessible={true} + collapsable={false} enableFocusRing={true} focusable={true} - keyDownEvents={ - Array [ - Object { - "key": " ", - }, - Object { - "key": "Enter", - }, - ] - } onAccessibilityTap={[Function]} onBlur={[Function]} onClick={[Function]} onFocus={[Function]} - onKeyDown={[Function]} - onKeyUp={[Function]} - onMouseEnter={[Function]} - onMouseLeave={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} onResponderRelease={[Function]} @@ -518,27 +402,24 @@ Array [ Object { "alignItems": "center", "backgroundColor": "#ffffff", - "borderRadius": 0, + "borderRadius": 4, "display": "flex", "flexDirection": "row", "maxWidth": 300, - "minHeight": 24, + "minHeight": 32, "minWidth": 160, - "padding": 4, - "paddingHorizontal": 8, } } > @@ -653,7 +510,7 @@ Array [ } doNotTakePointerCapture={false} onDismiss={[Function]} - setInitialFocus={true} + setInitialFocus={false} style={ Object { "backgroundColor": "#faf9f8", @@ -676,7 +533,7 @@ Array [ "display": "flex", "maxWidth": 300, "minWidth": 128, - "paddingVertical": 4, + "padding": 8, } } > @@ -697,26 +554,13 @@ Array [ } } accessible={true} + collapsable={false} enableFocusRing={true} focusable={true} - keyDownEvents={ - Array [ - Object { - "key": " ", - }, - Object { - "key": "Enter", - }, - ] - } onAccessibilityAction={[Function]} onBlur={[Function]} onClick={[Function]} onFocus={[Function]} - onKeyDown={[Function]} - onKeyUp={[Function]} - onMouseEnter={[Function]} - onMouseLeave={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} onResponderRelease={[Function]} @@ -727,14 +571,12 @@ Array [ Object { "alignItems": "center", "backgroundColor": "#ffffff", - "borderRadius": 0, + "borderRadius": 4, "display": "flex", "flexDirection": "row", "maxWidth": 300, - "minHeight": 24, + "minHeight": 32, "minWidth": 160, - "padding": 4, - "paddingHorizontal": 8, } } > @@ -742,7 +584,7 @@ Array [ align="xMidYMid" bbHeight={16} bbWidth={16} - color={4280558628} + color={4282532418} focusable={false} height={16} meetOrSlice={0} @@ -755,7 +597,7 @@ Array [ "borderWidth": 0, }, Object { - "marginEnd": 4, + "marginEnd": 8, }, Object { "flex": 0, @@ -765,9 +607,9 @@ Array [ }, ] } - tintColor={4280558628} - vbHeight={12} - vbWidth={12} + tintColor={4282532418} + vbHeight={16} + vbWidth={16} width={16} xml=" @@ -793,13 +635,12 @@ Array [ @@ -895,7 +722,7 @@ Array [ "borderWidth": 0, }, Object { - "marginEnd": 4, + "marginEnd": 8, }, Object { "flex": 0, @@ -906,8 +733,8 @@ Array [ ] } tintColor={4290624957} - vbHeight={12} - vbWidth={12} + vbHeight={16} + vbWidth={16} width={16} xml=" @@ -933,13 +760,12 @@ Array [ @@ -1054,7 +856,7 @@ Array [ } doNotTakePointerCapture={false} onDismiss={[Function]} - setInitialFocus={true} + setInitialFocus={false} style={ Object { "backgroundColor": "#faf9f8", @@ -1077,7 +879,7 @@ Array [ "display": "flex", "maxWidth": 300, "minWidth": 128, - "paddingVertical": 4, + "padding": 8, } } > @@ -1098,26 +900,13 @@ Array [ } } accessible={true} + collapsable={false} enableFocusRing={true} focusable={true} - keyDownEvents={ - Array [ - Object { - "key": " ", - }, - Object { - "key": "Enter", - }, - ] - } onAccessibilityAction={[Function]} onBlur={[Function]} onClick={[Function]} onFocus={[Function]} - onKeyDown={[Function]} - onKeyUp={[Function]} - onMouseEnter={[Function]} - onMouseLeave={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} onResponderRelease={[Function]} @@ -1128,14 +917,12 @@ Array [ Object { "alignItems": "center", "backgroundColor": "#ffffff", - "borderRadius": 0, + "borderRadius": 4, "display": "flex", "flexDirection": "row", "maxWidth": 300, - "minHeight": 24, + "minHeight": 32, "minWidth": 160, - "padding": 4, - "paddingHorizontal": 8, } } > @@ -1143,7 +930,7 @@ Array [ align="xMidYMid" bbHeight={16} bbWidth={16} - color={4280558628} + color={4282532418} focusable={false} height={16} meetOrSlice={0} @@ -1156,7 +943,7 @@ Array [ "borderWidth": 0, }, Object { - "marginEnd": 4, + "marginEnd": 8, }, Object { "flex": 0, @@ -1166,9 +953,9 @@ Array [ }, ] } - tintColor={4280558628} - vbHeight={12} - vbWidth={12} + tintColor={4282532418} + vbHeight={16} + vbWidth={16} width={16} xml=" @@ -1194,13 +981,12 @@ Array [ @@ -1283,7 +1055,7 @@ Array [ align="xMidYMid" bbHeight={16} bbWidth={16} - color={4280558628} + color={4282532418} focusable={false} height={16} meetOrSlice={0} @@ -1296,7 +1068,7 @@ Array [ "borderWidth": 0, }, Object { - "marginEnd": 4, + "marginEnd": 8, }, Object { "flex": 0, @@ -1306,9 +1078,9 @@ Array [ }, ] } - tintColor={4280558628} - vbHeight={12} - vbWidth={12} + tintColor={4282532418} + vbHeight={16} + vbWidth={16} width={16} xml=" @@ -1334,13 +1106,12 @@ Array [ @@ -1455,7 +1202,7 @@ Array [ } doNotTakePointerCapture={false} onDismiss={[Function]} - setInitialFocus={true} + setInitialFocus={false} style={ Object { "backgroundColor": "#faf9f8", @@ -1478,7 +1225,7 @@ Array [ "display": "flex", "maxWidth": 300, "minWidth": 128, - "paddingVertical": 4, + "padding": 8, } } > @@ -1499,26 +1246,13 @@ Array [ } } accessible={true} + collapsable={false} enableFocusRing={true} focusable={true} - keyDownEvents={ - Array [ - Object { - "key": " ", - }, - Object { - "key": "Enter", - }, - ] - } onAccessibilityAction={[Function]} onBlur={[Function]} onClick={[Function]} onFocus={[Function]} - onKeyDown={[Function]} - onKeyUp={[Function]} - onMouseEnter={[Function]} - onMouseLeave={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} onResponderRelease={[Function]} @@ -1529,14 +1263,12 @@ Array [ Object { "alignItems": "center", "backgroundColor": "#ffffff", - "borderRadius": 0, + "borderRadius": 4, "display": "flex", "flexDirection": "row", "maxWidth": 300, - "minHeight": 24, + "minHeight": 32, "minWidth": 160, - "padding": 4, - "paddingHorizontal": 8, } } > @@ -1544,7 +1276,7 @@ Array [ align="xMidYMid" bbHeight={16} bbWidth={16} - color={4280558628} + color={4282532418} focusable={false} height={16} meetOrSlice={0} @@ -1557,7 +1289,7 @@ Array [ "borderWidth": 0, }, Object { - "marginEnd": 4, + "marginEnd": 8, }, Object { "flex": 0, @@ -1567,9 +1299,9 @@ Array [ }, ] } - tintColor={4280558628} - vbHeight={12} - vbWidth={12} + tintColor={4282532418} + vbHeight={16} + vbWidth={16} width={16} xml=" @@ -1595,13 +1327,12 @@ Array [ @@ -1684,7 +1401,7 @@ Array [ align="xMidYMid" bbHeight={16} bbWidth={16} - color={4280558628} + color={4282532418} focusable={false} height={16} meetOrSlice={0} @@ -1697,7 +1414,7 @@ Array [ "borderWidth": 0, }, Object { - "marginEnd": 4, + "marginEnd": 8, }, Object { "flex": 0, @@ -1707,9 +1424,9 @@ Array [ }, ] } - tintColor={4280558628} - vbHeight={12} - vbWidth={12} + tintColor={4282532418} + vbHeight={16} + vbWidth={16} width={16} xml=" @@ -1735,13 +1452,12 @@ Array [ @@ -1856,7 +1548,7 @@ Array [ } doNotTakePointerCapture={false} onDismiss={[Function]} - setInitialFocus={true} + setInitialFocus={false} style={ Object { "backgroundColor": "#faf9f8", @@ -1879,7 +1571,7 @@ Array [ "display": "flex", "maxWidth": 300, "minWidth": 128, - "paddingVertical": 4, + "padding": 8, } } > @@ -1900,26 +1592,13 @@ Array [ } } accessible={true} + collapsable={false} enableFocusRing={true} focusable={true} - keyDownEvents={ - Array [ - Object { - "key": " ", - }, - Object { - "key": "Enter", - }, - ] - } onAccessibilityAction={[Function]} onBlur={[Function]} onClick={[Function]} onFocus={[Function]} - onKeyDown={[Function]} - onKeyUp={[Function]} - onMouseEnter={[Function]} - onMouseLeave={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} onResponderRelease={[Function]} @@ -1930,14 +1609,12 @@ Array [ Object { "alignItems": "center", "backgroundColor": "#ffffff", - "borderRadius": 0, + "borderRadius": 4, "display": "flex", "flexDirection": "row", "maxWidth": 300, - "minHeight": 24, + "minHeight": 32, "minWidth": 160, - "padding": 4, - "paddingHorizontal": 8, } } > @@ -1945,7 +1622,7 @@ Array [ align="xMidYMid" bbHeight={16} bbWidth={16} - color={4280558628} + color={4282532418} focusable={false} height={16} meetOrSlice={0} @@ -1958,7 +1635,7 @@ Array [ "borderWidth": 0, }, Object { - "marginEnd": 4, + "marginEnd": 8, }, Object { "flex": 0, @@ -1968,9 +1645,9 @@ Array [ }, ] } - tintColor={4280558628} - vbHeight={12} - vbWidth={12} + tintColor={4282532418} + vbHeight={16} + vbWidth={16} width={16} xml=" @@ -1996,13 +1673,12 @@ Array [ @@ -2073,7 +1735,7 @@ Array [ align="xMidYMid" bbHeight={16} bbWidth={16} - color={4280558628} + color={4282532418} focusable={false} height={16} meetOrSlice={0} @@ -2086,7 +1748,7 @@ Array [ "borderWidth": 0, }, Object { - "marginEnd": 4, + "marginEnd": 8, }, Object { "flex": 0, @@ -2096,9 +1758,9 @@ Array [ }, ] } - tintColor={4280558628} - vbHeight={12} - vbWidth={12} + tintColor={4282532418} + vbHeight={16} + vbWidth={16} width={16} xml=" @@ -2124,13 +1786,12 @@ Array [ @@ -2245,7 +1882,7 @@ Array [ } doNotTakePointerCapture={false} onDismiss={[Function]} - setInitialFocus={true} + setInitialFocus={false} style={ Object { "backgroundColor": "#faf9f8", @@ -2268,7 +1905,7 @@ Array [ "display": "flex", "maxWidth": 300, "minWidth": 128, - "paddingVertical": 4, + "padding": 8, } } > @@ -2281,26 +1918,13 @@ Array [ } } accessible={true} + collapsable={false} enableFocusRing={true} focusable={true} - keyDownEvents={ - Array [ - Object { - "key": " ", - }, - Object { - "key": "Enter", - }, - ] - } onAccessibilityTap={[Function]} onBlur={[Function]} onClick={[Function]} onFocus={[Function]} - onKeyDown={[Function]} - onKeyUp={[Function]} - onMouseEnter={[Function]} - onMouseLeave={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} onResponderRelease={[Function]} @@ -2311,27 +1935,24 @@ Array [ Object { "alignItems": "center", "backgroundColor": "#ffffff", - "borderRadius": 0, + "borderRadius": 4, "display": "flex", "flexDirection": "row", "maxWidth": 300, - "minHeight": 24, + "minHeight": 32, "minWidth": 160, - "padding": 4, - "paddingHorizontal": 8, } } > diff --git a/packages/experimental/Tabs/src/__tests__/__snapshots__/Tabs.test.tsx.snap b/packages/experimental/Tabs/src/__tests__/__snapshots__/Tabs.test.tsx.snap index 8a284fe09b..2ad41aecb0 100644 --- a/packages/experimental/Tabs/src/__tests__/__snapshots__/Tabs.test.tsx.snap +++ b/packages/experimental/Tabs/src/__tests__/__snapshots__/Tabs.test.tsx.snap @@ -4,6 +4,7 @@ exports[`Tabs FocusZone props 1`] = ` Date: Tue, 29 Nov 2022 10:56:59 -0800 Subject: [PATCH 7/8] Change files --- ...tive-checkbox-3f2687da-e979-4cb7-a540-bbf5e1504ace.json | 7 +++++++ ...native-switch-6a6b040c-16f3-474b-a7b4-e585b8fb8f6d.json | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 change/@fluentui-react-native-checkbox-3f2687da-e979-4cb7-a540-bbf5e1504ace.json create mode 100644 change/@fluentui-react-native-switch-6a6b040c-16f3-474b-a7b4-e585b8fb8f6d.json diff --git a/change/@fluentui-react-native-checkbox-3f2687da-e979-4cb7-a540-bbf5e1504ace.json b/change/@fluentui-react-native-checkbox-3f2687da-e979-4cb7-a540-bbf5e1504ace.json new file mode 100644 index 0000000000..b2903b036c --- /dev/null +++ b/change/@fluentui-react-native-checkbox-3f2687da-e979-4cb7-a540-bbf5e1504ace.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Update config", + "packageName": "@fluentui-react-native/checkbox", + "email": "ruaraki@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-switch-6a6b040c-16f3-474b-a7b4-e585b8fb8f6d.json b/change/@fluentui-react-native-switch-6a6b040c-16f3-474b-a7b4-e585b8fb8f6d.json new file mode 100644 index 0000000000..6470312175 --- /dev/null +++ b/change/@fluentui-react-native-switch-6a6b040c-16f3-474b-a7b4-e585b8fb8f6d.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Update config", + "packageName": "@fluentui-react-native/switch", + "email": "ruaraki@microsoft.com", + "dependentChangeType": "patch" +} From 173ac4412d75590f59eee9629d60959b7878f743 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Wed, 28 Dec 2022 18:23:28 -0600 Subject: [PATCH 8/8] Update snapshot --- .../__snapshots__/Switch.test.tsx.snap | 84 ++++++++++--------- 1 file changed, 46 insertions(+), 38 deletions(-) diff --git a/packages/experimental/Switch/src/__tests__/__snapshots__/Switch.test.tsx.snap b/packages/experimental/Switch/src/__tests__/__snapshots__/Switch.test.tsx.snap index 8a34450c28..ecc6adfafb 100644 --- a/packages/experimental/Switch/src/__tests__/__snapshots__/Switch.test.tsx.snap +++ b/packages/experimental/Switch/src/__tests__/__snapshots__/Switch.test.tsx.snap @@ -47,12 +47,13 @@ exports[`Switch Default 1`] = ` Object { "alignItems": "center", "alignSelf": "flex-start", - "borderColor": undefined, - "borderRadius": undefined, - "borderWidth": undefined, + "borderColor": "transparent", + "borderRadius": 4, + "borderWidth": 2, "flexDirection": "row-reverse", - "minHeight": undefined, - "minWidth": undefined, + "minHeight": 28, + "minWidth": 40, + "padding": 2, } } > @@ -62,9 +63,12 @@ exports[`Switch Default 1`] = ` "color": "#424242", "fontFamily": "Segoe UI", "fontSize": 12, - "color": "#242424", + "fontWeight": "400", + "margin": 0, + } } > + Default Switch @@ -95,12 +101,11 @@ exports[`Switch Default 1`] = ` animationClass="Ribbon_SwitchThumb" style={ Object { - "backgroundColor": "#ffffff", - "borderRadius": 100, - "elevation": 8, - "height": 26, - "margin": 3, - "width": 26, + "backgroundColor": "#616161", + "borderRadius": 17, + "height": 14, + "margin": 2, + "width": 14, } } /> @@ -156,20 +161,22 @@ exports[`Switch Disabled 1`] = ` Object { "alignItems": "center", "alignSelf": "flex-start", - "borderColor": undefined, - "borderRadius": undefined, - "borderWidth": undefined, + "borderColor": "transparent", + "borderRadius": 4, + "borderWidth": 2, "flexDirection": "row-reverse", - "minHeight": undefined, - "minWidth": undefined, + "minHeight": 28, + "minWidth": 40, + "padding": 2, } } > @@ -206,12 +215,11 @@ exports[`Switch Disabled 1`] = ` animationClass="Ribbon_SwitchThumb" style={ Object { - "backgroundColor": "#ffffff", - "borderRadius": 100, - "elevation": 0, - "height": 26, - "margin": 3, - "width": 26, + "backgroundColor": "#e0e0e0", + "borderRadius": 17, + "height": 14, + "margin": 2, + "width": 14, } } />