Why does my JupyterLab cell turn orange with every new edit or when I type in it?
Asked Answered
T

2

7

I recently installed Cron via jupyterlab_scheduler in the anaconda extensions in a conda environment I usually work in. This was to schedule my jupyterlab notebooks. However, there was a problem with the application and so I deleted it. Though it seems to have left some of its features like turning the cell orange and leaving an asterisk to the left of the cell number. The picture below demonstrates this:

Cell highlights yellow when I type in it I created a new environment though it seems to still be affecting it other environs. Is there any reason why this is still happening? Its a problem because previously, when I use to undo (ctrl + z), it used to undo everything in the cell and only the cell in question. But now it undoes everything across all cells. This is a problem for me as it changes the overall code I am working with.

Any idea how to rectify this?

Theurer answered 14/9, 2021 at 9:34 Comment(6)
Please read the JupyterLab changelog for 3.1 version, specifically the user-facing changes section. I fully agree that it should be possible to get back to the previous undo behaviour.Patentor
Thanks for your response. Here I was thinking this was a result of Crontab not knowing it is a result of an update from Jupyterlab itself. Appreciate the helpTheurer
Also, I highly recommend keeping up with the latest patch release of 3.1.x as some behaviour quirks were already fixed, making the global undo less annoying (and more improvements are coming soon).Patentor
I am up to date, currently on 3.1.12 but the undo is still undoing everything in other cells.Theurer
Yes, the option to disable that is currently in works and aiming 3.2, see: github.com/jupyterlab/jupyterlab/pull/10949 (you can subscribe and once it gets out of draft please help testing it on Binder; a JupyterLab instance with the patch applied will open up in your browser when you click on the Binder badge in the second comment from the top).Patentor
Sure, thanks for all your help, truly appreciate it!Theurer
P
8

As explained in the JupyterLab 3.1 changelog, specifically the user-facing changes section, a new new visual indicator was introduced to highlight cells in which the code changed in the editor since last execution:

A GIF of the visual indicator showing up after editing a cell.

The indicator is currently implemented by changing the cell collapser and the cell execution counter color to orange, and adding a filled orange circle icon left execution counter.

Hopefully, this will improve the situational awareness of the users and lead to more consistent state of the notebooks on save. If you come to like this solution you may be interested in using nbsafety which takes it a step further by actually analysing the dependencies and preventing out-of-order execution.

Patentor answered 17/9, 2021 at 19:53 Comment(0)
A
2

previously, when I use to undo (ctrl + z), it used to undo everything in the cell and only the cell in question. But now it undoes everything across all cells. This is a problem for me

Recently I've also experienced the same annoying problem. Here is a picture to illustrate how to disable "document-wide undo/redo".

JupyterLab -> Settings -> Advanced Settings Editor -> Notebook -> Ctrl-F to find "undo" -> check the box "Experimental settings to...".

After that remember to close and re-open JupyterLab...

enter image description here

Advertisement answered 4/8, 2022 at 19:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.