browser_extension
browser_extension copied to clipboard
Instance update mechanism changes
In #293 I wrote about my ideas regarding how could be the instance update mechanism improved. Below I've inserted a copy of my comment explaining my ideas:
@ManeraKai Till now if you press update instances, your selection will be reset due to those factors. Idk how to implement it in a more practical way.
Hmm, I didn't know this. I think it would be useful to have a warning box near the instance selectors that selection is reset on updating the instance list, while it works that way.
On how to handle this better I have a few ideas, but I don't know how much work would it be to make it work this way.
For whether to automatically allow newly added instances: I think there could be a toggle button for this, one for every service type (so separately for youtube, for reddit, for medium, etc). I see that you store the list of enabled instances under a separate key (e.g.
invidiousNormalRedirectsChecks
). When updating the instance list, the contents of this key would be kept, and new instances would be added to it if the toggle is set to add new instances automatically. The addon would know if an instance is new if it is included in the newly downloaded list but isn't in the old list (so this would probably need to be decided in the update procedure, before overwriting the instance list with the new one).For the situation when instances are removed: The content of the enabled instance list is still kept. If a removed instance was enabled, it is not removed from the enabled instance list, but automatic redirection would only happen to instances which are
- both on the enabled instance list AND the downloaded instance list
- OR on the custom instance list.
On the long term this could lead to very long enabled instance lists because of the enabled-but-now-unknown instances, but the UI could show them dimmed out in the main instance list (like this), with 2 active buttons, so it is manageable: delete, move to custom instance list. This way the user could see if one of their enabled instances was removed from your list, and decide whether they still want to use it or not.
What do you think?
This separate issue was made for request of a developer.
To note, I have only 1 instance selected for certain frontends but It doesn't reset on updating for me.
This will be delayed to 2.3.0, we'll release a hotfix in the upcoming days.
To note, I have only 1 instance selected for certain frontends but It doesn't reset on updating for me.
I just noticed. It does reset.
I did it now but in a completely different way, more explanation here: https://github.com/libredirect/libredirect/issues/570#issuecomment-1373874106