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

window state manager #608

Merged
merged 3 commits into from
Apr 22, 2021

Conversation

stweyel
Copy link
Contributor

@stweyel stweyel commented Mar 31, 2021

#512
Merged electron-window-state-manager package.
Providing store/restore of window position.

stweyel and others added 2 commits March 31, 2021 12:18
Merged electron-window-state-manager.
Providing store/restore of window position.
@angle943
Copy link
Contributor

angle943 commented Apr 1, 2021

@stweyel i've adjusted the window, then closed the app by clicking "x", then reopened it agian, but it doesn't seem to save the window state?

@stweyel
Copy link
Contributor Author

stweyel commented Apr 1, 2021

@stweyel i've adjusted the window, then closed the app by clicking "x", then reopened it agian, but it doesn't seem to save the window state?

hmm... that's strange. Working fine here on MacOS and Windows10. What are your system specs?
EDIT: @angle943 Could you check if you got a windowStates.json in your AppData/Roaming ?
EDIT: Meanwhile tested also on Windows8. All good

@angle943
Copy link
Contributor

@stweyel what is the filepath of where the json file should be located on a mac?

@stweyel
Copy link
Contributor Author

stweyel commented Apr 11, 2021

@stweyel what is the filepath of where the json file should be located on a mac?

@angle943 at first look it should be in Library/Application Support/. But it's not there (at least i can't see it :-) ). I'll check where else it could be saved.
However, if you tested on mac how did you get your window to reopen after closing it with 'x' without quitting the app?
Still have no clue why it fails on your side. Have it running on three different MacOS

@stweyel
Copy link
Contributor Author

stweyel commented Apr 11, 2021

@angle943 found it! It's in the users library folder:
/Users/.../Library/Application Support/TNB Account Manager/windowStates.json

@angle943
Copy link
Contributor

nope, i don't see windowStates.json there :/ I have MacOS Big Sur

@stweyel
Copy link
Contributor Author

stweyel commented Apr 11, 2021

Then for now i've no idea what's going on. It's perfectly running here on BigSur and i can't reproduce the fail. Well in fact there isn't very much what could fail. Probably also no write permission issue because without that the account manager doesn't even start.
Maybe you can check if the dependencies were properly installed (electron-window-state-manager, app-root-path)?
Another thing to try is to manually put the attached file (dezip first!) into the TNB Account Manager Application Support folder and see if it gets loaded...
However i'll investigate further.., Maybe @tomijaga could give it a try on his mac?

windowStates.json.zip

@angle943
Copy link
Contributor

@thesanjeevsharma @jamessspanggg @RajputUsman could you give this a try?

@stweyel
Copy link
Contributor Author

stweyel commented Apr 17, 2021

@angle943 since nobody replied...
Maybe just a last try. If you don't mind you could run the latest app build from me. I uploaded the alpha.45 dmg including my PR. If that would work on your side maybe something in the PR is corrupt (i just noticed the 'electron-window-state-manager.d.ts' is empty) and i'd open a new one.
Here the link to my build: https://www.dropbox.com/s/1zyjk2vhwn4egcd/TNB%20Account%20Manager-1.0.0-alpha.45-mac.dmg?dl=0

@jamessspanggg
Copy link
Contributor

@angle943 since nobody replied...
Maybe just a last try. If you don't mind you could run the latest app build from me. I uploaded the alpha.45 dmg including my PR. If that would work on your side maybe something in the PR is corrupt (i just noticed the 'electron-window-state-manager.d.ts' is empty) and i'd open a new one.
Here the link to my build: https://www.dropbox.com/s/1zyjk2vhwn4egcd/TNB%20Account%20Manager-1.0.0-alpha.45-mac.dmg?dl=0

Sorry for the later response! I missed it. Yes the app you provided is working fine with the window size and position restored 👍🏻 using macOS Big Sur 11.2.3

@@ -123,6 +123,7 @@
"dependencies": {
"@thenewboston/ui": "^0.1.5",
"@thenewboston/utils": "^1.0.0",
"app-root-path": "3.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is app-root-path required? it seems like it is under dependency of electron-window-state-manager

Screen Shot 2021-04-18 at 9 10 55 AM

Copy link
Contributor Author

@stweyel stweyel Apr 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes app-root-path is needed by window-state-manager. Though it's installed as an own dependency i got errors and therefore added it to the main tree.

@stweyel
Copy link
Contributor Author

stweyel commented Apr 18, 2021

Sorry for the later response! I missed it. Yes the app you provided is working fine with the window size and position restored 👍🏻 using macOS Big Sur 11.2.3

No prob. Glad it's working! Shall i open a new PR?

@jamessspanggg
Copy link
Contributor

No prob. Glad it's working! Shall i open a new PR?

Why so? I think we can keep the PR

content was missing in initial PR
@angle943
Copy link
Contributor

ok we'll merge it in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants