TheFantasticWarrior / chrome-extension-imagus

"Mirror" of the "Mirror" of the official Imagus source hosted on Google Drive. currently taking a break on this project
https://addons.mozilla.org/en-US/firefox/addon/imagus-mod/
203 stars 7 forks source link

Enabled/Disabled sieves get reset after updating new set of sieves #22

Open bottleblue opened 1 year ago

bottleblue commented 1 year ago

Everytime I update Imagus mod with a new set of sieves all the individual sieves that I enabled/disabled get reset. Can you make Imagus remember our sieve preference so it doesn't get changed when updating?

TheFantasticWarrior commented 1 year ago

https://github.com/TheFantasticWarrior/chrome-extension-imagus/releases/tag/v0.10.12

this has been a long time work in progress, with a lot of design choices considered, but I think now it's ready for testing, please let me know if you have any thoughts to improve

54m4d commented 1 year ago

On Chrome, it's a hit and miss, maybe it needs some more accuracy.

The problem is when you disable a sieve, it gets removed from the ~ list, so i don't understand if this new functionality only keeps the sieves in general after updating or if it also remembers the state of the sieve (enabled/disabled)?

Also, often the ~ button doesn't work properly, so i always have to refresh the page for it to work again.

bottleblue commented 1 year ago

I don't think it's working properly. It only loads 2 custom sieves and then says "loading..." at the bottom. Also this format isn't that much better then the last because I still have to do everything manually. I have to select which sieve I want to keep or delete which gets confusing. I don't want to have to choose anything. I just want the app to remember my past customizations and not change them back to default.

54m4d commented 1 year ago

It's not possible i think, the update process overwrites all the sieves.

bottleblue commented 1 year ago

It's not possible i think, the update process overwrites all the sieves.

How come when the sieves are updated there are certain sieves that are disabled by default like "R_AliExpress_old", "O_Instagram_pub_api_gql", and "[R_Chevereto_agressive]". It seems like it's already coded to remember which should be enabled/disabled? Can something like this extend to manually customized sieves?

If you change a sieve's enabled/disabled state that choice gets stored. After a sieve update it goes through your stored list and automatically enables or disables them. There could also be an option to reset all sieves to their default state.

54m4d commented 1 year ago

This "off":1 is the option that disables the rules, it already ships with some rules, that's why they already come disabled by default.

bottleblue commented 1 year ago

I see. Maybe TFW can come up with some idea.

TheFantasticWarrior commented 1 year ago

From the update download page: Keep rules between update

Keep list: rules toggled(enabled/disabled) will automatically be added to/removed from keep list added new button ~ to add selected items to keep list press the button with nothing selected to view the keep list/return to normal list if the search bar is focused, it may unexpectedly turn off the keep list view

Updating sieves: new prompt should be clear enough. If not, create an issue. After comparing, edit the one to keep and delete unnecessary ones, and press save after everything is finished. Side by side view and difference highlighting may or may not be added in the future.

I don't think it's working properly. It only loads 2 custom sieves and then says "loading..." at the bottom. Also this format isn't that much better then the last because I still have to do everything manually. I have to select which sieve I want to keep or delete which gets confusing. I don't want to have to choose anything. I just want the app to remember my past customizations and not change them back to default.

this should be normal, in the screen that says loading... there will be duplicates, with the first one being your old one. This is for user that change part of the content, they probably will want to move the same change in the updated sieve too

TheFantasticWarrior commented 1 year ago

On Chrome, it's a hit and miss, maybe it needs some more accuracy.

The problem is when you disable a sieve, it gets removed from the ~ list, so i don't understand if this new functionality only keeps the sieves in general after updating or if it also remembers the state of the sieve (enabled/disabled)?

Also, often the ~ button doesn't work properly, so i always have to refresh the page for it to work again.

I made it that if you disable a sieve it automatically gets added to the keep list, if you disable the sieve then enable it, the state isn't changed, so you dont need it in keep list anymore. after all the changes you will need to press save

bottleblue commented 1 year ago

The keep list is buggy. You said when we enable/disable a sieve it automatically gets added to keep list. I had five sieves I enabled/disabled. When I click on keep list sometimes it only showed two, sometimes one, sometimes it says empty. That's why I thought something was wrong with the duplicate list when it only showed two sieves.

Assuming the keep list is correct, if I click update sieve button it shows me a duplicate list for the previous and updated sieve. Why does it show me a list to remove the sieves when the whole point is to do this automatically? This should be a separate option. It should assume I want to keep all my custom sieves.

If I click Save without removing anything I get repeated popup message says "every rule must be unique!". It goes back to normal list and now all my sieves choices are reversed.

It shouldn't reverse all my custom sieves if I click Save without deleting anything. It should assume I want to keep my custom sieve states and delete the default states.

If I try to enable/disable the sieves in the keep list, when I exit to normal list and go back into the keep list it always says empty.

If it's stuck on empty and I click update sieves it won't show the duplicate list the first time. If I click it again it will then show the duplicate list.

The sieve UI was already confusing enough with the sticky selection on the sieves. It's even more confusing to use now.

TheFantasticWarrior commented 1 year ago

I'm afraid that if the sieve is updated to fix a website and the old sieve is kept things will break. So the user should be able to choose what to change or keep. It's hard to keep track of what the user changed and what the update changed. Are you suggesting that the old rule should just overwrite the new rule every time? Or any other ideas?

I didn't consider what happens when the user click save without any changes.

About the buggy part, the code is only able to add to keep list if you toggle it after the update, and you have to click save for the list to be saved. I recommend double checking before saving, and manually add missing ones

bottleblue commented 1 year ago

Huh? I thought the newer sieve would be used regardless. My complaint is simply about maintaining the enabled/disabled states between updates. Are you saying that the sieves in our keep list are still using the older rules?

TheFantasticWarrior commented 1 year ago

Yes, you can edit/toggle the new one and delete the old one, or edit the old one and delete the new one. Whatever is remaining will be kept

Unless there's a bug that never happened in my testing

bottleblue commented 1 year ago

I'm not talking about editing the rules of a sieve. I don't want that. I'm only talking about having the app remember the enabled/disabled state of a sieve between updates. Those are two different things.

If you don't understand what I mean you should hold off on creating this feature until someone else can better explain it.

TheFantasticWarrior commented 1 year ago

So you want to keep only the state(on/off) of the sieves, but not other modifications like custom sieves? I'm saying this is possible but with slightly more complicated steps, then the current version allows other modifications too

bottleblue commented 1 year ago

Yes I only want to keep the on/off state of the sieves after an update. Is this more complicated to do? If it's too complicated or hard to do then it's ok you don't have to trouble yourself.

TheFantasticWarrior commented 1 year ago

I added toggle so the behavior you want is the default and the old behavior is available on advanced, try it

bottleblue commented 1 year ago

I don't think it's working. When I click Update Sieve it gets stuck on Loading...

When I import from file it resets the sieves to default. I assume I'm still suppose to check the box "clear data before importing"?

Also is the Advanced keeping necessary? I thought if you place your custom sieves before the [ dereferers ] sieve it will not overwrite them when updating?

54m4d commented 1 year ago

I don't think it's working. When I click Update Sieve it gets stuck on Loading...

23 I think?

bottleblue commented 1 year ago

Yes it looks like the screenshot he posted. I don't have the problem with blank settings. Restarting Chrome does not fix it. Sieve page still says loading after restart.

54m4d commented 1 year ago

I don't have the problem with blank settings.

You need to use the extension intensively to get this issue

Sieve page still says loading after restart.

Switch to v0.10.11.1 and come back here and tell me how it is with that.

bottleblue commented 1 year ago

v0.10.11.1 has no problems when I click Update Sieve

54m4d commented 1 year ago

@TheFantasticWarrior

I just removed all the sieves and restarted Chrome and imported new sieves, i disabled some sieves but they are not appearing in the advanced keeping.

I disabled these.
And this is what's in the advanced keeping.

And sometimes it's vice versa, i'm confused every time i use advanced keeping, it obviously doesn't work as expected.

TheFantasticWarrior commented 1 year ago

forgot to remove items from keep list when the sieve itself is removed

so when you disabled those, those are removed from keep list because they are already in keep list, instead of added

also you don't have advance keeping checked

54m4d commented 1 year ago

also you don't have advance keeping checked

OFF: keep only on/off state, all other modifications will be deleted

TheFantasticWarrior commented 1 year ago

with off it's not advanced, just keeping, but I dont have a name for it

do you still have issues, try double checking the keep list and manually add/remove sieves from it, or any suggestions?

54m4d commented 1 year ago

with off it's not advanced, just keeping, but I dont have a name for it

Maybe you can call it "Remember disabled sieves"

I wanted to use it to remember the disabled sieves, but the list is currently empty. It's a hit and miss when adding sives there, so i don't know precisely when they are being added. For instance, the yt rule is disabled, but it's not added to the ~ as i demonstrated above.

Additionally, i recently discovered that enabling the advanced keeping option on Chrome and saving the changes doesn't actually save anything. After i refreshed the page, the checkmark for advanced keeping disappeared.