Skip to content
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
5d4a194
Upgrade joy-election
Aug 14, 2020
ea98e5d
Linter autofix
Aug 14, 2020
2e655f7
Linting: Manual fixes (required refactoring usePromise)
Aug 14, 2020
9fadcaf
Minor UI improvements
Aug 14, 2020
f7d87da
joy-proposals upgrade
Aug 18, 2020
1b64993
Merge branch 'iznik' into joy-proposals-upgrade
Aug 18, 2020
b64b89e
Linter autofix
Aug 18, 2020
75ab8ab
Linter manual fixes (+ some cleanup)
Aug 18, 2020
e19eb61
Fix joy-proposals dependencies and react-dropzone compatibility
Aug 18, 2020
293e95a
Merge branch 'types-augment' into joy-roles-upgrade
Aug 20, 2020
673855f
Add joy-proposals as workspace
Aug 20, 2020
9410544
Merge branch 'joy-proposals-upgrade' into joy-roles-upgrade
Aug 20, 2020
17933d4
Upgrade joy-roles + fix components flow
Aug 21, 2020
c68011f
Lint autofix
Aug 21, 2020
6d90afa
Linter: Manual fixes
Aug 21, 2020
1babd8d
Preparing storybook
Aug 21, 2020
a9e4448
Merge branch 'iznik' into joy-roles-upgrade
Aug 21, 2020
03bd123
joy-media upgrade
Aug 25, 2020
51f382b
Linter autofix
Aug 25, 2020
a09a6c5
Linter: manual fixes
Aug 26, 2020
83a225c
Merge branch 'iznik' into joy-media-upgrade
Aug 26, 2020
ad0377e
Upgrade joy-forum
Aug 27, 2020
00ce336
Linter autofix
Aug 27, 2020
177a0d4
Linter - manual fixes
Aug 27, 2020
5ce833f
Minor style fixes
Aug 27, 2020
c448740
Enable storybook
Aug 27, 2020
b2f8e24
Setting a memo
Aug 27, 2020
ed523bb
Bring back potentially useful JoyEasyForms
Aug 28, 2020
18dba85
Directory cleanup
Aug 28, 2020
76a3cf6
Buttons styles
Aug 28, 2020
66f0b6a
RuntimeUpgrade details type workaround
Aug 28, 2020
0cb5ec9
Minor configuration adjustments
Aug 28, 2020
bbede5c
Member preview ID minor fix
Aug 31, 2020
940657b
Merge branch 'iznik' into pioneer-upgrade-final
Sep 1, 2020
00e09d9
Update yarn.lock
Sep 1, 2020
7a3afd1
Use .keys() to retrieve ids in media transport
Sep 2, 2020
1fa5f3e
Merge branch 'iznik' into pioneer-upgrade-final
Sep 2, 2020
525dc6d
RuntimeUpgrade and Text proposal - get limits from runtime consts
Sep 2, 2020
1d7d84d
createMock and mockRegistry rename
Sep 3, 2020
fad4b2b
Pioneer's tsconfig paths: minor fix
Sep 3, 2020
7edff5e
Always use the same registry instance in Pioneer
Sep 3, 2020
728bb4c
createType('u128') => createType('Balance')
Sep 3, 2020
c8f2d1f
Drop EditForumSudo
Sep 3, 2020
8b2b484
Make Fields.explicit a dropdown
Sep 3, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@
"devops/eslint-config",
"devops/prettier-config",
"pioneer",
"pioneer/packages/apps*",
"pioneer/packages/page*",
"pioneer/packages/react*",
"pioneer/packages/joy-utils",
"pioneer/packages/joy-members",
"pioneer/packages/joy-pages",
"pioneer/packages/*",
"utils/api-examples"
],
"resolutions": {
Expand All @@ -37,7 +32,8 @@
"@polkadot/util-crypto": "3.0.1",
"@polkadot/wasm-crypto": "1.2.1",
"babel-core": "^7.0.0-bridge.0",
"typescript": "^3.9.7"
"typescript": "^3.9.7",
"bn.js": "^5.1.2"
},
"devDependencies": {
"husky": "^4.2.5",
Expand Down
9 changes: 0 additions & 9 deletions pioneer/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
**/build/*
**/coverage/*
**/node_modules/*
packages/old-apps/*
packages/joy-election/*
packages/joy-forum/*
packages/joy-help/*
packages/joy-media/*
packages/joy-proposals/*
packages/joy-roles/*
packages/joy-settings/*
packages/joy-utils-old/*
.eslintrc.js
i18next-scanner.config.js
2 changes: 2 additions & 0 deletions pioneer/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ module.exports = {
'react/jsx-max-props-per-line': 'off',
'sort-destructure-keys/sort-destructure-keys': 'off',
'@typescript-eslint/unbound-method': 'warn', // Doesn't work well with our version of Formik, see: https://github.com/formium/formik/issues/2589
'react-hooks/exhaustive-deps': 'warn', // Causes more issues than it solves currently
'no-void': 'off' // Otherwise we cannot mark unhandles promises
},
// isolate pioneer from monorepo eslint rules
root: true
Expand Down
112 changes: 39 additions & 73 deletions pioneer/.storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,81 +1,47 @@
const path = require('path')
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
module.exports = ({ config }) => {
// Styles (replace the provided rule):
const originalCssRuleIndex = config.module.rules.findIndex(rule => rule.test.source.includes('.css'));
config.module.rules[originalCssRuleIndex] = {
test: /\.(sa|sc|c)ss$/i,
use: [
// Creates `style` nodes from JS strings
'style-loader',
// Translates CSS into CommonJS
'css-loader',
// Compiles Sass to CSS
'sass-loader'
]
};

// Post CSS loader for sources:
config.module.rules.push({
test: /\.css$/,
include: path.resolve(__dirname, '../packages'),
exclude: /(node_modules)/,
use: [
{
loader: require.resolve('postcss-loader'),
options: {
// Set postcss.config.js config path && ctx
config: {
path: '../postcss.config.js',
},
ident: 'postcss',
plugins: () => [
require('precss'),
require('autoprefixer'),
require('postcss-simple-vars'),
require('postcss-nested'),
require('postcss-import'),
require('postcss-clean')(),
require('postcss-flexbugs-fixes')
]
}
}
]
});
// TypeScript loader (via Babel to match polkadot/apps)
config.module.rules.push({
test: /\.(js|ts|tsx)$/,
exclude: /(node_modules)/,
use: [
{
loader: require.resolve('babel-loader'),
options: require('@polkadot/dev/config/babel')
},
],
});
config.resolve.extensions.push('.js', '.ts', '.tsx');

// TypeScript loader (via Babel to match polkadot/apps)
config.module.rules.push({
test: /\.(js|ts|tsx)$/,
exclude: /(node_modules)/,
use: [
{
loader: require.resolve('babel-loader'),
options: require('@polkadot/dev-react/config/babel')
},
],
});
config.resolve.extensions.push('.js', '.ts', '.tsx');
// TSConfig, uses the same file as packages
config.resolve.plugins = config.resolve.plugins || [];
config.resolve.plugins.push(
new TsconfigPathsPlugin({
configFile: path.resolve(__dirname, '../tsconfig.json'),
})
);

// TSConfig, uses the same file as packages
config.resolve.plugins = config.resolve.plugins || [];
config.resolve.plugins.push(
new TsconfigPathsPlugin({
configFile: path.resolve(__dirname, '../tsconfig.json'),
})
);
// Stories parser
config.module.rules.push({
test: /\.stories\.tsx?$/,
loaders: [require.resolve('@storybook/source-loader')],
enforce: 'pre',
});

// Stories parser
config.module.rules.push({
test: /\.stories\.tsx?$/,
loaders: [require.resolve('@storybook/source-loader')],
enforce: 'pre',
});

// CSS preprocessors
config.module.rules.push(
{
test: /\.s[ac]ss$/i,
use: [
// Creates `style` nodes from JS strings
'style-loader',
// Translates CSS into CommonJS
'css-loader',
// Compiles Sass to CSS
'sass-loader',
],
},
{
test: /\.less$/,
loaders: [ 'style-loader', 'css-loader', 'less-loader' ]
}
);

return config;
return config;
};
9 changes: 5 additions & 4 deletions pioneer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"test": "echo \"skipping tests\"",
"vanitygen": "node packages/app-accounts/scripts/vanitygen.js",
"start": "yarn clean && cd packages/apps && webpack --config webpack.config.js",
"generate-schemas": "json2ts -i packages/joy-types/src/schemas/role.schema.json -o packages/joy-types/src/schemas/role.schema.ts",
"build-storybook": "build-storybook -c .storybook",
"storybook": "start-storybook -s ./packages/apps/public -p 3001"
},
Expand All @@ -40,7 +39,7 @@
"@types/chart.js": "^2.9.23",
"@types/file-saver": "^2.0.1",
"@types/i18next": "^13.0.0",
"@types/jest": "^26.0.7",
"@types/jest": "^26.0.10",
"@types/react-beautiful-dnd": "^13.0.0",
"@types/react-copy-to-clipboard": "^4.3.0",
"@types/react-dom": "^16.9.8",
Expand Down Expand Up @@ -74,11 +73,13 @@
"@storybook/addon-actions": "^5.2.5",
"@storybook/addon-console": "^1.2.1",
"@storybook/react": "^5.2.5",
"json-schema-to-typescript": "^7.1.0",
"storybook-react-router": "^1.0.8",
"typescript": "^3.9.7",
"eslint-plugin-header": "^3.0.0",
"eslint-plugin-sort-destructure-keys": "^1.3.5"
"eslint-plugin-sort-destructure-keys": "^1.3.5",
"jest": "^26.4.1",
"ts-jest": "^26.2.0",
"tsconfig-paths-webpack-plugin": "^3.2.0"
},
"dependencies": {
"@types/lodash": "^4.14.138",
Expand Down
180 changes: 90 additions & 90 deletions pioneer/packages/apps-config/src/settings/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,94 +33,94 @@ function createLive (t: TFunction): LinkOption[] {
info: 'joystream',
text: t<string>('rpc.joystream', 'Joystream (Current Testnet, hosted by Jsgenesis)', { ns: 'apps-config' }),
value: 'wss://rome-rpc-endpoint.joystream.org:9944'
},
{
dnslink: 'polkadot',
info: 'polkadot',
text: t<string>('rpc.polkadot.parity', 'Polkadot (Live, hosted by Parity)', { ns: 'apps-config' }),
value: 'wss://rpc.polkadot.io'
},
{
dnslink: 'polkadot',
info: 'polkadot',
text: t<string>('rpc.polkadot.w3f', 'Polkadot (Live, hosted by Web3 Foundation)', { ns: 'apps-config' }),
value: 'wss://cc1-1.polkadot.network'
},
{
dnslink: 'kusama',
info: 'kusama',
text: t<string>('rpc.kusama.parity', 'Kusama (Polkadot Canary, hosted by Parity)', { ns: 'apps-config' }),
value: 'wss://kusama-rpc.polkadot.io/'
},
{
dnslink: 'kusama',
info: 'kusama',
text: t<string>('rpc.kusama.w3f', 'Kusama (Polkadot Canary, hosted by Web3 Foundation)', { ns: 'apps-config' }),
value: 'wss://cc3-5.kusama.network/'
},
{
dnslink: 'kusama',
info: 'kusama',
text: t<string>('rpc.kusama.ava', 'Kusama (Polkadot Canary, user-run public nodes; see https://status.cloud.ava.do/)', { ns: 'apps-config' }),
value: 'wss://kusama.polkadot.cloud.ava.do/'
},
{
dnslink: 'centrifuge',
info: 'centrifuge',
text: t<string>('rpc.centrifuge', 'Centrifuge (Mainnet, hosted by Centrifuge)', { ns: 'apps-config' }),
value: 'wss://fullnode.centrifuge.io'
},
{
dnslink: 'edgeware',
info: 'edgeware',
text: t<string>('rpc.edgeware', 'Edgeware (Mainnet, hosted by Commonwealth Labs)', { ns: 'apps-config' }),
value: 'wss://mainnet1.edgewa.re'
},
{
dnslink: 'kulupu',
info: 'substrate',
text: t<string>('rpc.kulupu', 'Kulupu (Kulupu Mainnet, hosted by Kulupu)', { ns: 'apps-config' }),
value: 'wss://rpc.kulupu.network/ws'
}
// {
// dnslink: 'polkadot',
// info: 'polkadot',
// text: t<string>('rpc.polkadot.parity', 'Polkadot (Live, hosted by Parity)', { ns: 'apps-config' }),
// value: 'wss://rpc.polkadot.io'
// },
// {
// dnslink: 'polkadot',
// info: 'polkadot',
// text: t<string>('rpc.polkadot.w3f', 'Polkadot (Live, hosted by Web3 Foundation)', { ns: 'apps-config' }),
// value: 'wss://cc1-1.polkadot.network'
// },
// {
// dnslink: 'kusama',
// info: 'kusama',
// text: t<string>('rpc.kusama.parity', 'Kusama (Polkadot Canary, hosted by Parity)', { ns: 'apps-config' }),
// value: 'wss://kusama-rpc.polkadot.io/'
// },
// {
// dnslink: 'kusama',
// info: 'kusama',
// text: t<string>('rpc.kusama.w3f', 'Kusama (Polkadot Canary, hosted by Web3 Foundation)', { ns: 'apps-config' }),
// value: 'wss://cc3-5.kusama.network/'
// },
// {
// dnslink: 'kusama',
// info: 'kusama',
// text: t<string>('rpc.kusama.ava', 'Kusama (Polkadot Canary, user-run public nodes; see https://status.cloud.ava.do/)', { ns: 'apps-config' }),
// value: 'wss://kusama.polkadot.cloud.ava.do/'
// },
// {
// dnslink: 'centrifuge',
// info: 'centrifuge',
// text: t<string>('rpc.centrifuge', 'Centrifuge (Mainnet, hosted by Centrifuge)', { ns: 'apps-config' }),
// value: 'wss://fullnode.centrifuge.io'
// },
// {
// dnslink: 'edgeware',
// info: 'edgeware',
// text: t<string>('rpc.edgeware', 'Edgeware (Mainnet, hosted by Commonwealth Labs)', { ns: 'apps-config' }),
// value: 'wss://mainnet1.edgewa.re'
// },
// {
// dnslink: 'kulupu',
// info: 'substrate',
// text: t<string>('rpc.kulupu', 'Kulupu (Kulupu Mainnet, hosted by Kulupu)', { ns: 'apps-config' }),
// value: 'wss://rpc.kulupu.network/ws'
// }
];
}

function createTest (t: TFunction): LinkOption[] {
return [
{
dnslink: 'westend',
info: 'westend',
text: t<string>('rpc.westend', 'Westend (Polkadot Testnet, hosted by Parity)', { ns: 'apps-config' }),
value: 'wss://westend-rpc.polkadot.io'
},
{
info: 'acala',
text: t<string>('rpc.mandala', 'Mandala (Acala Testnet, hosted by Acala)', { ns: 'apps-config' }),
value: 'wss://node-6684611762228215808.jm.onfinality.io/ws'
},
{
info: 'edgeware',
text: t<string>('rpc.berlin', 'Berlin (Edgeware Testnet, hosted by Commonwealth Labs)', { ns: 'apps-config' }),
value: 'wss://berlin1.edgewa.re'
},
{
info: 'substrate',
text: t<string>('rpc.flamingfir', 'Flaming Fir (Substrate Testnet, hosted by Parity)', { ns: 'apps-config' }),
value: 'wss://substrate-rpc.parity.io/'
},
{
info: 'nodle',
text: t<string>('rpc.arcadia', 'Arcadia (Nodle Testnet, hosted by Nodle)', { ns: 'apps-config' }),
value: 'wss://arcadia1.nodleprotocol.io/'
},
{
info: 'datahighway',
isDisabled: true,
text: t<string>('rpc.datahighway.harbour', 'Harbour (DataHighway Testnet, hosted by MXC)', { ns: 'apps-config' }),
value: 'wss://testnet-harbour.datahighway.com'
}
];
}
// function createTest (t: TFunction): LinkOption[] {
// return [
// {
// dnslink: 'westend',
// info: 'westend',
// text: t<string>('rpc.westend', 'Westend (Polkadot Testnet, hosted by Parity)', { ns: 'apps-config' }),
// value: 'wss://westend-rpc.polkadot.io'
// },
// {
// info: 'acala',
// text: t<string>('rpc.mandala', 'Mandala (Acala Testnet, hosted by Acala)', { ns: 'apps-config' }),
// value: 'wss://node-6684611762228215808.jm.onfinality.io/ws'
// },
// {
// info: 'edgeware',
// text: t<string>('rpc.berlin', 'Berlin (Edgeware Testnet, hosted by Commonwealth Labs)', { ns: 'apps-config' }),
// value: 'wss://berlin1.edgewa.re'
// },
// {
// info: 'substrate',
// text: t<string>('rpc.flamingfir', 'Flaming Fir (Substrate Testnet, hosted by Parity)', { ns: 'apps-config' }),
// value: 'wss://substrate-rpc.parity.io/'
// },
// {
// info: 'nodle',
// text: t<string>('rpc.arcadia', 'Arcadia (Nodle Testnet, hosted by Nodle)', { ns: 'apps-config' }),
// value: 'wss://arcadia1.nodleprotocol.io/'
// },
// {
// info: 'datahighway',
// isDisabled: true,
// text: t<string>('rpc.datahighway.harbour', 'Harbour (DataHighway Testnet, hosted by MXC)', { ns: 'apps-config' }),
// value: 'wss://testnet-harbour.datahighway.com'
// }
// ];
// }

function createCustom (t: TFunction): LinkOption[] {
const WS_URL = (
Expand Down Expand Up @@ -158,12 +158,12 @@ export default function create (t: TFunction): LinkOption[] {
value: ''
},
...createLive(t),
{
isHeader: true,
text: t<string>('rpc.header.test', 'Test networks', { ns: 'apps-config' }),
value: ''
},
...createTest(t),
// {
// isHeader: true,
// text: t<string>('rpc.header.test', 'Test networks', { ns: 'apps-config' }),
// value: ''
// },
// ...createTest(t),
{
isHeader: true,
text: t<string>('rpc.header.dev', 'Development', { ns: 'apps-config' }),
Expand Down
Loading