Open samsp-msft opened 1 month ago
Right now there is a CommandResults.Success()
helpr method that's called at the end of the command. The intention is in the future we add supporting for opening a browser URL (or other actions) by returning a different result, e.g. CommandResults.Success(launchUrl: "http://helloworld")
or CommandResults.LaunchBrowser("http://helloworld")
. I'm not sure how well that would work in practice as I think browser popup blockers might block it.
We might work around that by launching the browser window directly from .NET. You can do that today inside the command using Process
, e.g. Process.Start("http://helloworld")
.
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
Dashboard commands are one of the ways a host/dcp can offer up functionality. But AFAIK today we dont have the ability for the command to essentially communicate back with the host, get a url and then have that opened as a new tab.
Describe the solution you'd like
This would make it much easier for the host to be able to programmatically generate a URL with whatever other context it may need, such as security tokens, and then respond to the dashboard which can then use that to spawn a new tab.
Additional context
No response