tilemill-project / tilemill

TileMill is a modern map design studio
https://tilemill-project.github.io/tilemill/
BSD 3-Clause "New" or "Revised" License
3.11k stars 527 forks source link

consider os x alert/confirm severity levels #1062

Open dstwobit opened 12 years ago

dstwobit commented 12 years ago

Opened robotically by @incanus. May need clarification.

incanus commented 12 years ago

What I mean here is possibly using NSInformationalAlertStyle to denote lesser priority or NSCriticalAlertStyle to denote greater instead of the default of NSWarningAlertStyle. While informational & warning (currently) do not have a visual differentiation, critical does, and would be applicable for stuff like losing unsaved changes.

It's the difference between this:

and this:

The holdup is that except for the app-quit unsaved changes prompt, we don't know going into the UI routine what the content of the alert() or confirm() is, since the content is not Cocoa-generated but instead JavaScript-generated and handled generically by our browser wrapper. This would require some sort of context passing, as well as reversion after prompting to the default.

Minor issue, but nice to have.

incanus commented 10 years ago

Related: https://twitter.com/ubahnverleih/status/442282613076918272

incanus commented 10 years ago

To be more explicit: named actions are better than [ Cancel / OK ], particularly when data loss is a possibility. I recall some work on this recently, but it may have been in our online editor, not TileMill. I will take a look at this.

incanus commented 10 years ago

This appears to only be happening in one place, the above-referenced unsaved changes dialog.

https://github.com/mapbox/tilemill/blob/4d4431400a62f43f5ae10979583b83ca2ba87422/views/Project.bones#L202

Otherwise, we've replaced uses of JavaScript alert() and confirm() with custom modals.