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

Fix: do not open changelog if not needed #556

Merged
merged 3 commits into from
Apr 26, 2022
Merged

Fix: do not open changelog if not needed #556

merged 3 commits into from
Apr 26, 2022

Conversation

bershanskiy
Copy link
Contributor

Fixes #555 by checking extension installation details.

// No need to show changelog if its was a browser update (and not extension update)
details.reason === "browser_update" ||
// No need to show changelog if developer just reloaded the extension
(details.reason === "update" &&
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for when developer clicks "reload" button on chrome://extensions/.

api.runtime.onInstalled.addListener((details) => {
if (
// No need to show changelog if its was a browser update (and not extension update)
details.reason === "browser_update" ||
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the actual fix for #555.

@cyrildtm
Copy link
Contributor

cyrildtm commented Apr 21, 2022

how is this different than #537 and #541?
Good one.
But still, we have #537 and #541 coming up. Can you rebase? Basically, we want to force show changelog popup one more time, and then opt in.

@sy-b
Copy link
Contributor

sy-b commented Apr 21, 2022

Another problem -

In future we might have the need to force the popup regardless of user's choice.

For e.g. when

  1. signing up is made compulsory for vote submission to prevent API abuse (I hope we never have to do this)
  2. we add features like multi device support (to prevent multiple dislike submissions)
  3. creator dislike submission
  4. Name change (unlikely) (refer: changed return youtube dislike to return your dislike 😎 #509)

Here, we'll (in #556) have to comment out the code temporarily. My idea (in #537) behind using stored value was that we can override it programmatically from somewhere. I still don't have any plans on it's implementation to do this but it just seemed better to me than asking the browser & then adding conditions on it. Of course, if there's no good reason to use a stored value then this certainly a good way. 🙂

@bershanskiy
Copy link
Contributor Author

If #537 or #541 get rid of api.runtime.onInstalled, then this PR is redundant.

In future we might have the need to force the popup regardless of user's choice.

You mean force opening changelog in a new tab (not popup)? Also, (in my personal opinion) I oppose anything that goes against explicit user choice.

@sy-b
Copy link
Contributor

sy-b commented Apr 21, 2022

anything that goes against explicit user choice

I understand. But just sometimes in some critical cases, we might need to.
For example -
You can disable all promotional emails from GitHub but not the critical ones like account recovery, privacy policy updates & other legal or administrative emails.

I view this (RYD's) option just like that. Yes, the user can disable almost all the notifications/popups (i.e. changelogs in the new tab) from RYD, but the critical ones. I don't know when we'll need this, and we can work on overriding when it's actually needed.
I just brought up the point now to ease the future work.

@cyrildtm
Copy link
Contributor

critical ones

To be honest, being able to paint the thumbs with colors is nice and great, but if I don't know there's this feature, I'm not disappointed. I would like the surprise of discovering new features by myself every now and then.

But I don't want a new tab open every time there's an incremental update. A typo gets fixed, a link is updated, there's a new line between this sentence and the next. I don't give a damn, and I don't need you blasting this bubblegum to my face.

For this fun project, I think the only critical message is our final goodbye, either when youtube decides to return dislikes itself, or we get a C&D. In either case, just use the simplest way and open a tab. Uninstall. Done. Move on with life.

@sy-b
Copy link
Contributor

sy-b commented Apr 22, 2022

👍

@Nightcaat Nightcaat added the enhancement New feature or request label Apr 22, 2022
@Anarios
Copy link
Owner

Anarios commented Apr 26, 2022

Tanks

@Anarios Anarios merged commit c3c1373 into Anarios:main Apr 26, 2022
@bershanskiy bershanskiy deleted the fix-onInstalled branch April 27, 2022 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(Bug): Extension opens changelog URL after browser update
5 participants