-
-
Notifications
You must be signed in to change notification settings - Fork 918
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
Fixed opening of links in an external app. #1982
Conversation
bb97ce0
to
410fa45
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is good to me, good fix @mikeller! I tried to do something similar yesterday but I suppose I did something wrong 🤪
@McGiverGim: It was a lot of trial and error. 😅 |
True, we have a lot of tabs and css working for this minimum sizes. Maybe when merged the Cordova PR it adjust better, but for this release I think is better to have it. |
package.json
Outdated
"innerBounds": { | ||
"minWidth": 1024, | ||
"minHeight": 550 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@McGiverGim This innerBounds section not being effective is what I'm talking about with the min_width/min_height suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we must try to open the window from JavaScript and pass them as parameters, similar to the Chrome version.
My PR opened it from JavaScript but I have not passed parameters.
410fa45
to
038a4ec
Compare
@Docteh: Sorry, my bad. I simply copied the window settings from |
@mikeller i tested this and found a bug EDIT: EDIT again: |
Maybe we are using chrome load/save features and not nw features? |
I confirm: betaflight-configurator/src/js/tabs/cli.js Line 142 in 433fe20
and I suppose we must use: https://nwjs.readthedocs.io/en/nw13/References/File%20Dialogs/ Maybe we must make a wrapper similar to the one of Clipboard.js |
038a4ec
to
732cccc
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
From the look of it this goes deeper than what we are doing with the clipboard - without the Chrome filesystem API we'll have to use the node filesystem module, and with this we'll have to move to requiring modules. Confirmed working:
|
confirmed, working again 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it has a lot of sense to disable nw2 for this release.
@MaximeAmadasi: You should probably be aware of this, as it changes some of the underlying code that you are working on as well, so you can rebase on this as soon as it has been merged. |
The cordova PR will make the headerbar a flex container. It's design to work with a miminum window width of 1024px. And when the window width is below 575px, it switchs to the mobile headerbar (which is the same header bar but more compact) |
Fixes #1980.
Open the app Window as a NW.js window, which is what NW.js was designed for.
This will re-enable the
new-win-policy
NW.js event handler that is required to open links in an external app.Also moves the
close
handler intomain.js
, so thateventPage.js
does not need to be used in NW.js any more.