vuu icon indicating copy to clipboard operation
vuu copied to clipboard

new action type for Menu RPC responses

Open heswell opened this issue 1 year ago • 1 comments

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.

heswell avatar Jul 25 '24 10:07 heswell

Might be best to wait for new RPC message type defined as outcome as https://github.com/finos/vuu/discussions/1447 Being tackled as part of this change https://github.com/finos/vuu/issues/1434

naleeha avatar Aug 27 '24 15:08 naleeha