Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
node-version: [16.x]

steps:
- uses: browser-actions/setup-chrome@latest
- run: chrome --version

- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ data/
current/
difference/
storybook-static/
reg-diff/
reg.json
report.html
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
install:
npx lerna bootstrap --hoist

lint:
test:
npx lerna run test
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
52 changes: 36 additions & 16 deletions apps/client/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,54 @@
const path = require('path');
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');

module.exports = {
stories: [
"../src/**/*.stories.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)"
'../src/**/*.stories.mdx',
'../src/**/*.stories.@(js|jsx|ts|tsx)'
],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-a11y',
'storybook-react-intl',
],
framework: "@storybook/react",
framework: '@storybook/react',
core: {
builder: "@storybook/builder-webpack5"
builder: '@storybook/builder-webpack5'
},
features: {
interactionsDebugger: true,
},
webpackFinal: async (config) => {
config.resolve.plugins = [
...(config.resolve.plugins || []),
new TsconfigPathsPlugin({
extensions: config.resolve.extensions,
}),
];
config.resolve.alias = {
...config.resolve.alias,
"@": path.resolve(__dirname, "../src/"),
};
config.resolve.extensions.push(".ts", ".tsx");

config.module.rules.push({
test: /\.scss$/,
use: ['style-loader', 'css-loader', 'sass-loader'],
test: /\.module\.s(a|c)ss$/,
use: ['style-loader', {
loader: 'css-loader',
options: {
modules: {
localIdentName: '[local]_[hash:base64:5]',
},
},
}, 'sass-loader'],
include: path.resolve(__dirname, '../'),
});

config.module.rules.push({
test: /\.s(a|c)ss$/,
exclude: /\.module.(s(a|c)ss)$/,
use: [
'style-loader',
'css-loader',
'sass-loader',
],
});

return config;
},
}
27 changes: 26 additions & 1 deletion apps/client/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import '!style-loader!css-loader!sass-loader!../src/styles/main.scss';
import '@/styles/main.scss';
import { LOCALES } from '@/i18n/locales';
import reactIntl from './reactIntl';

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
Expand All @@ -7,5 +9,28 @@ export const parameters = {
color: /(background|color)$/i,
date: /Date$/,
},
},
reactIntl,
locale: reactIntl.defaultLocale,
locales: {
[LOCALES.ENGLISH]: {title: "English", left: '🇬🇧'},
[LOCALES.RUSSIAN]: {title: "Русский", left: '🇷🇺'},
},
backgrounds: {
default: 'light',
values: [
{
name: 'light',
value: '#ffffff',
},
{
name: 'dark',
value: '#212529',
},
{
name: 'gray',
value: '#6c757d',
},
],
},
}
13 changes: 13 additions & 0 deletions apps/client/.storybook/reactIntl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { LOCALES } from '../src/i18n/locales';
import { messages } from '../src/i18n/messages';

const locales = [LOCALES.ENGLISH, LOCALES.RUSSIAN];

const reactIntl = {
defaultLocale: LOCALES.ENGLISH,
locales,
messages,
formats: {},
};

export default reactIntl;
6 changes: 4 additions & 2 deletions apps/client/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const tsconfig = require('./tsconfig.json');
const moduleNameMapper = require('tsconfig-paths-jest')(tsconfig);

/** @type {import('jest').Config} */
module.exports = {
Expand All @@ -15,5 +14,8 @@ module.exports = {
transform: {
'^.+\\.[t|j]sx?$': 'babel-jest',
},
moduleNameMapper,
moduleNameMapper: {
...require('tsconfig-paths-jest')(tsconfig),
'.+\\.(css|sass|scss)$': 'identity-obj-proxy',
},
};
11 changes: 9 additions & 2 deletions apps/client/loki.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
module.exports = {
diffingEngine: 'pixelmatch',
chromeSelector: '#root > *',
configurations: {
'chrome.laptop': {
target: 'chrome.docker',
target: 'chrome.app',
width: 1366,
height: 768,
deviceScaleFactor: 1,
mobile: false,
},
'chrome.iphone7': {
target: 'chrome.docker',
target: 'chrome.app',
preset: 'iPhone 7',
},
},
fileNameFormatter: ({ configurationName, kind, story }) => {
const formattedStoryName = story.replaceAll(' ', '_').toLowerCase();

return `${configurationName.toLowerCase()}/${kind}/${formattedStoryName}`;
},
};
Loading