Skip to content
This repository was archived by the owner on Feb 12, 2021. It is now read-only.

Commit b6956a2

Browse files
evertonfragawolovim
authored andcommitted
fix: bump to electron 6 + custom scrollbars (#437)
* chore: updates electron to v6 * fix: custom css scrollbar * chore: update from `setMenu(null)` to `removeMenu()` according to electron v6 breaking changes: https://github.com/electron/electron/blob/master/docs/api/breaking-changes.md#winsetmenunull * chore: * upgrade electron-builder for electron v6 fixes * update from `yarn build` to `yarn dist` according to latest electron-builder docs * chore: bump version to 1.5.2, update author email from [email protected] to [email protected]
1 parent 5369070 commit b6956a2

File tree

7 files changed

+510
-304
lines changed

7 files changed

+510
-304
lines changed

.circleci/config.yml

+6-7
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ aliases:
3030

3131
- &node_installation
3232
run:
33-
name: "Update Node.js and npm if on MacOS"
33+
name: 'Update Node.js and npm if on MacOS'
3434
command: .circleci/install_node.sh
3535

3636
- &upgrade_yarn
3737
run:
38-
name: "Updates yarn"
38+
name: 'Updates yarn'
3939
command: .circleci/upgrade_yarn.sh
4040

4141
# Custom task removes unnecessary build files before uploading release directory
@@ -55,16 +55,15 @@ aliases:
5555
run: yarn test:e2e -s
5656

5757
- &run_script
58-
run:
59-
name: "Building app (deploy if on master)"
60-
command: |
58+
run:
59+
name: 'Building app (deploy if on master)'
60+
command: |
6161
if [[ "${CIRCLE_BRANCH}" == 'master' ]]; then
6262
yarn release --$GRID_ENV;
6363
else
64-
yarn build --$GRID_ENV;
64+
yarn dist --$GRID_ENV;
6565
fi;
6666
67-
6867
- &run_steps
6968
steps:
7069
- checkout

Config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const startConfigEditor = () => {
6060
width: 800,
6161
height: 600
6262
})
63-
win.setMenu(null)
63+
win.removeMenu()
6464
}
6565

