@fluentui-react-native/tester 0.114.2 → 0.116.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CHANGELOG.json +247 -1
  2. package/CHANGELOG.md +54 -2
  3. package/lib/fluent-tester/src/TestComponents/Common/styles.d.ts +4 -0
  4. package/lib/fluent-tester/src/TestComponents/Common/styles.d.ts.map +1 -1
  5. package/lib/fluent-tester/src/TestComponents/Common/styles.js +4 -0
  6. package/lib/fluent-tester/src/TestComponents/Common/styles.js.map +1 -1
  7. package/lib/fluent-tester/src/TestComponents/LinkExperimental/LinkTest.d.ts.map +1 -1
  8. package/lib/fluent-tester/src/TestComponents/LinkExperimental/LinkTest.js +16 -8
  9. package/lib/fluent-tester/src/TestComponents/LinkExperimental/LinkTest.js.map +1 -1
  10. package/lib/fluent-tester/src/TestComponents/Switch/CustomizedSwitch.d.ts.map +1 -1
  11. package/lib/fluent-tester/src/TestComponents/Switch/CustomizedSwitch.js +2 -1
  12. package/lib/fluent-tester/src/TestComponents/Switch/CustomizedSwitch.js.map +1 -1
  13. package/lib/fluent-tester/src/TestComponents/Switch/E2ESwitchTest.d.ts.map +1 -1
  14. package/lib/fluent-tester/src/TestComponents/Switch/E2ESwitchTest.js +7 -4
  15. package/lib/fluent-tester/src/TestComponents/Switch/E2ESwitchTest.js.map +1 -1
  16. package/lib/fluent-tester/src/TestComponents/Switch/Switch.d.ts.map +1 -1
  17. package/lib/fluent-tester/src/TestComponents/Switch/Switch.js +24 -13
  18. package/lib/fluent-tester/src/TestComponents/Switch/Switch.js.map +1 -1
  19. package/lib/fluent-tester/src/testPages.js +2 -2
  20. package/lib/fluent-tester/src/testPages.js.map +1 -1
  21. package/lib-commonjs/fluent-tester/src/TestComponents/Common/styles.d.ts +4 -0
  22. package/lib-commonjs/fluent-tester/src/TestComponents/Common/styles.d.ts.map +1 -1
  23. package/lib-commonjs/fluent-tester/src/TestComponents/Common/styles.js +4 -0
  24. package/lib-commonjs/fluent-tester/src/TestComponents/Common/styles.js.map +1 -1
  25. package/lib-commonjs/fluent-tester/src/TestComponents/LinkExperimental/LinkTest.d.ts.map +1 -1
  26. package/lib-commonjs/fluent-tester/src/TestComponents/LinkExperimental/LinkTest.js +15 -8
  27. package/lib-commonjs/fluent-tester/src/TestComponents/LinkExperimental/LinkTest.js.map +1 -1
  28. package/lib-commonjs/fluent-tester/src/TestComponents/Switch/CustomizedSwitch.d.ts.map +1 -1
  29. package/lib-commonjs/fluent-tester/src/TestComponents/Switch/CustomizedSwitch.js +5 -4
  30. package/lib-commonjs/fluent-tester/src/TestComponents/Switch/CustomizedSwitch.js.map +1 -1
  31. package/lib-commonjs/fluent-tester/src/TestComponents/Switch/E2ESwitchTest.d.ts.map +1 -1
  32. package/lib-commonjs/fluent-tester/src/TestComponents/Switch/E2ESwitchTest.js +5 -3
  33. package/lib-commonjs/fluent-tester/src/TestComponents/Switch/E2ESwitchTest.js.map +1 -1
  34. package/lib-commonjs/fluent-tester/src/TestComponents/Switch/Switch.d.ts.map +1 -1
  35. package/lib-commonjs/fluent-tester/src/TestComponents/Switch/Switch.js +23 -13
  36. package/lib-commonjs/fluent-tester/src/TestComponents/Switch/Switch.js.map +1 -1
  37. package/lib-commonjs/fluent-tester/src/testPages.js +2 -2
  38. package/lib-commonjs/fluent-tester/src/testPages.js.map +1 -1
  39. package/package.json +36 -36
  40. package/src/TestComponents/Common/styles.ts +4 -0
  41. package/src/TestComponents/LinkExperimental/LinkTest.tsx +12 -5
  42. package/src/TestComponents/Switch/CustomizedSwitch.tsx +2 -1
  43. package/src/TestComponents/Switch/E2ESwitchTest.tsx +10 -4
  44. package/src/TestComponents/Switch/Switch.tsx +34 -13
  45. package/src/testPages.ts +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/tester",
3
- "version": "0.114.2",
3
+ "version": "0.116.0",
4
4
  "description": "A test app to test FluentUI React Native Components during development",
5
5
  "license": "MIT",
6
6
  "author": "Microsoft <fluentuinativeowners@microsoft.com>",
@@ -33,43 +33,43 @@
33
33
  "directory": "apps/fluent-tester"
34
34
  },
35
35
  "dependencies": {
36
- "@fluentui-react-native/android-theme": ">=0.15.0 <1.0.0",
37
- "@fluentui-react-native/apple-theme": ">=0.17.1 <1.0.0",
38
- "@fluentui-react-native/avatar": "^1.5.0",
39
- "@fluentui-react-native/badge": ">=0.4.1 <1.0.0",
40
- "@fluentui-react-native/button": ">=0.32.6 <1.0.0",
41
- "@fluentui-react-native/default-theme": ">=0.16.15 <1.0.0",
42
- "@fluentui-react-native/dropdown": ">=0.7.1 <1.0.0",
43
- "@fluentui-react-native/experimental-activity-indicator": ">=0.7.1 <1.0.0",
44
- "@fluentui-react-native/experimental-avatar": ">=0.16.28 <1.0.0",
45
- "@fluentui-react-native/experimental-button": "0.16.64",
46
- "@fluentui-react-native/experimental-checkbox": "0.13.10",
47
- "@fluentui-react-native/experimental-expander": "0.5.1",
48
- "@fluentui-react-native/experimental-icon": ">=0.1.2 <1.0.0",
49
- "@fluentui-react-native/experimental-link": "^0.2.6",
50
- "@fluentui-react-native/experimental-menu-button": ">=0.6.1 <1.0.0",
36
+ "@fluentui-react-native/android-theme": ">=0.15.1 <1.0.0",
37
+ "@fluentui-react-native/apple-theme": ">=0.17.2 <1.0.0",
38
+ "@fluentui-react-native/avatar": "^1.5.1",
39
+ "@fluentui-react-native/badge": ">=0.4.2 <1.0.0",
40
+ "@fluentui-react-native/button": ">=0.32.7 <1.0.0",
41
+ "@fluentui-react-native/default-theme": ">=0.16.16 <1.0.0",
42
+ "@fluentui-react-native/dropdown": ">=0.7.2 <1.0.0",
43
+ "@fluentui-react-native/experimental-activity-indicator": ">=0.7.2 <1.0.0",
44
+ "@fluentui-react-native/experimental-avatar": ">=0.16.29 <1.0.0",
45
+ "@fluentui-react-native/experimental-button": "0.16.65",
46
+ "@fluentui-react-native/experimental-checkbox": "0.13.11",
47
+ "@fluentui-react-native/experimental-expander": "0.5.2",
48
+ "@fluentui-react-native/experimental-icon": ">=0.1.3 <1.0.0",
49
+ "@fluentui-react-native/experimental-link": "^0.3.0",
50
+ "@fluentui-react-native/experimental-menu-button": ">=0.6.2 <1.0.0",
51
51
  "@fluentui-react-native/experimental-native-date-picker": ">=0.7.3 <1.0.0",
52
- "@fluentui-react-native/experimental-radio-group": "^0.8.5",
53
- "@fluentui-react-native/experimental-shadow": "0.2.48",
54
- "@fluentui-react-native/experimental-shimmer": "0.8.1",
55
- "@fluentui-react-native/experimental-tabs": "0.8.9",
56
- "@fluentui-react-native/experimental-text": ">=0.11.28 <1.0.0",
57
- "@fluentui-react-native/framework": ">=0.8.24 <1.0.0",
58
- "@fluentui-react-native/icon": "0.16.1",
59
- "@fluentui-react-native/interactive-hooks": ">=0.21.5 <1.0.0",
60
- "@fluentui-react-native/menu": "^1.1.1",
52
+ "@fluentui-react-native/experimental-radio-group": "^0.8.6",
53
+ "@fluentui-react-native/experimental-shadow": "0.2.49",
54
+ "@fluentui-react-native/experimental-shimmer": "0.8.2",
55
+ "@fluentui-react-native/experimental-tabs": "0.8.10",
56
+ "@fluentui-react-native/experimental-text": ">=0.11.29 <1.0.0",
57
+ "@fluentui-react-native/framework": ">=0.8.25 <1.0.0",
58
+ "@fluentui-react-native/icon": "0.16.2",
59
+ "@fluentui-react-native/interactive-hooks": ">=0.22.0 <1.0.0",
60
+ "@fluentui-react-native/menu": "^1.1.2",
61
61
  "@fluentui-react-native/merge-props": ">=0.5.1 <1.0.0",
62
- "@fluentui-react-native/notification": "0.20.1",
63
- "@fluentui-react-native/stack": ">=0.7.30 <1.0.0",
64
- "@fluentui-react-native/switch": "^0.7.9",
65
- "@fluentui-react-native/text": ">=0.18.1 <1.0.0",
66
- "@fluentui-react-native/theme": ">=0.7.10 <1.0.0",
67
- "@fluentui-react-native/theme-tokens": "^0.22.0",
68
- "@fluentui-react-native/theme-types": ">=0.25.0 <1.0.0",
62
+ "@fluentui-react-native/notification": "0.20.2",
63
+ "@fluentui-react-native/stack": ">=0.7.31 <1.0.0",
64
+ "@fluentui-react-native/switch": "^0.8.0",
65
+ "@fluentui-react-native/text": ">=0.18.2 <1.0.0",
66
+ "@fluentui-react-native/theme": ">=0.7.11 <1.0.0",
67
+ "@fluentui-react-native/theme-tokens": "^0.22.1",
68
+ "@fluentui-react-native/theme-types": ">=0.26.0 <1.0.0",
69
69
  "@fluentui-react-native/themed-stylesheet": "^1.4.1",
70
- "@fluentui-react-native/theming-utils": ">=0.19.1 <1.0.0",
71
- "@fluentui-react-native/win32-theme": ">=0.24.2 <1.0.0",
72
- "@fluentui/react-native": ">=0.33.10 <1.0.0",
70
+ "@fluentui-react-native/theming-utils": ">=0.20.0 <1.0.0",
71
+ "@fluentui-react-native/win32-theme": ">=0.24.3 <1.0.0",
72
+ "@fluentui/react-native": ">=0.33.11 <1.0.0",
73
73
  "@fortawesome/fontawesome-svg-core": "^6.2.0",
74
74
  "@fortawesome/free-solid-svg-icons": "^6.2.0",
75
75
  "@fortawesome/react-native-fontawesome": "^0.3.0",
@@ -97,7 +97,7 @@
97
97
  "react-native-svg-transformer": "^1.0.0",
98
98
  "react-native-test-app": "^2.0.2",
99
99
  "react-test-renderer": "17.0.2",
100
- "@fluentui-react-native/focus-zone": "^0.11.11"
100
+ "@fluentui-react-native/focus-zone": "^0.11.12"
101
101
  },
102
102
  "peerDependencies": {
103
103
  "@office-iss/react-native-win32": "^0.68.0"
@@ -60,6 +60,10 @@ export const commonTestStyles = StyleSheet.create({
60
60
  minHeight: 200,
61
61
  justifyContent: 'space-between',
62
62
  },
63
+ androidContainer: {
64
+ marginTop: 20,
65
+ justifyContent: 'space-between',
66
+ },
63
67
  });
64
68
 
65
69
  export const fluentTesterStyles = StyleSheet.create({
@@ -6,6 +6,7 @@ import { stackStyle, commonTestStyles as commonStyles } from '../Common/styles';
6
6
  import { EXPERIMENTAL_LINK_TESTPAGE } from './consts';
7
7
  import { Test, TestSection, PlatformStatus } from '../Test';
8
8
  import { LinkE2ETest } from './E2ELinkTest';
9
+ import { Platform } from 'react-native';
9
10
 
10
11
  const DefaultLinks: React.FunctionComponent = () => {
11
12
  const doPress = React.useCallback(() => Alert.alert('Alert.', 'You have been alerted.'), []);
@@ -180,10 +181,16 @@ const linkSections: TestSection[] = [
180
181
  name: 'Inline Links',
181
182
  component: InlineLinks,
182
183
  },
183
- {
184
- name: 'Subtle Links',
185
- component: SubtleLinks,
186
- },
184
+ ...Platform.select({
185
+ // As per design discussion , There is no use case for subtle link on Android , No tokens available for same.
186
+ android: [null],
187
+ default: [
188
+ {
189
+ name: 'Subtle Links',
190
+ component: SubtleLinks,
191
+ },
192
+ ],
193
+ }),
187
194
  {
188
195
  name: 'Custom Link',
189
196
  component: CustomLinks,
@@ -200,7 +207,7 @@ export const ExperimentalLinkTest: React.FunctionComponent = () => {
200
207
  uwpStatus: 'Experimental',
201
208
  iosStatus: 'Experimental',
202
209
  macosStatus: 'Beta',
203
- androidStatus: 'Backlog',
210
+ androidStatus: 'Experimental',
204
211
  };
205
212
 
206
213
  const description =
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
- import { View, TextInput, Text, StyleSheet } from 'react-native';
2
+ import { View, TextInput, StyleSheet } from 'react-native';
3
+ import { Text } from '@fluentui-react-native/experimental-text';
3
4
  import { Switch, SwitchTokens } from '@fluentui-react-native/switch';
4
5
  import { commonTestStyles as commonStyles } from '../Common/styles';
5
6
 
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { Stack } from '@fluentui-react-native/stack';
3
3
  import { Switch } from '@fluentui-react-native/switch';
4
- import { Text } from 'react-native';
5
- import { stackStyle } from '../Common/styles';
4
+ import { TextV1 } from '@fluentui-react-native/text';
5
+ import { stackStyle, commonTestStyles } from '../Common/styles';
6
6
  import {
7
7
  SWITCH_TEST_COMPONENT,
8
8
  SWITCH_ACCESSIBILITY_LABEL,
@@ -10,10 +10,16 @@ import {
10
10
  SWITCH_TEST_COMPONENT_LABEL,
11
11
  SWITCH_ON_PRESS,
12
12
  } from './consts';
13
+ import { Platform } from 'react-native';
13
14
 
14
15
  export const E2ESwitchTest: React.FunctionComponent = () => {
15
16
  const [switchPressed, setSwitchSwitchPressed] = React.useState(false);
16
17
 
18
+ const memoizedStyles = React.useMemo(
19
+ () => (Platform.OS === 'android' ? { ...commonTestStyles.androidContainer, height: 100, marginBottom: 50 } : stackStyle),
20
+ [],
21
+ );
22
+
17
23
  const onToggle = React.useCallback(
18
24
  (_e, checked) => {
19
25
  setSwitchSwitchPressed(checked);
@@ -22,9 +28,9 @@ export const E2ESwitchTest: React.FunctionComponent = () => {
22
28
  );
23
29
 
24
30
  return (
25
- <Stack style={stackStyle}>
31
+ <Stack style={memoizedStyles}>
26
32
  <Switch testID={SWITCH_TEST_COMPONENT} label={'Switch Test'} onChange={onToggle} accessibilityLabel={SWITCH_ACCESSIBILITY_LABEL} />
27
- {switchPressed ? <Text testID={SWITCH_ON_PRESS}>Switch Toggled On</Text> : null}
33
+ {switchPressed ? <TextV1 testID={SWITCH_ON_PRESS}>Switch Toggled On</TextV1> : null}
28
34
  <Switch label={SWITCH_TEST_COMPONENT_LABEL} testID={SWITCH_NO_A11Y_LABEL_COMPONENT} />
29
35
  </Stack>
30
36
  );
@@ -8,6 +8,7 @@ import { commonTestStyles } from '../Common/styles';
8
8
  import { ButtonV1 as Button } from '@fluentui-react-native/button';
9
9
  import { InteractionEvent } from '@fluentui-react-native/interactive-hooks';
10
10
  import { CustomizedSwitch } from './CustomizedSwitch';
11
+ import { Platform } from 'react-native';
11
12
 
12
13
  const styles = StyleSheet.create({
13
14
  square: {
@@ -18,8 +19,12 @@ const styles = StyleSheet.create({
18
19
  });
19
20
 
20
21
  const StandardUsage: React.FunctionComponent = () => {
22
+ const memoizedStyles = React.useMemo(
23
+ () => (Platform.OS === 'android' ? { ...commonTestStyles.androidContainer, height: 180 } : commonTestStyles.settingsPicker),
24
+ [],
25
+ );
21
26
  return (
22
- <View style={commonTestStyles.settingsPicker}>
27
+ <View style={memoizedStyles}>
23
28
  <Switch defaultChecked={true} label={'Default Checked True'} />
24
29
  <Switch defaultChecked={false} label={'Default Checked False'} />
25
30
  <Switch defaultChecked={true} label={'Disabled Default Checked True'} disabled />
@@ -35,8 +40,13 @@ const OnChangeUsage: React.FunctionComponent = () => {
35
40
  setDisplaySquare(checked);
36
41
  };
37
42
 
43
+ const memoizedStyles = React.useMemo(
44
+ () => (Platform.OS === 'android' ? { ...commonTestStyles.androidContainer, height: 150 } : commonTestStyles.settingsPicker),
45
+ [],
46
+ );
47
+
38
48
  return (
39
- <View style={commonTestStyles.settingsPicker}>
49
+ <View style={memoizedStyles}>
40
50
  <Switch label={'Toggle Square'} defaultChecked={true} onChange={defaultToggleSquare} />
41
51
  {displaySquare && <View style={styles.square} />}
42
52
  </View>
@@ -54,8 +64,13 @@ const ControlSwitchValues: React.FunctionComponent = () => {
54
64
  setToggleSwitch(false);
55
65
  };
56
66
 
67
+ const memoizedStyles = React.useMemo(
68
+ () => (Platform.OS === 'android' ? { ...commonTestStyles.androidContainer, height: 150 } : commonTestStyles.settingsPicker),
69
+ [],
70
+ );
71
+
57
72
  return (
58
- <View style={commonTestStyles.settingsPicker}>
73
+ <View style={memoizedStyles}>
59
74
  <Button onClick={toggleSwitchTrue}>Toggle Switch True</Button>
60
75
  <Button onClick={toggleSwitchFalse}>Toggle Switch False</Button>
61
76
  <Switch label={'Switch Value Being Controlled'} checked={toggleSwitch} />
@@ -68,7 +83,7 @@ const LabelPosition: React.FunctionComponent = () => {
68
83
  <View style={commonTestStyles.settingsPicker}>
69
84
  <Switch defaultChecked={true} labelPosition={'before'} label={'before'} />
70
85
  <Switch defaultChecked={true} labelPosition={'after'} label={'after'} />
71
- <Switch defaultChecked={true} labelPosition={'above'} label={'above'} />
86
+ {Platform.OS !== 'android' && <Switch defaultChecked={true} labelPosition={'above'} label={'above'} />}
72
87
  </View>
73
88
  );
74
89
  };
@@ -96,14 +111,20 @@ const toggleSections: TestSection[] = [
96
111
  name: 'Control Switch Values',
97
112
  component: () => <ControlSwitchValues />,
98
113
  },
99
- {
100
- name: 'Label Position',
101
- component: () => <LabelPosition />,
102
- },
103
- {
104
- name: 'On/Off Text',
105
- component: () => <OnOffText />,
106
- },
114
+ Platform.select({
115
+ android: null,
116
+ default: {
117
+ name: 'Label Position',
118
+ component: () => <LabelPosition />,
119
+ },
120
+ }),
121
+ Platform.select({
122
+ android: null,
123
+ default: {
124
+ name: 'On/Off Text',
125
+ component: () => <OnOffText />,
126
+ },
127
+ }),
107
128
  {
108
129
  name: 'Customized Tokens',
109
130
  component: () => <CustomizedSwitch />,
@@ -120,7 +141,7 @@ export const SwitchTest: React.FunctionComponent = () => {
120
141
  uwpStatus: 'Backlog',
121
142
  iosStatus: 'Backlog',
122
143
  macosStatus: 'Backlog',
123
- androidStatus: 'Backlog',
144
+ androidStatus: 'Experimental',
124
145
  };
125
146
 
126
147
  const description = 'Switch is a control that has two mutually exclusive states.';
package/src/testPages.ts CHANGED
@@ -154,7 +154,7 @@ export const tests: TestDescription[] = [
154
154
  name: 'Link V1',
155
155
  component: ExperimentalLinkTest,
156
156
  testPage: HOMEPAGE_EXPERIMENTAL_LINK_BUTTON,
157
- platforms: ['win32'],
157
+ platforms: ['win32', 'android'],
158
158
  },
159
159
  {
160
160
  name: 'Menu',
@@ -250,7 +250,7 @@ export const tests: TestDescription[] = [
250
250
  name: 'Switch',
251
251
  component: SwitchTest,
252
252
  testPage: HOMEPAGE_SWITCH_BUTTON,
253
- platforms: ['win32'],
253
+ platforms: ['win32', 'android'],
254
254
  },
255
255
  {
256
256
  name: 'Tabs Legacy',