microsoft / pxt-arcade

Arcade game editor based on Microsoft MakeCode
https://arcade.makecode.com
MIT License
484 stars 209 forks source link

Can't delete the custom palette you applied #5698

Open Sheila111 opened 1 year ago

Sheila111 commented 1 year ago

Describe the bug Can't delete the custom palette you applied

Steps to reproduce the behavior

  1. Navigate to https://arcade.makecode.com/beta#
  2. Create a new project and switch to Assets editor
  3. Open the color palette
  4. Create a new palette "Custom" and Apply
  5. Delete palette "Custom"
  6. Close color palette and open it again

Actual behavior If you open color palette again, you'll see that custom palette still doesn't be deleted.

Expect behavior User can delete any custom palette or give a prompt that you can't delete the custom palette if you have applied it.

Screenshot 1

Additional context 1.OS: Windows11 2.arcade version: 1.13.6 7.Microsoft MakeCode version: 8.6.8

kimprice commented 1 year ago

This is the intended behavior because the custom palette is still applied, so when you go back to the palette editor, it shows as "Custom." If you name the palette something else, then delete it without applying a new palette and leave the palette editor, it will appear as "Custom." If you delete the palette and then apply a different palette, it will not be present in the palette editor if you return to it. Do we want the behavior to be that if a custom palette that is currently applied to the project is deleted, that the "Arcade" palette is automatically applied?

Sheila111 commented 1 year ago

I think we can give a prompt that you can't delete the custom palette if you have applied it and you need to apply another one if you want to delete it.

kimprice commented 1 year ago

I think we can give a prompt that you can't delete the custom palette if you have applied it and you need to apply another one if you want to delete it.

Yea we can either do that or we can have the modal say that deleting the current palette will automatically apply the "Arcade" palette.

jwunderl commented 1 year ago

Yeah, I would default to falling back to arcade after giving a warning in the "are you sure" modal