microsoft / pxt-microbit

A Blocks / JavaScript code editor for the micro:bit built on Microsoft MakeCode
https://makecode.microbit.org
Other
721 stars 594 forks source link

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

Open srietkerk opened 2 months ago

srietkerk commented 2 months ago

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.

eanders-ms commented 2 months ago

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

srietkerk commented 2 months ago

Ooh, yeah, I like that design!!

eanders-ms commented 2 months ago

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