🏠 back to Observable

📌 A change to the behavior of new code cells

Hi folks!

Based on support conversations and feedback here, we just made a little change to how new cells work on Observable.

Before, when you create a new cell, as soon as you unfocused it, or moved on to a different cell, the code would disappear. You could click the :pushpin: button to keep code open, but this was optional and was often missed by people just starting out with Observable.

We think the better default is for code to stay open by default, so new code cells now stay open. You can, like before, click the :pushpin: to allow them to close, in case you want to clean up your notebook for publishing.

This change won’t change the pinned’ness of existing cells on existing notebooks - it’s just a change to the editing and creation flow that hopefully makes things clearer!



Now that cells are pinned by default, it would be nice if the pin icon appeared when you hovered over the side of an open cell.

Right now when you create a lot of cells and then want to go back and collapse some of them you have to click into each one individually just to bring up the pin control.

(I’ve also been pining for a way to toggle the pinned-ness of a new cell before its first evaluation. There’s a space issue if you want to keep the icons vertical, but on larger screens I think you might be able to place the pin to the side of the vertical ellipsis.)


Great idea! We’ve just pushed out an update that does this, so you can unpin cells by clicking them, without having to focus them first.


Woot! :smiley:

Noticed a few tiny bugs:


If you insert a cell above an existing cell, its pin icon is occluded slightly by the cell below it.


Hovering the plus icon occludes the pin on a new cell.

Also, I noticed that if you unpin a newly-created but not yet committed cell, there’s no way to re-pin it — rather than turning gray, the blue pin disappears.


Naturally, the pinned indicator shouldn’t yet be visible on uncommitted cells. It should be fixed now. Thanks for the prompt feedback.

Sure, thanks for the speedy response; I hope I’m not looking a gift horse in the mouth. :slight_smile:

Ah, I thought that having the pin visible on an uncommitted cell was intentional. The ability to toggle pin-ness before committing a cell would be highly useful to me since I often know whether I want a cell pinned or not at the time I go to create it. But the spacing issues are definitely there…

Hey, I’m not sure this is related or new, but I just noticed that a Vega Lite tooltip in one of my cells is occluded by the code input below it:

I’m afraid that’s always been the case.

Because Observable notebooks are allowed to run arbitrary JavaScript and create arbitrary UI — we can never allow them to overlay the application UI itself: A notebook would, then, be allowed to spoof our login UI for example.

As a temporary fix, leave enough bottom margin on your cell for the size of the tooltip you expect to need to render.

1 Like

What if there were a toggle under Settings/Advanced Settings for “Pin new cells”? Like the current advanced setting, “Auto-close pairs,” this pin behavior seems like a question of personal preference for a lot of users.

1 Like

Unless this changes turns out to be very polarizing, we’ll probably keep options & configuration limited. Adding configuration tends to add more corners to the product where we’ll need to add “ifs” to documentation, code, and support.

1 Like