-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Update the FeedbackProvider interface to return structured data
#19133
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
Conversation
src/System.Management.Automation/engine/Subsystem/FeedbackSubsystem/IFeedbackProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/Subsystem/FeedbackSubsystem/IFeedbackProvider.cs
Show resolved
Hide resolved
src/System.Management.Automation/engine/Subsystem/FeedbackSubsystem/IFeedbackProvider.cs
Show resolved
Hide resolved
src/System.Management.Automation/engine/Subsystem/FeedbackSubsystem/IFeedbackProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/hostifaces/HostUtilities.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/Subsystem/FeedbackSubsystem/FeedbackHub.cs
Outdated
Show resolved
Hide resolved
iSazonov
left a comment
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.
LGTM with minor comments.
src/System.Management.Automation/engine/hostifaces/HostUtilities.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/hostifaces/HostUtilities.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/hostifaces/HostUtilities.cs
Outdated
Show resolved
Hide resolved
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.
LGTM with one optional recommendation
(also, very cool changes! Very exciting UX improvements 🙂)
src/System.Management.Automation/engine/Subsystem/FeedbackSubsystem/IFeedbackProvider.cs
Outdated
Show resolved
Hide resolved
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
|
🎉 Handy links: |
|
Hey @daxian-dbw very cool features, thanks for the work. There is a way to get these suggestions programmatically in a script? |
|
Yeah, you can programmatically get the available feedback, by |
PR Summary
The
GetFeedbackmethod used to return a string. Update it to return structured data instead, which allows us to do a better job in displaying the feedback. Note that, this is a breaking change comparing to7.4.0-preview.1.The structured data
FeedbackItemalso allows a feedback provider to return more than one feedback items at a time by having the propertyNextto point to the next feedback item. It may be an uncommon scenario, but it would be nice to allow it with little or no overhead to the common scenario.With the structured data, the rendering of feedback is improved. The old view can be found in #18252, and below is the new view:
Now, we have a better view even if the recommended actions from the feedback is code snippet (of course, it would awesome if the code snippets are syntax highlighted, but that would be a future enhancement😃):
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.