Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remember and Recall window layout/position state #3622

Merged

Conversation

@t3chguy
Copy link
Collaborator

t3chguy commented Apr 12, 2017

for #2959

Signed-off-by: Michael Telatynski 7t3chguy@gmail.com

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
@t3chguy t3chguy changed the title Remember and Recall window layout so that position+size persist Remember and Recall window layout/position state Apr 12, 2017
Improve dependency management for Electron main process deps

Dependencies in /electron/package.json will be installed through a script in /package.json and will be bundled via electron-builder

Does not affect standard webapp whatsoever

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
@@ -158,10 +160,10 @@
},
"win": {
"target": "squirrel"
},
"directories": {

This comment has been minimized.

Copy link
@ara4n

ara4n Apr 22, 2017

Member

hm, how come directories is moved up here?

This comment has been minimized.

Copy link
@t3chguy

t3chguy Apr 22, 2017

Author Collaborator
C:\Users\t3chg\WebStormProjects\riot-web>node_modules\.bin\build
⚠️  "directories" in the root is deprecated, please specify in the "build"
@@ -36,6 +36,7 @@
"build": "node scripts/babelcheck.js && npm run build:res && npm run build:bundle",
"build:dev": "node scripts/babelcheck.js && npm run build:res && npm run build:bundle:dev",
"dist": "scripts/package.sh",
"postinstall": "cd electron && npm i",

This comment has been minimized.

Copy link
@ara4n

ara4n Apr 22, 2017

Member

this looks weird - we surely don't want to try to install all the electron crap every time someone runs npm i on riot-web?

This comment has been minimized.

Copy link
@t3chguy

t3chguy Apr 22, 2017

Author Collaborator

Currently npm i is only useful because it triggers prepublish, in a later version of npm this functionality will no longer work as prepublish will only be hit on npm publish. I guess the better alternative to installing the electron deps here is to define scripts for electron-builder which run npm i on the electron deps first.

@ara4n

This comment has been minimized.

Copy link
Member

ara4n commented Apr 22, 2017

looks plausible other than two questions - over to you. thanks!

@ara4n

This comment has been minimized.

Copy link
Member

ara4n commented Apr 22, 2017

…uild

so no point making it take longer than it has to for the devs only testing
webapp

build:electron - hook npm run install:electron
install:electron - run npm i for the electron deps
electron - start the app locally for testing

add to README

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
@t3chguy

This comment has been minimized.

Copy link
Collaborator Author

t3chguy commented Apr 27, 2017

Back to you :)

README.md Outdated
@@ -135,6 +135,7 @@ To run as a desktop app:

```
npm install electron
npm run install:electron
node_modules/.bin/electron .

This comment has been minimized.

Copy link
@ara4n

ara4n Apr 27, 2017

Member

this feels fiddly and likely for folks to screw up. can't we replace all 3 lines with just npm run electron?

This comment has been minimized.

Copy link
@t3chguy

t3chguy Apr 27, 2017

Author Collaborator

I'm not sure why electron isn't a devDependency? That'd get rid of line #1
the last two could be replaced with npm run electron which has already been defined

This comment has been minimized.

Copy link
@t3chguy

t3chguy Apr 27, 2017

Author Collaborator

I feel wrong putting npm i electron into an npm script, just feels really redundant, but if the majority agree then thats obviously the way to go

This comment has been minimized.

Copy link
@dbkr

dbkr Apr 27, 2017

Member

Sounds like the correct way of doing this is with the electron-builder install-app-deps in postinstall (https://github.com/electron-userland/electron-builder/wiki/Two-package.json-Structure) (assuming the 2 package.json structure is what you were going for here)

This comment has been minimized.

Copy link
@t3chguy

t3chguy Apr 27, 2017

Author Collaborator

@dbkr Matthew had a complaint when I did had linked installing these deps to postinstall: #3622 (comment)

@ara4n

This comment has been minimized.

Copy link
Member

ara4n commented Apr 27, 2017

@dbkr this looks okay to me, but i think i'd like a 2nd opinion as it's more your domain

@ara4n

This comment has been minimized.

Copy link
Member

ara4n commented Apr 27, 2017

@t3chguy there's one new comment here.

@ara4n ara4n assigned dbkr and unassigned t3chguy Apr 27, 2017
Copy link
Member

dbkr left a comment

I was expecting this to be using the electron builder 2 package.json format, but you haven't specified the app directory (and it's not the default 'app' so it doesn't look like this is what's happening, which is surprising. Is there a reason for this?

README.md Outdated
@@ -135,6 +135,7 @@ To run as a desktop app:

```
npm install electron
npm run install:electron
node_modules/.bin/electron .

This comment has been minimized.

Copy link
@dbkr

dbkr Apr 27, 2017

Member

Sounds like the correct way of doing this is with the electron-builder install-app-deps in postinstall (https://github.com/electron-userland/electron-builder/wiki/Two-package.json-Structure) (assuming the 2 package.json structure is what you were going for here)

@dbkr dbkr assigned t3chguy and unassigned dbkr Apr 27, 2017
t3chguy added 6 commits May 5, 2017
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
@dbkr
dbkr approved these changes May 5, 2017
Copy link
Member

dbkr left a comment

OK, I think this looks good - let's give it a go.

@dbkr dbkr merged commit 2c36506 into vector-im:develop May 5, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.