Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
lidord-wix committed Aug 17, 2022
2 parents 38b01fe + 1e4a689 commit fdc0ea3
Show file tree
Hide file tree
Showing 47 changed files with 3,453 additions and 587 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
*Enter description to help the reviewer understand what's the change about...*

## Changelog
*Add a quick message for our users about this change (include Compoennt name, relevant props and general purpose of the PR)*
*Add a quick message for our users about this change (include Component name, relevant props and general purpose of the PR)*
4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
example/
docs/
docuilib/
eslint-rules/
extensions/
node_modules/
.npmignore
.watchmanconfig

src/**/__tests__/*.*

#################
# from .gitignore:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ When contributing to this repository, please first discuss the change you wish t
## Pull Request Process

1. First make sure the environment is working and synced with master. For installation details go [here](https://github.com/wix/react-native-ui-lib/blob/master/markdowns/getting-started/setup.md#demo-app)
2. Before submitting a PR we suggest running `npm run prepush` command that verifies our lint, TS and tests were not broken.
2. Before submitting a PR we suggest running `npm run pre-push` command that verifies our lint, TS and tests were not broken.
3. Please use our PR prefixes accordingly. `fix` for bugfix, `feat` for feature, `infra` for infrastructure changes and `docs` for documentation related changes (e.g `fix/ButtonStyle`, `feat/Avatar_colorProp`)
4. Please don't change our PR template.
- In the Description section add everything that can help the reviewer and the reviewing process, like a description of the issue and the way you decided to go about it, screenshots or gifs, etc.
Expand Down
27 changes: 27 additions & 0 deletions demo/src/demoApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,30 @@ Navigation.events().registerAppLaunchedListener(() => {
registerScreens(Navigation.registerComponent.bind(Navigation));
getDefaultScreenAndStartApp();
});


/* Setting Intl Polyfills
This is due to lack of Intl support in Hermes engine
*/

if (global.HermesInternal) {
if (Constants.isIOS) {

// Polyfills required to use Intl with Hermes engine
require('@formatjs/intl-getcanonicallocales/polyfill').default;
require('@formatjs/intl-locale/polyfill').default;
require('@formatjs/intl-pluralrules/polyfill').default;
require('@formatjs/intl-pluralrules/locale-data/en').default;
require('@formatjs/intl-numberformat/polyfill').default;
require('@formatjs/intl-numberformat/locale-data/en').default;
require('@formatjs/intl-datetimeformat/polyfill').default;
require('@formatjs/intl-datetimeformat/locale-data/en').default;
require('@formatjs/intl-datetimeformat/add-all-tz').default;
} else {
require('@formatjs/intl-getcanonicallocales/polyfill');
require('@formatjs/intl-locale/polyfill');
require('@formatjs/intl-datetimeformat/polyfill');
require('@formatjs/intl-datetimeformat/locale-data/en');
require('@formatjs/intl-datetimeformat/add-all-tz');
}
}
3 changes: 2 additions & 1 deletion demo/src/screens/MainScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import _ from 'lodash';
import React, {Component} from 'react';
import AsyncStorage from '@react-native-community/async-storage';
import PropTypes from 'prop-types';
import {StyleSheet, FlatList, ViewPropTypes} from 'react-native';
import {StyleSheet, FlatList} from 'react-native';
import {ViewPropTypes} from 'deprecated-react-native-prop-types';
import {Navigation} from 'react-native-navigation';
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
import {
Expand Down
15 changes: 15 additions & 0 deletions demo/src/screens/__tests__/AvatarScreen.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react';
import renderer from 'react-test-renderer';

describe('AvatarScreen', () => {
let AvatarScreen;

beforeEach(() => {
AvatarScreen = require('../componentScreens/AvatarsScreen').default;
});

it('renders screen', () => {
const tree = renderer.create(<AvatarScreen/>).toJSON();
expect(tree).toMatchSnapshot();
});
});
Loading

0 comments on commit fdc0ea3

Please sign in to comment.