pxt-microbit icon indicating copy to clipboard operation
pxt-microbit copied to clipboard

Code eval tool: Change the alert for when a user is deleting a criteria

Open srietkerk opened this issue 1 year ago • 3 comments

When a user is deleting a criteria from their checklist, they get an alert asking if they're sure they want to delete the criteria. The alert is not the prettiest.

image

To Reproduce Steps to reproduce the behavior:

  1. Go to https://makecode.microbit.org/beta---eval
  2. Make a checklist
  3. Add criteria to that checklist
  4. Delete a criterium
  5. See the alert

Not sure if we want to just use a pop-up/modal here instead to make it look like expected behavior or if we just want to remove the alert and not give a pop-up here because deleting a criteria is not super detrimental to the user.

srietkerk avatar Sep 04 '24 23:09 srietkerk

I think we need some way to protect against accidental deletion. A popup was an easy solution. Alternatively, and a superior design IMO, would be a notification that includes an undo button. You can find an example of this in Outlook:

image

eanders-ms avatar Sep 05 '24 16:09 eanders-ms

Ooh, yeah, I like that design!!

srietkerk avatar Sep 05 '24 16:09 srietkerk

It should be straight forward to implement using the existing toasts. They support injecting JSX.

eanders-ms avatar Sep 05 '24 18:09 eanders-ms