scratchfoundation / scratch-gui

Graphical User Interface for creating and running Scratch 3.0 projects.
https://scratchfoundation.github.io/scratch-gui/develop/
BSD 3-Clause "New" or "Revised" License
4.47k stars 3.58k forks source link

When confirming project upload with user, use custom modal #4762

Open benjiwheeler opened 5 years ago

benjiwheeler commented 5 years ago

Note: before implementing this UX flow, get feedback from more stakeholders, including community team.

Follow-on to https://github.com/LLK/scratch-gui/pull/4700, further resolving https://github.com/LLK/scratch-gui/issues/3509

When confirming project upload with user, user should see the nifty custom modal @carljbowman designed, instead of the default browser js modal.

Current:

image

Desired:

55671093-1f7b8380-585a-11e9-9b84-d63ed9369054

apple502j commented 5 years ago

Why don't you use Alerts?

alexwenbj commented 5 years ago

@apple502j I think because the built-in Alert's style is not unified in different browsers.

benjiwheeler commented 5 years ago

@apple502j Do you mean a specific js/css library called Alerts? Or do you mean the built-in js alert()/confirm() functions?

If you mean the built-in ones, then I echo what @alexwenbj said -- we are more confident about what we're communicating to the user if we're using our own design.

apple502j commented 5 years ago

@benjiwheeler The alert system - like the one that pops up when you save projects

benjiwheeler commented 5 years ago

@apple502j That's a great idea. We discussed this possibility early on. I believe there's no technical reason why we couldn't do it, it's just a design choice.

Ultimately we designed this custom prompt, which I think serves a distinct role from the alerts. (It could also be useful for the sprite deletion confirm.)

What turned out to be tricky is that this custom prompt is a modal -- which means we automatically close it on any mouse click outside its bounds. But the upload menu selection itself is also listening for clicks, and closing on any clicks outside its bounts. So attempting to click "OK" closes both of them, and the button never knows it was clicked!

We have a fix worked out, but it'll take some work -- the first step is to examine and reconcile this click-to-close behavior.

Just been trying to get through other stuff, and get back to this!

apple502j commented 4 years ago

@benjiwheeler FYI: #5318 fixes it a bit