-
Notifications
You must be signed in to change notification settings - Fork 648
Interaction service #9943
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
Interaction service #9943
Conversation
|
||
<FluentDialogFooter> | ||
<FluentButton Appearance="Appearance.Accent" OnClick="@SaveAsync"> | ||
Save |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to localize these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There will be some default button labels that are localized. But I also think there will be an option for customizing the button names from InteractionService
.
} | ||
} | ||
|
||
public sealed class InteractionInput |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future, do we think this is an abstract base class with concrete types for every supported output type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO have one class and have all properties on it for different input types. Input types will ignore properties that don't apply to them, e.g. checkbox ignores required, text ignores options, etc.
Overall, this looks good. There is a few nits like the name of We can come back with API refinements and alignment for publish/deploy prompting. |
I think this is a pretty good name for what this does, and developers will use this type a lot in aspire code. What else is called |
We don’t have a way to mark the Proto as experimental so that’s a risk here. I’m looking to see how impactful this change is to mainline scenarios. Seems it shouldn’t have an impact unless called directly? |
Something to consider is if the new gRPC method isn't implemented. For example, dashboard is deployed to ACA but they never implement the interaction service. gRPC throws a |
ba9c0a9
to
fdd6668
Compare
is there value in a capability check somewhere in the Proto? |
{ | ||
options ??= MessageBoxInteractionOptions.CreateDefault(); | ||
options.Icon ??= MessageBoxIcon.Question; | ||
options.PrimaryButtonText ??= "Yes"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If our default title is "Confirm command" (and we want to follow the fluent guideliens to a T) these should prob be "Confirm" and "Cancel"
https://fluent2.microsoft.design/components/web/react/core/dialog/usage#content
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied Yes/No from what FluentUI does. I agree it's a little odd. Ok/Cancel would probably be better defaults.
The text can easily be customized by user when displaying a confirmation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK/Cancel is good then!
|
||
@inject IStringLocalizer<Dialogs> Loc | ||
|
||
<FluentDialogHeader ShowDismiss="true"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we should put the icon next to the header since it looks awkward next to the body. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using the built-in message box from FluentUI: https://www.fluentui-blazor.net/MessageBox. Moving the icon would require creating a custom dialog.
We could do it in the future, but for now I think the default is good enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooooh I was looking at DialogBox in docs. Fine by me!
I'm just experimenting and testing with the interaction service in the playground app commands. |
A few more things we have to consider:
|
Fixed by changing the select binding. |
I think we'll expose
What situation's wouldn't it be available? Publishing? |
I'm thinking when the dashboard is disabled and this is running headless without a console. Interactivity is not available. We'll also have this problem when we back parameters with this. |
I think this change is good but we need a bool on the InteractionService to know if it's available and we should tie that to if the dashboard is enable for now. We need to be able to code around this defensively without risk of it hanging in various situations. |
{ | ||
cancellationToken.ThrowIfCancellationRequested(); | ||
|
||
var inputList = inputs.ToList(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit why not make the input IReadOnlyList<InteractionInput>
?
🎉⌚ |
Description
Adds
InteractionService
. Used to prompt the user in the dashboard (included in PR) or CLI (TBD future)Addresses #9807
Checklist
<remarks />
and<code />
elements on your triple slash comments?doc-idea
templatebreaking-change
templatediagnostic
template