-
Notifications
You must be signed in to change notification settings - Fork 46
Conversation
Mac apps do not have focus when they first launch. Windows apps do have focus on launch.
// And we set to false because Windows 10 by default makes a separate sound | ||
sound: false, | ||
// wait with callback until user action is taken on notification | ||
wait: false |
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.
As you are trying to listen for click
activation on notification, you'll have to wait for the response from the notification. Without waiting you can't get info on if the user clicks or not. So this should be true
.
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.
@mikaelbr Thanks for the info. It seems to work just fine with it being wait: false
? I believed that option was to make the notification sit there until some user action as taken but that doesn't seem to be the case either.
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.
The option did not obey your choice not to add it to startup which isn't a good experience if you didn't want it enabled. Solves https://github.com/gitterHQ/desktop/issues/106
mainWindowFocused = true; | ||
// When a mac app starts up, it doesn't have focus | ||
// When a Windows app starts up, it has focus | ||
// TODO: Check behaviour on linux |
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.
can you check it on linux please?
Also fixed previous problem when I added `yargs` by installing `normalize-package-data` as a root-level dependency
@trevorah I updated the auto-update part of the code and have tested the flow from I need some sort of code signing identity in my keychain in order to build the OSX app fully but have been just commenting out that part of the code in the mean time. |
|
||
var checkFileExistSync = function(target) { | ||
try { | ||
return fs.statSync(target); |
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.
return !!fs.statSync(target);
so that we return a boolean
d9d3911
to
16d9d03
Compare
@trevorah Polling logic review please, latest commit |
Now only pings every 24 hours. Covers https://github.com/gitterHQ/desktop/issues/112
16d9d03
to
25a2012
Compare
|
||
var MANIFEST_URLS = { | ||
win: 'https://update.gitter.im/win/package.json', | ||
osx: 'https://update.gitter.im/osx/package.json', | ||
linux: 'https://update.gitter.im/linux/package.json' | ||
linux: 'https://update.gitter.im/linux64/package.json' |
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.
err, what about linux32? whats going on here?
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.
We just look at the 64bit manifest for whether to update. The other pieces of the linux build are coupled together so this shouldn't be an issue.
But mainly spawned out of the ./nwapp/utils/client-type.js
not distinguishing between the two.
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.
thats super confusing. Has this already gone out?
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.
Possibly to a few people.
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.
I updated this to use linux32
and linux64
Also add `osx` package manifest entry (legacy `mac` entry still in place)
Here was my release process. Merge into master (always do releases from master). Test each platform release as you go. Also check https://gitter.im/apps to make sure the redirects are in place OSX
Windows:
Linux
|
Cmd+M
shortcut to minimize: https://github.com/gitterHQ/desktop/issues/91notifier.js
so that it no longer plays the native sound, fixes https://github.com/gitterHQ/desktop/issues/99./windows/README.md
and./windows/build.js
../windows/build.bat
has also gotten some love but is deprecated and is only there until we are confident and settled with the node script.gulp check-path-safety-for-windows
to build flow so you don't get unexpected blank screen when developing on Windowsauto-update
params/logic so we can actually use cli params outside of the autoupdate process.--update-url
: Specify custom URL to check and download updates from--passthrough-remote-debugging-port
: So you can debug the new instances we pop throughout the update processpackages -> osx
package.json
manifest check entry to play more nicely with our platform checks.Notifications
Windows 10
Windows 8.1
Mac OSX
Ubuntu 14.04.03
Debug nw.js from another PC.
Route
localhost:9222
to the external reachable local network. Here are instructions for setting it up on Mac: nwjs/nw.js#1444 (comment)localhost:9222
->192.168.0.58:9222
Then start up the nw.js app:
Visit
192.168.0.58:9222
on the other machineThese parameters also work on a final build.
Windows
OSX
Windows 10 notifications
Just to dump my knowledge here while it's fresh:
The new notifications in Windows 10 are "toast" notifications. They can be setup by creating a
.lnk
also know as "shortcut" in one of the Start menu folders such as "C:\Users\MLM\AppData\Roaming\Microsoft\Windows\Start Menu\Programs".With
nw.js
you can usevar gui = require('nw.gui'); gui.App.createShortcut(...);
(read more here) but we decided to go withnode-notifier
because it has asound: false
option also know as the "quiet" or "silent" option in their internals. Which can stop the native Windows 10 notification sound from chiming in.Users can manually manage their notification preferences on a individual basis by opening "Notifications & action settings". http://i.imgur.com/DjNB2oL.png - Because we are using
node-notifier
the entry is calledtoast
which is the vendor specific exe(find the source here) they use to make the notifications. This does mean that the entry is shared across all apps that usenode-notifier
but the user shouldn't be touching it in the settings anyway because apps customize their own behaviour (hopefully conscientiously)