IMO we can use same approach for showing notification in UI as is currently in OpenShift [3]. [~cshinn] any opinion on this?
I would say that most important part of this is to notify user about errors. This is a list of all endpoints currently implemented [1]. Any of them can return an error. There can be more types of errors returned, e.g.: * 400 - bad request * 404 - not found * 500 - internal server error
So far we don't return proper return code all the time from server and also we don't respond with error message. Usually we respond with 500 and no error message. So there is also some work needed on backend. Some initial work started here [2]. This task could be little bit more complex as error returned e.g. from library interacting with OpenShift does not contain the error code. So if we want to be correct we should also examine error returned from library on backend and decide what response code we should return. If this is not that important we can just pick most probable error type for certain call. After all the most important for the user is the error message returned (shown in the UI) and only way for user to determine the error code returned would be via browser console. @weil wdyt?
Not sure if we need to display notifications for start/successes of some operation. IMO this might possibly make sense for creation/update/delete of resources (apps/bindings/build-configs/builds). [~cshinn] wdyt?
Last thing which comes to my mind are websocket connections. If websocket connection is closed for some reason, we could inform user about that as well. This is also not implemented yet.
[1] https://github.com/aerogear/mobile-developer-console/blob/master/pkg/web/router.go#L37-L64 [ 2] https://github.com/aerogear/mobile-developer-console/pull/75/files [ 3] http://patternfly-react.surge.sh/patternfly-3/index.html?knob-Header=Great%20job%21&knob-Message=This%20is%20really%20working%20out.&knob-Type=success&knob-Menu=true&knob-Action=true&selectedKind=patternfly-react%2FCommunication%2FToast%20Notifications&selectedStory=Toast%20Notification&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybooks%2Fstorybook-addon-knobs |
|