Skip to content
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

Explore ways to show execution progress while the execute cell is out of the viewport #130611

Closed
miguelsolorio opened this issue Aug 11, 2021 · 17 comments
Assignees
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders notebook-execution Issues related to running cells in a notebook notebook-rendering on-testplan ux User experience issues
Milestone

Comments

@miguelsolorio
Copy link
Contributor

Summary

When running a notebook that has a lot of cells, it can be hard to keep track of where the currently executing cell is. It becomes harder when the currently running cell is out of the viewport, so the user has to scan to notebook to find the correct one. See example below, where is the running cell?

CleanShot 2021-08-11 at 13 17 11@2x

Concepts

These are all a collection of different ideas that I've explored. We can combine some of these different ideas together or treat them as separate items.

Status bar item

A simple option would be to add a status bar item that says Running cell XX (8.2s) and clicking on it would take you to the running cell:

CleanShot 2021-08-11 at 12 54 28@2x

CleanShot 2021-08-11 at 12 54 52@2x

Adding indicators

In addition to this, we could also add indicators in the outline view and editor tab. This is helpful for when you have the outline view open or you are on a different tab and want to know if a notebook is still running.

CleanShot 2021-08-11 at 13 20 45@2x

Adding item in notebook toolbar

We could also add an action in the toolbar that will take you directly there, though we have to battle with the other actions to make this visible:

image

Alternatively, we could turn the kernel picker into a split action that and change the icon of the kernel into progress:

image

Notifications

For the cases where a notebook can take a while longer (+1min) we could look into showing a notification if the user has focus somewhere else (like anther notebook)

CleanShot 2021-08-11 at 13 29 59@2x

@miguelsolorio miguelsolorio added ux User experience issues notebook labels Aug 11, 2021
@miguelsolorio miguelsolorio added this to the August 2021 milestone Aug 11, 2021
@miguelsolorio miguelsolorio self-assigned this Aug 11, 2021
@rchiodo
Copy link
Contributor

rchiodo commented Aug 11, 2021

All sound good to me except the 'Go to running cell'. Maybe I'm misunderstanding that one though. Is that only available when actually running?

@miguelsolorio
Copy link
Contributor Author

All sound good to me except the 'Go to running cell'. Maybe I'm misunderstanding that one though. Is that only available when actually running?

@rchiodo yes, this is for the case where users may not see the status bar item and having an extra item added there. I'm unsure if this is the best place as the toolbar is pretty busy and things overflow. But it was worth adding there.

@miguelsolorio
Copy link
Contributor Author

One additional idea that @jilljac mentioned was that it would be cool if when the user clicks on the Go to running cell... item, that we go into a "following" mode where the focus follows the active running cell. Helpful when cells running can execute quickly and then you lose your place. #107919 covers this but would be cool to wrap it into the work here.

@IanMatthewHuff
Copy link
Member

That notification idea is something that customers have requested before. I believe at least one customer even wanted like a toast notification in Windows so they could bop back to VS Code when their notebook was done running. Might be more of an opt in feature though, hate to add new popups if we can help it.

Status bar is very commonly missed by customers, but it's also quick, non-noisy and easy fix, so I like that as one option. Also kinda like making the kernel picker running icon clickable. I'm not sure if that is a place that I'd normally expect a click affordance, but it makes sense to me conceptually without wasting more toolbar real estate.

@miguelsolorio
Copy link
Contributor Author

Also adding minimap #115266 as another idea that @jilljac @rebornix also mentioned. Here's a quick mockup:

CleanShot 2021-08-11 at 15 49 33@2x

@tanhakabir
Copy link
Contributor

+1 for go to running cell. I struggled with this when I was working with large notebooks.

@miguelsolorio
Copy link
Contributor Author

miguelsolorio commented Sep 13, 2021

Another idea from @tanhakabir is to show the editor progress bar when a cell is running. Will be good to test to see how this looks with the cell running cell or if we can show one at a time.

CleanShot 2021-09-13 at 09 05 27

@rchiodo also suggested we could switch to only showing the editor progress bar and remove the in-cell progress bar

