-
Notifications
You must be signed in to change notification settings - Fork 574
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
Add extension opt-in option to show update popup #541
Conversation
preparing for user option for showing changelog after update
clean up unnecessary commented code Show changelog only on installation fixes Anarios#534 add changelog button in popup
Added Do Not Merge tag. Reason: Use of |
Solve problem Anarios#1: Anarios#541 (comment) Use of extConfig in background script may cause race condition. The service worker is supposed to load or initialize user options, instead of using it. Solve problem Anarios#2: Anarios#537 (comment) Rare case # 1: without event listener or install reason check Extension updates. User notices opt-in option and switches on. Then closes browser. User opens youtube or whatever tab that has extension background script called. User receives an outdated update popup.
rephrase switch text
api is undefined
add scrollbar add hover fade-in animation
3.0.1 is submited to the store for review. |
@cyrildtm, do you use chrome canary? |
Yes I'm on 103.0.5027.0 for developing this extension. EDIT: If you meant why I've got so many popups, no I'm still on 100, and some of my computers still have 99. I don't update that often and I hate my tabs disappear. With v3.0, every time each computer and each account gets an update, I see a popup. |
An event listener for onInstalled is still a better solution. Here's an simple experiment: in background js, add Wait until the service worker goes "inactive"; This can be easily observed when you have chrome://extensions/ open, while reading through this page explaining why service workers get terminated frequently. Then, open extension settings and flip a switch. You will see a new tab. Conclusion, background js (or service worker, whatever you call it) gets re-run frequently. It's quite a waste to read options. And why. |
An event listener for onInstalled is still a better solution. Here's an simple experiment: in background js, add api.tabs.create({url: "about:blank"}); at the top level. Wait until the service worker goes "inactive"; This can be easily observed when you have chrome://extensions/ open, while reading through this page explaining why service workers get terminated frequently. Then, open extension settings and flip a switch. You will see a new tab. Conclusion, background js (or service worker, whatever you call it) gets re-run frequently. It's quite a waste to read options. And why.
And ....
This version will never get a popup 😃 |
It gets a popup only on install, just as intended for now. |
|
I just noticed your words "for now". Okay, but we will need it to actually work in the future right?
A non-zero cost action is not nothing. Service worker gets killed and reinstated quite often, it's not like once every browser update. That's my understanding. |
If there are ever changes big enough that everyone needs to be notified - then yeah. Right now I thought that showing it only on install is sufficient. I wanted to release the fix ASAP to not annoy people with Canary, so I went with the simplest solution of just disabling it.
Can be refactored into a single init function that reads all settings in one go.
Every few minutes, if I'm not wrong. |
Refactoring can solve everything together.
|
I just got a popup myself .. browser restart, no updates, extension is already 3.001. |
Will implement in a later PR This reverts commit 3e010be.
Let's fix this bug once for all. The code looks messy but let's hope it catches "most" of the rare cases users are complaining. Please keep the comments in source code to let people in the future know what's going on with this ugly logic.
Let's fix this bug once for all. The code looks messy but let's hope it catches "most" of the rare cases users are complaining. I went a bit pedantic in the comments in source code. Please keep them to let people in the future know what's going on with this ugly logic. @sy-b @Anarios Please take a look and comment. Remember people complaining on Github or Chrome Web Store represent ~0.1% of all extension users, who represent ~0.1% of all Youtube users. (I don't use Discord so I have no idea) Let's get over this. See my bug report #597 |
prettify popup add scrollbar add hover fade-in animation
add hover labels for select list label cherry pick Anarios#541 (prettify popup) prettify popup add scrollbar add hover fade-in animation Make popup scroll bar consistent with website use black/red color scheme and half-rounded shape
OnInstalledReason has slightly different content for Firefox and Chrome
More people use Chrome than Firefox. Check for Chrome update first. Reduce global warming.
- really allow popup on install (previously ineffective) - show debug messages in service worker console
In the bug-resolving case, we need to wait for the second layer of async storage get (for local) to finish before deciding to show the popup.
prettify popup add scrollbar add hover fade-in animation
I believe there were no more complaints on popups, I will be closing this for now. |
Add an opt-in option to display a new tab for changelog after each update.
Default is disabled, which means you won't see updates.
This comes after PR #537 with a temporary cherry pick. Tell me to rebase once that one is merged.
Improves #534
Part of #539