Skip to content

Commit 1c2663f

Browse files
committed
Merge branch 'master' into testsss
* master: (41 commits) Remove animatable from FloatingButton component (#1134) Stop using AnimatableManager in Hint (#1125) Change setTimeout's time from 50 to 100 Update generated types push expo stuff Update wiki links Fix/dialog swiping does not trigger on dialog dismissed (#1093) remove github token Create colors.md CardsScreen - fix backgrounds and remove obsolete examples (#1124) trigger build Add missing functionality for Incubator.TextField (#1121) Update all app icons sizes for iOS project Adding 'defaultSource' for image source in case of an error (#1116) DateTimePicker - adding 'headerStyle' prop to adjust iOS dialog header style (#1117) add prepush script Infra/use did update (#1119) SettingsScreen - rename to UNSAFE (#1118) Create a middleware TextField migrator to migrate people to the new TextField implementation (#1113) Fix lint error ...
2 parents 4debe82 + 30dcb60 commit 1c2663f

File tree

73 files changed

+2415
-764
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+2415
-764
lines changed

.eslintignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
/src/style/typography.js
2-
**/*.ts
3-
**/*.tsx
1+
/src/style/typography.js

.eslintrc.js

Lines changed: 23 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,44 @@
11
module.exports = {
22
extends: ['plugin:@typescript-eslint/recommended', 'wix/react-native', 'plugin:react-hooks/recommended'],
33
parser: '@typescript-eslint/parser',
4+
// plugins: ['@typescript-eslint'],
45
rules: {
6+
/* Disabled rules for typescript */
7+
'no-dupe-class-members': 'off',
8+
/* Other Rules */
9+
'no-unused-expressions': 'off',
510
'arrow-parens': 'off',
611
// TODO: remove after migration of legacy lifecycle methods
712
camelcase: 'off',
813
'comma-dangle': ['error', 'never'],
914
'no-mixed-operators': ['off'],
1015
'no-trailing-spaces': 'off',
1116
'operator-linebreak': 'off',
12-
'max-len': ['warn', {code: 120, "ignoreComments": true, "ignoreStrings": true}],
17+
'max-len': ['warn', {code: 120, ignoreComments: true, ignoreStrings: true}],
1318
'react/jsx-no-bind': [
1419
'off',
1520
{
1621
ignoreRefs: true,
1722
allowArrowFunctions: false,
18-
allowBind: false,
19-
},
23+
allowBind: false
24+
}
2025
],
2126
'function-paren-newline': ['warn', 'never'],
2227
'new-cap': ['off'], // TODO: fix this in colors.js and remove this
2328
'default-case': ['off'],
24-
"@typescript-eslint/no-use-before-define": 0,
25-
"@typescript-eslint/explicit-function-return-type": 0,
26-
"@typescript-eslint/no-var-requires": 0,
27-
"@typescript-eslint/no-explicit-any": 0,
28-
"@typescript-eslint/member-delimiter-style": 0,
29-
// "@typescript-eslint/no-unused-vars": [2, {"args": "all", "argsIgnorePattern": "^_"}],
30-
"@typescript-eslint/no-unused-vars": 0, //todo: uncomment this line and use the the better unused rule above ^
31-
"@typescript-eslint/no-non-null-assertion": 0,
32-
"@typescript-eslint/explicit-member-accessibility": 0,
33-
"@typescript-eslint/prefer-optional-chain": "error",
34-
"@typescript-eslint/ban-ts-ignore": 0,
35-
"@typescript-eslint/no-empty-function": 0,
36-
"@typescript-eslint/camelcase": 0,
37-
"@typescript-eslint/indent": 0
38-
},
39-
plugins: ['@typescript-eslint'],
29+
'@typescript-eslint/no-use-before-define': 0,
30+
'@typescript-eslint/explicit-function-return-type': 0,
31+
'@typescript-eslint/no-var-requires': 0,
32+
'@typescript-eslint/no-explicit-any': 0,
33+
'@typescript-eslint/member-delimiter-style': 0,
34+
'@typescript-eslint/no-unused-vars': [2, {args: 'all', argsIgnorePattern: '^_'}],
35+
// "@typescript-eslint/no-unused-vars": 0, //todo: uncomment this line and use the the better unused rule above ^
36+
'@typescript-eslint/no-non-null-assertion': 0,
37+
'@typescript-eslint/explicit-member-accessibility': 0,
38+
'@typescript-eslint/prefer-optional-chain': 'error',
39+
'@typescript-eslint/ban-ts-ignore': 0,
40+
'@typescript-eslint/no-empty-function': 0,
41+
'@typescript-eslint/camelcase': 0,
42+
'@typescript-eslint/indent': 0
43+
}
4044
};
41-
42-
// OLD ESlint configuration
43-
// const validColors = require('./src/style/colorsPalette').colorsPalette;
44-
// const extraFixColorsMap = require('./src/style/colorsPalette').extraFixColorsMap;
45-
// const assetsDepJson = require('./eslint-rules/tests/assets_deprecation.json');
46-
// const deprecationsJson = require('./eslint-rules/tests/component_deprecation.json');
47-
48-
// module.exports = {
49-
// parser: 'babel-eslint',
50-
// extends: 'wix/react-native',
51-
// // plugins: ['react', 'react-native', 'uilib'],
52-
// // extends: ['airbnb'],
53-
// rules: {
54-
// 'arrow-body-style': 'off',
55-
// 'arrow-parens': 'off',
56-
// // TODO: remove after migration of legacy lifecycle methods
57-
// 'camelcase': 'off',
58-
// 'class-methods-use-this': 'off',
59-
// 'consistent-return': 'off',
60-
// 'comma-dangle': 'off',
61-
// 'global-require': 'off',
62-
// 'max-len': [2, 130, 4, {ignoreUrls: true}],
63-
// 'no-nested-ternary': 'off',
64-
// 'no-else-return': 'off',
65-
// 'no-mixed-operators': ['off'],
66-
// 'no-param-reassign': ['warn'],
67-
// 'no-plusplus': 'off',
68-
// 'no-return-assign': 'off',
69-
// 'no-trailing-spaces': 'off',
70-
// 'no-use-before-define': 'off',
71-
// 'no-unneeded-ternary': 'off',
72-
// 'no-mixed-operators': 'off',
73-
// 'no-underscore-dangle': ['error', {'allowAfterThis': true}],
74-
// 'object-curly-spacing': 'off',
75-
// 'operator-linebreak': 'off',
76-
// 'react/forbid-prop-types': 'off',
77-
// 'react/jsx-filename-extension': 'off',
78-
// 'react/jsx-space-before-closing': 'off',
79-
// 'react/jsx-tag-spacing': 'off',
80-
// 'react/prefer-stateless-function': 'off',
81-
// 'react/prop-types': ['error', {ignore: ['children', 'style', 'testID']}],
82-
// 'react/require-default-props': 'off',
83-
// "react/sort-comp": ['warn'],
84-
// 'react/jsx-no-bind': [
85-
// 'warn',
86-
// {
87-
// ignoreRefs: true,
88-
// allowArrowFunctions: false,
89-
// allowBind: false,
90-
// },
91-
// ],
92-
// 'import/prefer-default-export': 'off'
93-
// },
94-
// env: {
95-
// browser: true,
96-
// node: true,
97-
// jest: true,
98-
// },
99-
// settings: {
100-
// 'import/resolver': {
101-
// node: {
102-
// extensions: ['.js', '.ios.js', '.android.js'],
103-
// },
104-
// },
105-
// },
106-
// };

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ UI Toolset & Components Library for React Native
2424
[![NPM Downloads](https://img.shields.io/npm/dm/react-native-ui-lib.svg?style=flat)](https://www.npmjs.com/package/react-native-ui-lib)
2525

2626

27-
Read more in our [Uncyclo](https://github.com/wix/react-native-ui-lib/wiki). <br>
2827
Check out our [Docs](https://wix.github.io/react-native-ui-lib/). <br>
2928
Our [Discord Channel](https://discord.gg/2eW4g6Z)
3029

@@ -35,10 +34,10 @@ Download our Expo demo app <br>
3534

3635
## Installing
3736

38-
See setup instructions [here](https://github.com/wix/react-native-ui-lib/wiki/SETUP).
37+
See setup instructions [here](https://wix.github.io/react-native-ui-lib/getting-started/setup).
3938

4039
#### New Major Version 5.0
41-
See [breaking changes](https://github.com/wix/react-native-ui-lib/wiki/V5-%5BBreaking-Change%5D)
40+
See [breaking changes](https://wix.github.io/react-native-ui-lib/getting-started/v5)
4241

4342
#### For React Native >= 0.60.0
4443
please use `react-native-ui-lib`
@@ -106,7 +105,7 @@ ThemeManager.setComponentTheme('Button', (props, context) => {
106105

107106
### Step 3
108107
Use it all together.
109-
Your configurations will be applied on uilib components so you can use them easily with [modifiers](https://github.com/wix/react-native-ui-lib/wiki/MODIFIERS).
108+
Your configurations will be applied on uilib components so you can use them easily with [modifiers](https://wix.github.io/react-native-ui-lib/foundation/modifiers).
110109

111110
```
112111
// MyScreen.js
@@ -129,3 +128,4 @@ class MyScreen extends Component {
129128
}
130129
}
131130
```
131+

demo/src/screens/SettingsScreen.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ class SettingsScreen extends Component {
3030
};
3131
}
3232

33-
async componentWillMount() {
33+
async UNSAFE_componentWillMount() {
3434
const {screens} = this.state;
3535
const defaultScreenId = await AsyncStorage.getItem('uilib.defaultScreen');
3636
const defaultScreen = _.find(screens, {value: defaultScreenId});
37-
37+
3838
const isRTLString = await AsyncStorage.getItem('uilib.isRTL');
3939
const isRTL = isRTLString === 'true';
40-
40+
4141
this.setState({defaultScreen, isRTL});
4242
}
4343

@@ -63,7 +63,7 @@ class SettingsScreen extends Component {
6363
const {defaultScreen, showRefreshMessage, isRTL, screens} = this.state;
6464
const {extraSettingsUI} = this.props;
6565
const filteredScreens = _.filter(screens, screen => !_.isUndefined(screen.value));
66-
66+
6767
return (
6868
<View flex padding-25 bg-grey80>
6969
<View flex>
@@ -82,7 +82,7 @@ class SettingsScreen extends Component {
8282
<Picker.Item key={screen.value} value={screen}/>
8383
))}
8484
</Picker>
85-
85+
8686
<View style={{borderWidth: 1, borderColor: Colors.dark70, marginTop: 40}}>
8787
<View style={[{padding: 5, borderBottomWidth: 1}, styles.block]}>
8888
<Text text80 dark20>Current layout direction</Text>

demo/src/screens/componentScreens/BadgesScreen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ export default class BadgesScreen extends Component {
141141
Counter Icon Badges
142142
</Text>
143143
<View row paddingH-15>
144-
<Badge marginR-10 withCounterIcon label={'9999'} labelFormatterLimit={3} icon={bell} backgroundColor={Colors.red30} iconStyle={{height: 18, width: 18}}/>
145-
<Badge marginR-10 withCounterIcon label={'4'} icon={bell} backgroundColor={Colors.red30} color={Colors.blue30} iconStyle={{height: 18, width: 18}}/>
144+
<Badge marginR-10 label={'9999'} labelFormatterLimit={3} icon={bell} backgroundColor={Colors.red30}/>
145+
<Badge marginR-10 label={'4'} icon={bell} backgroundColor={Colors.red30}/>
146146
</View>
147147

148148
</ScrollView>

0 commit comments

Comments
 (0)