Skip to content

Conversation

@daxian-dbw
Copy link
Member

PR Summary

PR Context

Address #19372 and address #19364

  1. Allow a feedback provider to register the trigger for it to be called. The triggers are: Comment, Success, CommandNotFound, Error, and All. By default, a feedback provider will be triggered by CommandNotFound only.
  2. Some refactoring:
    • update the interface method to pass in more context information.
    • split the FeedbackHub.GetFeedback methods into multiple helper methods to reduce its complexity.

PR Checklist

@daxian-dbw
Copy link
Member Author

daxian-dbw commented Apr 17, 2023

It's helpful to ignore the whitespace changes during the review: https://github.com/PowerShell/PowerShell/pull/19525/files?w=1

@daxian-dbw daxian-dbw marked this pull request as ready for review April 18, 2023 00:47
@daxian-dbw daxian-dbw self-assigned this Apr 18, 2023
@daxian-dbw daxian-dbw added the CL-Engine Indicates that a PR should be marked as an engine change in the Change Log label Apr 18, 2023
Copy link
Member

@SteveL-MSFT SteveL-MSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will defer feedback until I can build a Feedback provider using the new triggers

@daxian-dbw daxian-dbw merged commit 457606a into PowerShell:master Apr 19, 2023
@daxian-dbw daxian-dbw deleted the feedback branch April 19, 2023 00:15
@ghost
Copy link

ghost commented Apr 20, 2023

🎉v7.4.0-preview.3 has been released which incorporates this pull request.:tada:

Handy links:

@JustinGrote
Copy link
Contributor

@daxian-dbw sorry to be late to the party on this, but I don't think the feedback trigger should have a default, it should be explicitly implemented. This bit me when writing a provider because when I used my IDE to implement the interface, it didn't pull this in and I couldn't figure out why it wasn't working. Since it is RC it may be too late since this would be breaking for existing feedback providers that haven't explicitly stated it, but just a thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Engine Indicates that a PR should be marked as an engine change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants