Don't pass UI_MODE/UI_THEME via env (#769)
This commit is contained in:
parent
ea9cacc175
commit
449310e0c9
45
CONTRIBUTING.md
Normal file
45
CONTRIBUTING.md
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Contributing
|
||||||
|
|
||||||
|
## What?
|
||||||
|
|
||||||
|
Individuals making significant and valuable contributions are given commit-access to a project to contribute as they see fit.
|
||||||
|
A project is more like an open wiki than a standard guarded open source project.
|
||||||
|
|
||||||
|
## Rules
|
||||||
|
|
||||||
|
There are a few basic ground-rules for contributors (including the maintainer(s) of the project):
|
||||||
|
|
||||||
|
1. **No `--force` pushes** or modifying the Git history in any way. If you need to rebase, ensure you do it in your own repo.
|
||||||
|
2. **Non-master branches**, prefixed with a short name moniker (e.g. `<initials>-<feature>`) must be used for ongoing work.
|
||||||
|
3. **All modifications** must be made in a **pull-request** to solicit feedback from other contributors.
|
||||||
|
4. A pull-request *must not be merged until CI* has finished successfully.
|
||||||
|
|
||||||
|
#### Merging pull requests once CI is successful:
|
||||||
|
- A pull request with no large change to logic that is an urgent fix may be merged after a non-author contributor has reviewed it well.
|
||||||
|
- No PR should be merged until all reviews' comments are addressed.
|
||||||
|
|
||||||
|
#### Reviewing pull requests:
|
||||||
|
When reviewing a pull request, the end-goal is to suggest useful changes to the author. Reviews should finish with approval unless there are issues that would result in:
|
||||||
|
|
||||||
|
- Buggy behaviour.
|
||||||
|
- Undue maintenance burden.
|
||||||
|
- Breaking with house coding style.
|
||||||
|
- Pessimisation (i.e. reduction of speed as measured in the projects benchmarks).
|
||||||
|
- Feature reduction (i.e. it removes some aspect of functionality that a significant minority of users rely on).
|
||||||
|
- Uselessness (i.e. it does not strictly add a feature or fix a known issue).
|
||||||
|
|
||||||
|
#### Reviews may not be used as an effective veto for a PR because:
|
||||||
|
- There exists a somewhat cleaner/better/faster way of accomplishing the same feature/fix.
|
||||||
|
- It does not fit well with some other contributors' longer-term vision for the project.
|
||||||
|
|
||||||
|
## Releases
|
||||||
|
|
||||||
|
Declaring formal releases remains the prerogative of the project maintainer(s).
|
||||||
|
|
||||||
|
## Changes to this arrangement
|
||||||
|
|
||||||
|
This is an experiment and feedback is welcome! This document may also be subject to pull-requests or changes by contributors where you believe you have something valuable to add or change.
|
||||||
|
|
||||||
|
## Heritage
|
||||||
|
|
||||||
|
These contributing guidelines are modified from the "OPEN Open Source Project" guidelines for the Level project: [https://github.com/Level/community/blob/master/CONTRIBUTING.md](https://github.com/Level/community/blob/master/CONTRIBUTING.md)
|
||||||
@ -52,11 +52,6 @@ To get started -
|
|||||||
5. Ready! Now you can launch the UI (assuming you have a local Polkadot Node running), via `yarn run start`
|
5. Ready! Now you can launch the UI (assuming you have a local Polkadot Node running), via `yarn run start`
|
||||||
6. Access the UI via [http://localhost:3000](http://localhost:3000)
|
6. Access the UI via [http://localhost:3000](http://localhost:3000)
|
||||||
|
|
||||||
There are additional environment UI flags that change both the theme and mode -
|
|
||||||
|
|
||||||
- Running with `UI_MODE=light|full` switches from a full (the default) to a light mode interface that only has specific applications highlighted.
|
|
||||||
- Running with `UI_THEME=substrate|polkadot` switches from a Polkadot theme (the default) to a Substrate-branded UI
|
|
||||||
|
|
||||||
## I want to code around
|
## I want to code around
|
||||||
|
|
||||||
There is a base template availble [app-123code](packages/app-123code/) that acts as a simple starting point for adding additional apps to the UI. Alternatively if you just want some place where you can write some code, it does the trick.
|
There is a base template availble [app-123code](packages/app-123code/) that acts as a simple starting point for adding additional apps to the UI. Alternatively if you just want some place where you can write some code, it does the trick.
|
||||||
|
|||||||
@ -28,8 +28,8 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.3.4",
|
"@babel/core": "^7.3.4",
|
||||||
"@babel/runtime": "^7.3.4",
|
"@babel/runtime": "^7.3.4",
|
||||||
"@polkadot/dev-react": "^0.25.7",
|
"@polkadot/dev-react": "^0.25.11",
|
||||||
"@polkadot/ts": "^0.1.53",
|
"@polkadot/ts": "^0.1.54",
|
||||||
"autoprefixer": "^9.4.9",
|
"autoprefixer": "^9.4.9",
|
||||||
"empty": "^0.10.1",
|
"empty": "^0.10.1",
|
||||||
"gh-pages": "^2.0.1",
|
"gh-pages": "^2.0.1",
|
||||||
|
|||||||
@ -189,17 +189,13 @@ function createWebpack ({ alias = {}, context, name = 'index' }) {
|
|||||||
'process.env': {
|
'process.env': {
|
||||||
NODE_ENV: JSON.stringify(ENV),
|
NODE_ENV: JSON.stringify(ENV),
|
||||||
VERSION: JSON.stringify(pkgJson.version),
|
VERSION: JSON.stringify(pkgJson.version),
|
||||||
UI_MODE: JSON.stringify(process.env.UI_MODE || 'full'),
|
|
||||||
UI_THEME: JSON.stringify(process.env.UI_THEME || DEFAULT_THEME),
|
|
||||||
WS_URL: JSON.stringify(process.env.WS_URL)
|
WS_URL: JSON.stringify(process.env.WS_URL)
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
inject: true,
|
inject: true,
|
||||||
template: path.join(context, `${hasPublic ? 'public/' : ''}${name}.html`),
|
template: path.join(context, `${hasPublic ? 'public/' : ''}${name}.html`),
|
||||||
PAGE_TITLE: process.env.UI_THEME === 'substrate'
|
PAGE_TITLE: 'Polkadot/Substrate Portal'
|
||||||
? 'Substrate Apps Portal'
|
|
||||||
: 'Polkadot Apps Portal'
|
|
||||||
}),
|
}),
|
||||||
new webpack.optimize.SplitChunksPlugin(),
|
new webpack.optimize.SplitChunksPlugin(),
|
||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
|
|||||||
26
yarn.lock
26
yarn.lock
@ -1496,15 +1496,15 @@
|
|||||||
"@polkadot/types" "^0.45.18"
|
"@polkadot/types" "^0.45.18"
|
||||||
"@polkadot/util-crypto" "^0.34.33"
|
"@polkadot/util-crypto" "^0.34.33"
|
||||||
|
|
||||||
"@polkadot/dev-react@^0.25.7":
|
"@polkadot/dev-react@^0.25.11":
|
||||||
version "0.25.7"
|
version "0.25.11"
|
||||||
resolved "https://registry.yarnpkg.com/@polkadot/dev-react/-/dev-react-0.25.7.tgz#df7fd678dab0cf193e105b70b40c4f171a41df4c"
|
resolved "https://registry.yarnpkg.com/@polkadot/dev-react/-/dev-react-0.25.11.tgz#d1865df46d58504f9f6b9e260323d5e6eb37c47f"
|
||||||
integrity sha512-ncMMd5rHZ6h8xhaR5W4PliH7GA34vU45oRzh9SqWGLopKnA6CpNHP3w7YQTqIjvr6H3SwgMv/hOtLikV15+8Kg==
|
integrity sha512-tebx8qumiwAalOt4GKzH2yz1guDmCNZBGQw7YxEdheuYD6LVEMw/V1zyZdIhUQ1EHjxlwqepZj6raA32ZAWhAQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/core" "^7.3.4"
|
"@babel/core" "^7.3.4"
|
||||||
"@babel/plugin-syntax-dynamic-import" "^7.2.0"
|
"@babel/plugin-syntax-dynamic-import" "^7.2.0"
|
||||||
"@babel/preset-react" "^7.0.0"
|
"@babel/preset-react" "^7.0.0"
|
||||||
"@polkadot/dev" "^0.25.7"
|
"@polkadot/dev" "^0.25.11"
|
||||||
"@types/react" "^16.8.5"
|
"@types/react" "^16.8.5"
|
||||||
"@types/react-dom" "^16.8.2"
|
"@types/react-dom" "^16.8.2"
|
||||||
"@types/styled-components" "4.1.8"
|
"@types/styled-components" "4.1.8"
|
||||||
@ -1532,10 +1532,10 @@
|
|||||||
webpack-plugin-serve "^0.7.2"
|
webpack-plugin-serve "^0.7.2"
|
||||||
worker-loader "^2.0.0"
|
worker-loader "^2.0.0"
|
||||||
|
|
||||||
"@polkadot/dev@^0.25.7":
|
"@polkadot/dev@^0.25.11":
|
||||||
version "0.25.7"
|
version "0.25.11"
|
||||||
resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.25.7.tgz#2344d671896372c606294edf7adced50d13d3b83"
|
resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.25.11.tgz#73235add1eb0c86257ed8f1ab60e213be79a93f1"
|
||||||
integrity sha512-6PTUO7qjpaMy0HT4+jTJyVS2DM925is5+dV9Q8I6vkAqJHiBay6Wz/P1XXnd9IHD2d1qaTqTf+bowO15QTO6VA==
|
integrity sha512-Fs9VFlwwZVKtk+J9kjNG0lWDpTYvcVXOksMXJ1lQLnf2YhqFILsq8kETfoXWbDbusgcok69hoA4YcNtwiEAGWg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/cli" "^7.2.3"
|
"@babel/cli" "^7.2.3"
|
||||||
"@babel/core" "^7.3.4"
|
"@babel/core" "^7.3.4"
|
||||||
@ -1650,10 +1650,10 @@
|
|||||||
"@polkadot/util" "^0.34.33"
|
"@polkadot/util" "^0.34.33"
|
||||||
"@polkadot/util-crypto" "^0.34.33"
|
"@polkadot/util-crypto" "^0.34.33"
|
||||||
|
|
||||||
"@polkadot/ts@^0.1.53":
|
"@polkadot/ts@^0.1.54":
|
||||||
version "0.1.53"
|
version "0.1.54"
|
||||||
resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.53.tgz#6fae961bed882b085c5b8940ef2d482d3dd36292"
|
resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.54.tgz#cac6a12809f886fb7698bfbf3ffb27b793f7745d"
|
||||||
integrity sha512-TOsr0OD191SEchYKBi7v+rFrnRtjOAVaY6U4fq75uhh/Al9wvs0pUt2QxhzAgTBq+BrKk4gGvaSyiciR+HoDCg==
|
integrity sha512-wYiJZ62v0IyG7jO6nQ7XsxHiYJH1i0x3BuHPiV/LiAq4QSX0LVv0q3SbN7hwrEDb4kmHtHkKpF9iXV8fKLFH2w==
|
||||||
|
|
||||||
"@polkadot/types@^0.45.18":
|
"@polkadot/types@^0.45.18":
|
||||||
version "0.45.18"
|
version "0.45.18"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user