6666
module.exports = {

RELEASE.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ If you include a new top-level file to be distributed with the application, it m
88

99
### Testing a release candidate locally
1010

11-
`yarn build` will package up the app, with installers for each OS, and output them into a `release` directory.
11+
`yarn dist` will package up the app, with installers for each OS, and output them into a `release` directory.
1212

13-
Note: on macOS, you'll get a warning if you don't sign the package with an Apple developer certificate, which happens within the `yarn build` step. See this [tutorial](https://9to5mac.com/2016/03/27/how-to-create-free-apple-developer-account-sideload-apps/) if you need help getting set up with a free account. A `Mac Development` certificate will suffice for local testing.
13+
Note: on macOS, you'll get a warning if you don't sign the package with an Apple developer certificate, which happens within the `yarn dist` step. See this [tutorial](https://9to5mac.com/2016/03/27/how-to-create-free-apple-developer-account-sideload-apps/) if you need help getting set up with a free account. A `Mac Development` certificate will suffice for local testing.
1414

1515
### Preparing a release via CI (recommended)
1616

1717
1. **Update the version number** of the release in `package.json`.
1818
1. **Prepare Grid-UI for release** by merging any changes from `dev` into `master`. **Important**: do not squash and merge, as you'll end up with two different branches. Use "Create a merge commit".
19-
1. **Merge the new code into `master`.** CircleCI will build the new installers (`yarn build`) and create a draft release for the new version. **Note:** if the CI builds for a version number that already exists, it will replace the assets for that version.
19+
1. **Merge the new code into `master`.** CircleCI will build the new installers (`yarn dist`) and create a draft release for the new version. **Note:** if the CI builds for a version number that already exists, it will replace the assets for that version.
2020
1. **Write release notes.** The draft can be edited from the GitHub releases page.
2121
1. **Publish the release.** You must manually publish the draft. Within GitHub's UI, edit the draft and select `Publish release`.
2222
1. **Update Github pages** Rebuild github pages to display the latest release (git commit -m "docs: pages rebuild" --allow-empty && git push origin master)

grid_apps/AppManager.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ class AppManager extends EventEmitter {
219219
},
220220
{ scope }
221221
)
222-
mainWindow.setMenu(null)
222+
mainWindow.removeMenu()
223223
/*
224224
mainWindow.webContents.openDevTools({
225225
mode: 'detach'

package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "grid",
3-
"version": "1.5.1",
3+
"version": "1.5.2",
44
"description": "Ethereum Grid",
55
"main": "nano.js",
66
"homepage": "https://github.com/ethereum/grid",
7-
"author": "Grid team <mist@ethereum.org>",
7+
"author": "Grid Team <grid@ethereum.org>",
88
"license": "ISC",
99
"repository": "https://github.com/ethereum/grid",
1010
"scripts": {
@@ -18,8 +18,8 @@
1818
"test:integration:parity": "cross-env NODE_ENV=test mocha ./test/integration/parity.test.js",
1919
"test:integration:geth": "cross-env NODE_ENV=test mocha ./test/integration/geth.test.js",
2020
"prepare-release": "node ./scripts/copyApp.js",
21-
"build:grid": "yarn run prepare-release && build",
22-
"release": "env-cmd .env yarn run build:grid"
21+
"dist": "yarn run prepare-release && electron-builder",
22+
"release": "env-cmd .env yarn run dist"
2323
},
2424
"dependencies": {
2525
"@philipplgh/electron-app-manager": "^0.45.0",
@@ -33,9 +33,9 @@
3333
"ava": "^1.4.1",
3434
"chai": "^4.2.0",
3535
"cross-env": "^5.2.0",
36-
"electron": "5.0.8",
37-
"electron-builder": "20.31.3",
38-
"electron-rebuild": "^1.8.5",
36+
"electron": "6.0.4",
37+
"electron-builder": "21.2.0",
38+
"electron-rebuild": "^1.8.6",
3939
"env-cmd": "^8.0.2",
4040
"husky": "^1.3.1",
4141
"lint-staged": "^8.1.3",

ui/nano.html

+57-9
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
html,
99
body {
1010
padding: 0px;
11-
margin: 0px;
11+
margin: 0px;
1212
background-color: transparent;
13-
overflow-y: scroll;
14-
overflow-x: hidden;
13+
overflow: hidden;
1514
user-select: none;
1615
}
1716
body {
@@ -47,6 +46,8 @@
4746
margin-top: 18px;
4847
z-index: 1;
4948
border-radius: 12px;
49+
display: flex;
50+
flex-direction: column;
5051
}
5152
#app,
5253
.tip::before {
@@ -80,6 +81,51 @@
8081
border: 1px solid #303030;
8182
}
8283

84+
.plugin-container {
85+
overflow-y: auto;
86+
/* windows and linux */
87+
height: calc(100vh - 75px);
88+
}
89+
90+
.is-mac .plugin-container {
91+
height: calc(100vh - 88px);
92+
}
93+
94+
/* Base properties */
95+
.plugin-container::-webkit-scrollbar {
96+
width: 4px;
97+
border-radius: 2px;
98+
}
99+
.plugin-container::-webkit-scrollbar-thumb {
100+
border-radius: 2px;
101+
transition: 200ms all ease-out;
102+
}
103+
104+
/* Scrollbar track and thumb starts transparent */
105+
.plugin-container::-webkit-scrollbar {
106+
background: rgba(1, 1, 1, .1);
107+
}
108+
.plugin-container::-webkit-scrollbar-thumb {
109+
background: rgba(255,255, 255, 0.1);
110+
}
111+
112+
/* Shows scrollbar and thumb when hovering the window */
113+
html:hover .plugin-container::-webkit-scrollbar {
114+
background: rgba(1, 1, 1, .2);
115+
}
116+
html:hover .plugin-container::-webkit-scrollbar-thumb {
117+
/* 30% white */
118+
/* background: #4c4c4c; */
119+
background: linear-gradient(#585858, #424242);
120+
}
121+
122+
html:hover .plugin-container::-webkit-scrollbar-thumb:hover {
123+
background: #727272;
124+
}
125+
html:hover .plugin-container::-webkit-scrollbar-thumb:active {
126+
background: #a7a7a7;
127+
}
128+
83129
/* variant of the tip when the window is docked to the bottom */
84130
body.is-docked-to-bottom #app {
85131
margin-top: 3px;
@@ -365,12 +411,14 @@
365411
></app-item>
366412
<div class="separator"></div>
367413
</div>
368-
<plugin-item
369-
v-if="!showConfig"
370-
v-for="plugin in plugins"
371-
:key="plugin.name"
372-
:plugin="plugin"
373-
></plugin-item>
414+
<div class="plugin-container">
415+
<plugin-item
416+
v-if="!showConfig"
417+
v-for="plugin in plugins"
418+
:key="plugin.name"
419+
:plugin="plugin"
420+
></plugin-item>
421+
</div>
374422
<grid-config v-if="showConfig"></grid-config>
375423
<div id="grid-version"></div>
376424
</div>

0 commit comments

Comments
 (0)