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

Stop opening the options page on upgrade #95

Closed
adam-p opened this issue Aug 8, 2013 · 5 comments
Closed

Stop opening the options page on upgrade #95

adam-p opened this issue Aug 8, 2013 · 5 comments
Milestone

Comments

@adam-p
Copy link
Owner

adam-p commented Aug 8, 2013

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)

@adam-p
Copy link
Owner Author

adam-p commented Sep 2, 2013

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.

@adam-p
Copy link
Owner Author

adam-p commented Sep 5, 2013

@caseywatts (and anyone/everyone else): Which of these two styles of notification do you prefer for updates?

image

image

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.

@caseywatts
Copy link

I'm really biased, but I like the first one better overall! Its cute and
not too obtrusive.

The second one is more standard and maintainable long term maybe? If you're
using something built in.

Small messages come from small devices~
On Sep 4, 2013 9:25 PM, "Adam Pritchard" [email protected] wrote:

@caseywatts https://github.com/caseywatts (and anyone/everyone else):
Which of these two styles of notification do you prefer for updates?

[image: image]https://f.cloud.github.com/assets/425687/1085284/848c9e00-15c9-11e3-8d46-a9cd825fbe6b.png

[image: image]https://f.cloud.github.com/assets/425687/1085294/f8114b46-15c9-11e3-83e4-c7fa83624736.png


Reply to this email directly or view it on GitHubhttps://github.com//issues/95#issuecomment-23838265
.

@adam-p
Copy link
Owner Author

adam-p commented Sep 5, 2013

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

@adam-p
Copy link
Owner Author

adam-p commented Sep 7, 2013

I believe that the implementation/fix for this -- and #64 -- is complete, in the development branch. Closing this. However... note that it's not done at all for Safari. Someone can make a new bug if they care (I have no concept of how many Safari users there are, if any.)

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:

  1. Brand new install. Options page should open. In Chrome/Opera you can delete and re-add the extension. In FF/TB you probably also (or only) have to delete the extensions.markdown-here.last-version preference entry.
  2. Extension upgrade. Should display upgrade notification. Update the version number in manifest.json for Chrome/Opera or install.rdf for FF/TB. Then either restart the application (required for FF/TB) or reload the extensions page (Chrome/Opera).
    • The notification should display after a few seconds on all tabs. Clicking either the link or the X should dismiss it from all tabs.
  3. No version change. Restart the app with no version change. Nothing should happen -- no options page popping open, no upgrade notification.

@adam-p adam-p closed this as completed Sep 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants