GoogleChromeLabs / squoosh

Make images smaller using best-in-class codecs, right in the browser.
https://squoosh.app
Apache License 2.0
21.82k stars 1.53k forks source link

Feat : Save and import side settings #1359

Closed harsh26shah03 closed 1 year ago

harsh26shah03 commented 1 year ago

There were requests from multiple users that they use squoosh for compression but for each iteration side settings resets to default causing issues and there is no way to save and import side settings.

There will be two buttons adjacent to copy-over

save side settings : This will save side encoder and latest settings to localstorage of browser

import side settings : This will import side encoder and latest settings from localstorage of browser and replace the existing settings

Also if there are saved settings in locaStorage then whenever user loads the app it will take that settings and populate the side so user do not have to repeatedly enter same settings for similar compression operation subject to user has saved side settings

Update:1

Import settings button remains disabled if there is nothing to import

Whenever the side setting is saved there will be event fired and eventually listened to enable import button

All 2 operations show notifications now

Import notification has undo option now

https://user-images.githubusercontent.com/48324810/229767370-c4749545-6190-4f13-8203-757477ea08a1.mov

Closes #1299 Closes #1268 Closes #78 Closes #430

harsh26shah03 commented 1 year ago

@argyleink have a look into this new feature

surma commented 1 year ago

Love this. I could see this being super useful. Only feedback at a skim is that the icons need some love, but I am sure @argyleink has ideas on that front, too :)

harsh26shah03 commented 1 year ago

@argyleink changes are in now, your suggestion looks 👏