Skip to content

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

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

Open
sheldonhull opened this issue Mar 18, 2019 · 4 comments
Open

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

sheldonhull opened this issue Mar 18, 2019 · 4 comments
Labels
Area-UI Issue-Enhancement A feature request (enhancement).

Comments

@sheldonhull
Copy link

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.
@SydneyhSmith SydneyhSmith added Issue-Enhancement A feature request (enhancement). Area-UI labels Mar 18, 2019
@rkeithhill
Copy link
Contributor

rkeithhill commented Mar 20, 2019

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.

@sheldonhull
Copy link
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 @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.

@SeeminglyScience
Copy link
Collaborator

@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.

@sheldonhull
Copy link
Author

@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
Labels
Area-UI Issue-Enhancement A feature request (enhancement).
Projects
None yet
Development

No branches or pull requests

4 participants