Option to Show Running State in Toast Notification or Statusbar · Issue #1799 · PowerShell/vscode-powershell · GitHub
Skip to content

Option to Show Running State in Toast Notification or Statusbar #1799

Open

Description

Summary of the new feature

As a user running powershell code, I want a visual indicator that the code is running. For me to easily see, I'd like it to run as a toast notification that will make it very obvious that code is running.

Proposed technical implementation details (optional)

Running powershell code will popup toast notification when running script.
Options:

  • progress: Autodismiss after completion after designated number of secs
  • Build in way that could provide enhanced progress outputting such as a progress bar. (I've seen gist snippet on doing this manually).
  • If error, provide the basic error message and don't autodismiss.
  • Option to disable and just use status bar "running" icon that currently exists if don't want to opt in to this.

Activity

  1. rkeithhill commented on Mar 20, 2019

    @rkeithhill
    Contributor

    For other folks looking at this, this is the indicator in the status bar that is displayed when PowerShell is executing script:

    image

    Error messages are output to the PowerShell Integrated Console.

    Request for a progress display is a dupe of #140. Most likely, progress would be displayed within the PowerShell Integrated Console. There are perf problems even displaying progress within the console. Sending progress messages back to the client could further, negatively impact performance.

    It would be good to get more feedback on such toast notifications. Personally, I would find them annoying after a short while as I already find the other extension sourced toast notifications in VSCode.

  2. sheldonhull commented on Mar 28, 2019

    @sheldonhull
    Author

    I agree it would be annoying if done improperly. I'm definitely recommending it autodismisses, or after delay removes itself. I saw this down with Patrick Meinecke (@SeeminglyScience) doing something EditorServices or some snippet before and it was really cool. It provided a running progress bar so you could see the status at a glance.

    The key is that it shouldn't require clicks to deal with it, just be better information on something running.

  3. SeeminglyScience commented on Mar 28, 2019

    @SeeminglyScience
    Collaborator

    sheldonhull (@sheldonhull) I don't recall doing anything useful with status. I think at some point I posted a no-op demo like this:

    for ($i = 1; $i -lt 11; $i++) {
        $psEditor.Window.SetStatusBarMessage(
            '' +
                [char]::ConvertFromUtf32(0x2595) +
                ([char]::ConvertFromUtf32(0x2589).ToString() * $i).
                    PadRight(10, [char]::ConvertFromUtf32(0x2594)) +
                [char]::ConvertFromUtf32(0x258f),
            <# timeout: #> 600)
    
        Start-Sleep -Milliseconds 500
    }

    But that's about it. Really though, any useful graphic showing progress would have to be written into whatever script is running. We can't really infer how many more steps/how much time/etc is left in a script.

  4. sheldonhull commented on Mar 29, 2019

    @sheldonhull
    Author

    Patrick Meinecke (@SeeminglyScience) i'll try and track it down. I think you or someone else perhaps then gave a snippet for write progress using the toast. I was thinking how useful it would be as a general "running" status in the bottom.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions