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

Scratchpad #1464

Closed
PatrickCleary opened this issue May 23, 2024 · 6 comments · Fixed by #1821
Closed

Scratchpad #1464

PatrickCleary opened this issue May 23, 2024 · 6 comments · Fixed by #1821
Labels
enhancement New feature or request

Comments

@PatrickCleary
Copy link

PatrickCleary commented May 23, 2024

Description

I find Notebooks become cluttered with non-essential code while iterating. This code is mostly from testing and checking variables.

Suggested solution

I've always felt that a scratchpad in Notebooks would solve the above issue in addition to some others. Three use cases:

  1. Check the value of a variable
  2. Draft a cell while simultaneously being able to scroll through notebook and look at previous cells.
  3. Test code without altering variables

Quick mockup (after making this I realized it may belong on the left side with the other tab options):
image

Alternative

No response

Additional context

No response

@mscolnick
Copy link
Contributor

@PatrickCleary thanks for the feature request (and great design). this is something requested before. we can add this. is this something you would be interested in contributing or pairing on? if not, i am sure i can get to it at some point

@PatrickCleary
Copy link
Author

I would take a crack at it! Would you be able to share some quick context on how you'd recommend approaching?

@akshayka
Copy link
Contributor

Quick mockup (after making this I realized it may belong on the left side with the other tab options):

@PatrickCleary just wanted to say that I love the mockup!

Happy to help with the backend as needed.

@akshayka akshayka added the enhancement New feature or request label May 23, 2024
@mscolnick
Copy link
Contributor

@PatrickCleary

I think we can put this in the sidebar for now as a new helper panel. We can add a new endpoint for run_scratch_code which runs Python with the existing global variables but does not add itself to the dependency graph. The scratch doesn't need to be reactive either. It can return the console or visual outputs via the websocket infrastructure we have - we can add new ws messages.

Feel free to implement as much as you want - and then we can fill in the gaps.

I really like your version history with arrow up/down too - up to you if you want to implement that in the first iteration.

@PatrickCleary
Copy link
Author

Started on this. Left one question on a draft PR and also if someone wanted to give it a quick glance to make sure I'm on the right track that would be great.

@mscolnick mscolnick mentioned this issue Jul 19, 2024
1 task
@mscolnick
Copy link
Contributor

Closed by #1821

Thanks for your help @PatrickCleary!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants