Clear error messages when error state resolved
Consider the following:
- I attempt a gist export
- The export fails
- Popcode displays an error message
- I try another gist export
- This export succeeds
Ideally the error message would go away once the situation is resolved. Similar situation for login errors, maybe a few others as well.
I could not reproduce this but I think the crux of it is in how the addNotification functions works. It just adds notifications to the NotificationList component but there is no way of clearing out notifications other than through the user dismissing the notification.
The idea I have is to have only one kind of notification in the NotificationList at a time.
For example we would have gist notifications, login notifications, etc. Adding one kind to the list would clear out the others of the same kind.
This prevents clearing all the notifications each time a notification is added while allowing for clearing out the notifications of the same kind.
I didn't have time to do this today since I just figured out what to do but I'm going to work on it next weekend.