councilforeconed / interactive-activities

Council for Economic Education
http://interactives.councilforeconed.org
Mozilla Public License 2.0
6 stars 2 forks source link

Add support for notifications (and one concreate notification) #152

Closed jugglinmike closed 8 years ago

jugglinmike commented 8 years ago

Players cannot move between workstations when they are in possession of a pizza. Issue an activity-level notification to the user when they attempt to navigate under these circumstances.

@cbujara The bulk of the work required for this is in the first commit, but those changes have no perceptible effect on the UI. At least, they shouldn't--please let me know if you see any changes other than the new notification in the Pizza Productivity application.

I improved the look-and-feel from my initial proposal in gh-62. Because the proposed notification obscured the navigation header, I decided to "go all the way" and more fully integrate it into the header itself:

notification-demo-b

I think this is cleaner because it results in fewer visual regions. One potential drawback is it tends to preclude displaying multiple notifications simultaneously. I haven't seen a use case for that, so I personally think it's safe to stick with this UI for now.

Resolves gh-62

jugglinmike commented 8 years ago

I only just realized that I recorded that example using a very low "lifetime" value for the notification. Useful for development, but not for actually reading the text! I've bumped it up from 1 second to 4 seconds:

notification-demo-longer

cbujara commented 8 years ago

Nice! Looking good. It's great that it's an asychronous notification, so you can still continue to work on the pizza when it appears.

cbujara commented 8 years ago

Notice one small glitch with the notification: if you switch workstations, then click the switch workstations arrow before the previous request has finished rendering, you'll get an erroneous 'can't switch workstations while working on a pizza'.