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
Add "Restart kernel, re-run whole notebook" button #8024
Conversation
Thanks for making a pull request to JupyterLab! To try out this branch on binder, follow this link: |
Like you mention, we already have a command to restart and run all. Is there a reason to not just use a CommandButton to invoke that command? Also, CC @tgeorgeux for UX review for the icon. Note that this icon is what is used in the classic notebook these days for this action: |
Yes, there is a reason not to use the command. For the notebook, the toolbar is defined in the notebook package, not the notebook extension package, so it does not have access to the command. |
The code looks and seems to work great. I suggested a few small changes to the text, but other than that, this looks good.
Thanks!
Oh yes, same here! That looks much more intuitive. Let me know if the appropriate SVG can be produced and I can make the changes
Yep makes sense, will change and squash the relevant commit. |
Next steps here are to address Jason's suggestion and for @tgeorgeux to provide an appropriate icon. |
The code for that SVG is here (Is there an easy way I could just add a file to the PR?)
|
@jasongrout the reason I used the arrow going 'backward' was to communicate the kernel going 'back' before it restarts. If that's not clear I can reverse the direction of the arrow. |
I haven't thought about it enough to have an opinion. I didn't even realize the arrows had a standard direction until @ivanov pointed it out to me the other day in that discussion. Is it easy to post the forward-facing arrow to see what it looks like? The fact that browsers use the forward facing arrow for reload makes me think that might be analogous to restart. I wish we had more examples of this sort of icon. |
Sounds good to me. |
Thanks. |
Are we doing the icon in a different pr? |
Ah sorry, I spaced, I can open a new PR to change the icon. |
I think it's better as a follow-up PR at this point. |
Yeah, I re-though that and edited my response right after I made it. I'll open a new PR with the comments you had outstanding incorporated, with the new icon included. Would you mind giving it a check for me when I'm done? Sorry to complicate this |
New PR sounds great! I am happy to review too. Thanks Tim. |
Ah I was gonna work on this once weekend has arrived, but I see there is already a PR for this, I will leave this in @tgeorgeux 's good hands then |
References
#7935
Code changes
ToolbarItems.createRestartRunAllButton
and register this new button inToolbarItems.getDefaultItems
(I used the implementation of restart and run all command innotebook-extension
as reference);User-facing changes
(Note the presence of the fast forward icon)
Backwards-incompatible changes
None.