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

Make out of sync code more visible #82

Closed
kolia opened this issue Apr 14, 2020 · 3 comments
Closed

Make out of sync code more visible #82

kolia opened this issue Apr 14, 2020 · 3 comments
Labels
frontend Concerning the HTML editor

Comments

@kolia
Copy link

kolia commented Apr 14, 2020

When a cell is modified but not run, that corresponds to state that is hidden to the user (the cell code registered in the reactivity DAG is no longer visible). This can easily lead to confusing errors when running other cells.

For example, if I define a = 42 in one cell, run it, cut-and-paste that into a new cell so that the first cell is now empty, and then run the new cell, I'll get the "Multiple definitions for a" error, because I forgot to re-run the first cell after having cut its code out.

It would be helpful to denote cells that have not been run since having been modified by a different color.

It would also be good to have a "run all modified" button and keyboard shortcut. That would guarantee that what you are seeing in your cells is what ran, without having to re-run all cells. issue #83

It would also be helpful if when undoing cell edits with Ctrl-Z, the displayed cell color also changes depending on whether it is the code that last ran.

@fonsp
Copy link
Owner

fonsp commented Apr 14, 2020

I agree! Pluto has this feature already - a darker bar left of the code input means that the code is not in sync with the output, either because the code has not yet been submitted, or because you just loaded the notebook and the cell has not yet been evaluated:

image

Both of these situations use the same color - this is intentional. The color simply codifies whether the cell is in sync or not. But I agree that this visual change is much too subtle. It might actually be invisible on some monitors.

It would be good to make the color more aggressive, although this would make a newly opened notebook look scary. (I'm also thinking of doing special when loading notebooks, nudging users to run all cells.)

@fonsp fonsp changed the title Visualize un-run cell modification Make out of sync code more visible Apr 14, 2020
@fonsp
Copy link
Owner

fonsp commented Apr 14, 2020

Can you create a separate issue for the "run all modified" suggestion?

@fonsp fonsp added the frontend Concerning the HTML editor label Apr 14, 2020
@fonsp
Copy link
Owner

fonsp commented Apr 16, 2020

Thanks for pointing this out! I was getting too familiar with the UI to see it myself :)

@fonsp fonsp closed this as completed Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Concerning the HTML editor
Projects
None yet
Development

No branches or pull requests

2 participants