Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new action type for Menu RPC responses #1443

Open
heswell opened this issue Jul 25, 2024 · 1 comment
Open

new action type for Menu RPC responses #1443

heswell opened this issue Jul 25, 2024 · 1 comment

Comments

@heswell
Copy link
Contributor

heswell commented Jul 25, 2024

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.

@naleeha naleeha moved this to 🆕 New in Vuu board Jul 25, 2024
@naleeha
Copy link
Contributor

naleeha commented Aug 27, 2024

Might be best to wait for new RPC message type defined as outcome as #1447
Being tackled as part of this change #1434

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants