Delete other assets
Resolves #4692
Changes
Adds a button to the right click menu for costumes, backdrops, and sounds to delete all the others.
Reason for changes
Apparently people want this.
Tests
Tested on brave, restore deleted costumes etc work, i think its all good. Please suggest changes to addon.json name and desc etc
~~Shouldn't this be marked dangerous?~~ EDIT: Oh wait, there's a confirmation. Didn't notice.
I'll do it later™
Shouldn't this be marked dangerous? EDIT: Oh wait, there's a confirmation. Didn't notice.
I'm not saying it needs to be but disable auto save doesn't remove the confirmation but it's still marked as dangerous.
@Joeclinton1 done, done and done
Tested on brave, restore deleted costumes etc work,
So does it restore all of the deleted costumes/sounds? I think this is quite important and we didn't mention it in #4692. It's sometimes easy to forget about undo.
It sure does!
I'm not saying it needs to be but disable auto save doesn't remove the confirmation but it's still marked as dangerous.
It's a browser native confirmation, and it should be dangerous because you will forget to save, here you need to invoke it manually.
Could the menu item be made orange by marking it as dangerous
I added the dangerous property and set it to true as a test and it seemed to not change the colour? I'm not sure why, perhaps I did something wrong, could someone suggest the code change so that I can see if I'm doing it right?
It would also be nice if the restore message was made plural but that isn't really necessary.
Yeah that annoyed me too, I'll see if it's decently easy for me to do.
I don't think this should be marked as dangerous, since you can just restore the costumes, there's nothing dangerous about it. This also doesn't remove functionality it adds functionality.
I don't think this should be marked as dangerous, since you can just restore the costumes, there's nothing dangerous about it. This also doesn't remove functionality it adds functionality.
I think they were talking about changing the "delete others" button in the context menu to use the color orange when hovered over.
It seems that even with dangerous: true, the button does not change colour when hovered.
That's a bug in editor dark mode. It does become orange on hover if dark mode is disabled.
Oh ok, I'll add it then
The restore button now properly reflects how many assets are being restored (aka it's pluralised)
- done
- done
- i have no idea what could be causing this
I looked into the "sounds being out of order" bug and it seems that the function addSounds has different logic to addCostumes, so it's kind of a bug on Scratch's part. You might not be able to fix this.
I looked into the "sounds being out of order" bug and it seems that the function addSounds has different logic to addCostumes, so it's kind of a bug on Scratch's part. You might not be able to fix this.
I think the solution is clear. You should pollute the addSounds and fix their bug. It's literally the only thing left for this addon to be finished.
I looked into the "sounds being out of order" bug and it seems that the function addSounds has different logic to addCostumes, so it's kind of a bug on Scratch's part. You might not be able to fix this.
I think the solution is clear. You should pollute the addSounds and fix their bug. It's literally the only thing left for this addon to be finished.
Frankly both my motivation and spare time have plummeted, and I'm resigned to no addons of mine being added, if you or anyone else wants to do this please do, otherwise it will take me a while to do, if it all.
Ok, i have some spare time so ill work on this
@Joeclinton1 @WorldLanguages i dont know who else wants to test but im pretty sure this is all good now, if it could be merged that would make me happi uwu
This should be ready for final reviews and approvals
I'm not 100% sure if Jaza is active nowadays, so I'll make a few changes myself.
Thanks for the reviews!