Skip to content

Support trigger registration in Feedback Provider - #19525

Merged
Dongbo Wang (daxian-dbw) merged 6 commits into
PowerShell:masterfrom
daxian-dbw:feedback
Apr 19, 2023
Merged

Dongbo Wang (daxian-dbw) merged 6 commits into
PowerShell:masterfrom
daxian-dbw:feedback

Conversation

@daxian-dbw

Copy link
Copy Markdown
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

Dongbo Wang (daxian-dbw) commented Apr 17, 2023 •

Copy link
Copy Markdown
Member Author

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

@daxian-dbw
Dongbo Wang (daxian-dbw) marked this pull request as ready for review April 18, 2023 00:47
@daxian-dbw Dongbo Wang (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

@SteveL-MSFT Steve Lee (SteveL-MSFT) left a comment

Copy link
Copy Markdown
Member

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
Dongbo Wang (daxian-dbw) merged commit 457606a into PowerShell:master Apr 19, 2023
@daxian-dbw
Dongbo Wang (daxian-dbw) deleted the feedback branch April 19, 2023 00:15
@ghost

Copy link
Copy Markdown

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

Handy links:

@JustinGrote

Copy link
Copy Markdown
Contributor

Dongbo Wang (@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.

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
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