kintesh / containerise

Firefox extension to automatically open websites in a container
MIT License
418 stars 53 forks source link

CSV editor wipes all entries when saved input is unmodified #84

Closed barneycg closed 5 years ago

barneycg commented 5 years ago

Latest version (3.3.0 I believe) if you hit save on the CSV editor it wipes it resulting in the loss of all rules configured.

I've reverted to 3.2.0 and all is working as expected again

ghost commented 5 years ago

I'm sorry, but I can't recreate the issue using the current containerise version. Would you be willing to share the CSV values?

barneycg commented 5 years ago

I've repeated this on a different machine with a different list of sites. open the csv editor using the pen in top right of popup : image make no changes and click on save : image or add a new entry and all but the new entry is removed : image

ghost commented 5 years ago

Ah, ok, I could reproduce your first scenario, but I believe the second is how it should work - you are replacing all rules. I'll fix the first one and let @kintesh decide on what the second should do.

ghost commented 5 years ago

Looking at the code, the second scenario always happened because of Storage.clear. That isn't new behavior.

Once #86 is merged and released this bug should be fixed.

barneycg commented 5 years ago

Ok you say it always happened but I think I must not have been clear with my description as it doesnt in 3.2.0 as seen here Before :
image During (entered but not hit save) : image after (hit save) : image

See all the rules including the new one are present.

ghost commented 5 years ago

Oh, I misunderstood your second scenario. I thought you replaced the whole input with one line and expected that to be added.

86 should then fix your scenarios then:

  1. open CSV editor with existing input --> hit save --> everything stays the same
  2. open CSV editor with existing input --> add a line --> old rules stay intact and a new one is added
kintesh commented 5 years ago

Thanks to @LoveIsGrief this is now fixed in v3.4.0