@greazer
Copy link
Member

greazer commented Sep 13, 2021

Not sure if there has been final resolution here, but I think having a goto running cell affordance would be very much appreciated by many. I like the idea of replacing the kernel icon with the "running" icon. This is very similar to how Jupyter and Jupyter Lab display running state globally (I think collab too?)

I'm going to throw this possibly crazy idea out there too. What if the scrolling blue progress bar could essentially "follow the direction" the executing cell? Normally the cell itself would show the running status like it does today, but if the top of it scrolls above the current view, then the progress bar becomes "stuck" to the top of the viewport. If the top of the running cell scrolls off the bottom of the view, then the progress bar becomes "stuck" to the bottom of the viewport. This would give an indication of which way to scroll to see the running cell. Alternatively clicking on the "goto running cell" button mentioned above would go right there.

@miguelsolorio
Copy link
Contributor Author

+1 to have the notebook "follow" the active running cell, that is captured in #107919 and would be great to fold into this work

@miguelsolorio
Copy link
Contributor Author

Here's what I'm proposing we start with:

  • When a cell is running, we show progress at the editor level with our progress bar (and hide the per-cell progress bar)
  • We update the kernel picker to show a spinning progress and make it a split button
  • Clicking on this spinning progress would navigate you to the currently running cell
  • We could also add this to the outline view as well
  • 💪 Bonus points for following the cell when the active cell moves on (really helpful in large notebooks) Setting to follow to running cells in a notebook #107919
CleanShot.2021-09-13.at.14.35.04.mp4

@greazer
Copy link
Member

greazer commented Sep 13, 2021

Looks good and I really like the outline view affordance, but there's a couple of concerns:

  • When the user clicks the button to go to cell, what do you propose gets shown if the cell is large? Would it scroll the cell status bar into view?
  • What if the user doesn't have the status bar visible?
  • What if the cell is collapsed (Interactive Window in particular)?

The "crazy" proposal I had suggested in the issue wasn't about following the executing cell in the sense of automatically scrolling the view to it (though that is still an interesting concept). What I was referring to was having the scrolling progress bar always appear in one of 3 places.

  1. The top of the executing cell
  2. The top of the editor viewport if the top of hte executing cell is above it.
  3. The bottom of the editor viewport if the top of the executing cell is below it.
    It's no. 3 that makes puts this idea on the "crazy" side since we've never had a progress bar on the bottom of the editor. But at least on paper, it makes some sense.

@miguelsolorio
Copy link
Contributor Author

When the user clicks the button to go to cell, what do you propose gets shown if the cell is large? Would it scroll the cell status bar into view?

Ideally near the status bar/output is what I had imagined as most likely want to see the results?

What if the user doesn't have the status bar visible?

This is one is tough as someone who disables this is really missing other information (status, language, etc.) we could add an asterisk to the execution count as an alternate indicator

What if the cell is collapsed (Interactive Window in particular)?

Good point, I hadn't considered this. Will mock this version out.

@miguelsolorio
Copy link
Contributor Author

Here's the latest update from feedback. Added the per-cell progress and moved it to the editor when it is out of view and updated the toolbar actions to reflect the "Interrupt" and "Go to cell" contextual actions:

CleanShot.2021-09-14.at.16.21.42.mp4

And here's an example for a collapse cell w/ progress and showing the execution count:

CleanShot.2021-09-14.at.16.22.33.mp4

@rchiodo
Copy link
Contributor

rchiodo commented Sep 14, 2021

That looks awesome!

@greazer
Copy link
Member

greazer commented Nov 8, 2021

On the iteration plan for Nov, so making it part of the November milestone.

@roblourens
Copy link
Member

To summarize

  • Editor-level progress bar when cell is out of view
  • Add "Go to running cell" button to progress bar
  • Show execution status in outline view

Is showing the execution count for a collapsed cell part of this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders notebook-execution Issues related to running cells in a notebook notebook-rendering on-testplan ux User experience issues
Projects
None yet
Development

No branches or pull requests

10 participants