-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
Stop opening the options page on upgrade #95
Comments
Some notes about implementing this (for future reference, or for anyone who stumbles across this)... There's a significant hurdle with, after an extension update, having the the background script tell the content scripts to display an upgrade notification -- or tell them anything at all: after the extension updates, loaded content scripts are considered "stale", and communication between them and the background script is prohibited. So, yeah, just at the moment where the background script wants the content scripts to do something is exactly the moment when it can't. You can see some official-ish Chromium discussion about this in this issue. Vimium deals with this by having content scripts connect to the background script every time they're loaded, and the background script will tell them to show the upgrade notification (if appropriate) at that time. This at-upgrade-time attempt to have the content scripts show the notification probably does nothing. What I have done (which is probably dumber, but avoids the "This might be broken on pages with frames" problem that Vimium may or may not have) is to have the background script keep telling content scripts (tabs, specifically) to show the upgrade notification until a content script confirms that the user has seen it. |
@caseywatts (and anyone/everyone else): Which of these two styles of notification do you prefer for updates? Edited to add: Both will appear on all tabs, and both will be dismissed on all tabs when they're clicked (or dismissed) on one. |
I'm really biased, but I like the first one better overall! Its cute and The second one is more standard and maintainable long term maybe? If you're Small messages come from small devices~
|
I don't foresee a maintainability difference. And there is a nice cross-platform consistency side-effect of using the same notification for Chrome. Both approaches have the dirty-hack problem of being page-oriented, when an extension updating is very browser-oriented. The Chrome systray notification would be better for this, but it's only supported since v28. So... the purple-in-the-corner notification is mostly implemented (I'll update when it's done) and we're going with that. For now. Unless someone has a better argument. And/or nicer CSS. I created a Gist with the code for the Firefox native notification: https://gist.github.com/adam-p/6450414 |
I believe that the implementation/fix for this -- and #64 -- is complete, in the There still needs to be a bunch of testing (for example, I haven't tried Opera at all). If anyone wants to get in on the testing party fun time... First, the test environment: You can test by zipping and installing in Firefox/Thunderbird. Or you can run from code on disk, which is easier. Chrome/Opera instructions here. Firefox/Thunderbird instructions here. There are basically three scenarios to test:
|
As much as I like showing people what has changed and reminding them to donate, it's time to stop annoying 10,000 people when there's a new version.
@caseywatts has described (#64) another extension that has a less intrusive upgrade message. Copying that description here:
The way that the browser extension vimium handles upgrades is nice. It's chrome-specific I think, but the idea is elegant. The message itself just floats at the bottom right of the page, I think for a short amount of time (or maybe I navigate away quickly), and it's nice too because it gives a link to the release notes.
If it should show upgrade message (based on version number), then send message to all tabs like this.
I think I'm generally in support of this not-too-obtrusive method, at least over having a new tab opened for each update.
It might be difficult to make that work the same on every platform, but even just getting it done on Chrome would be a good start.
(Fixing this would close #64)
The text was updated successfully, but these errors were encountered: