Vuu defines a ViewPortAction class. There are three subclasses of VuuPortAction that the UI currently handles
NoAction ("NO_ACTION")
OpenDialogViewPortAction ("OPEN_DIALOG_ACTION")
CloseDialogViewPortAction ("CLOSE_DISLOG_ACTION")
I would like to propose a new Action, ShowNotificationAction, which might look something like this
case class ShowNotificationViewPortAction( notificationType:String, message: String, title: String ="") extends ViewPortAction
where notificationType may be "error", "success", "warning" or "info"
message is the message to display to the user e.g "Trade xyz has been cancelled"
title optional, client will default it to simply "Success", "Error" etc if not provided
What I find slightly confusing about the existing declarations is that messages like ViewPortRpcFailure also extend ViewPortAction
I see the action as an optional part of the payload on either an RPC success response or an RPC error response (where NO_ACTION is assumed as the implicit action if none provided)
This will allow us to display a notification to a user, indicating the success or otherwise of a serverside action initiated by the user. We can do this with generic code on the ui, driven by the server.
Vuu defines a
ViewPortAction
class. There are three subclasses of VuuPortAction that the UI currently handlesCloseDialogViewPortAction ("CLOSE_DISLOG_ACTION")
I would like to propose a new Action, ShowNotificationAction, which might look something like this
where notificationType may be "error", "success", "warning" or "info" message is the message to display to the user e.g "Trade xyz has been cancelled" title optional, client will default it to simply "Success", "Error" etc if not provided
What I find slightly confusing about the existing declarations is that messages like
ViewPortRpcFailure
also extendViewPortAction
I see the
action
as an optional part of the payload on either an RPC success response or an RPC error response (where NO_ACTION is assumed as the implicit action if none provided)This will allow us to display a notification to a user, indicating the success or otherwise of a serverside action initiated by the user. We can do this with generic code on the ui, driven by the server.