Skip to content

Discussion issue for IFeedbackProvider on Success Noisy Scenarios #19452

@StevenBucher98

Description

@StevenBucher98

Summary of the new feature / enhancement

Description

When thinking about having the Feedback Provider of PowerShell be able to trigger on success, per #19372, there is a concern around if this will be very noisy and annoying to users. The basic scenario being that a user runs a command successfully but there is potentially a better way or suggested way to enhance their experience, like the JSON adapter proposition in #19372. This could also be a good way to expose capabilities of PowerShell and nuances to help inform the user about potential ramifications.

Example

Reallocation of array each time for addition:

>$a = @()
>$a += 1
>$a += 2

This works and is successful but a more memory conscious approach would be:

>$a = [System.Collections.ArrayList]::new() 
or
>$a = [System.Collections.Generic.List[object]]::new()

The feedback provider could suggestion something like

>$a = @()
>$a += 1
[suggestion]
  $a is being reallocated each time you append to it, consider defining it as a list:
    -> $a = [System.Collections.ArrayList]::new() 

Proposed technical implementation details (optional)

Questions

The scenarios outlined above begs a lot of questions about the experience of Feedback Providers and if its something the PowerShell engine should step in to ensure "non noisy" behavior or let the feedback providers themselves be responsible for. For contexts feedback providers are developed as extensible PowerShell modules that can be imported.

  • Should the feedback providers be left responsible for not being "noisy" to the users?

If left up to the engine:

  • How do we classify if something is noisy or not?
  • If, after shown at least once after successful, a feedback suggestion is NOT used by the user, then should it be disabled?
  • Is there a better way to manage feedback providers besides importing the modules?
  • How can we get an indication from the user that feedback is no longer needed on a topic? (i.e dismissal of suggestion)

I am sure I am missing some questions or scenarios but want to open an issue to track these and have a discussion around this concept, any and all feedback is appreciated!

Other related PRs/issues with Feedback Providers

cc @daxian-dbw @SteveL-MSFT @JamesWTruher

Metadata

Metadata

Labels

Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifIssue-Enhancementthe issue is more of a feature request than a bugResolution-No ActivityIssue has had no activity for 6 months or more

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions