livebook-dev / livebook

Automate code & data workflows with interactive Elixir notebooks
https://livebook.dev
Apache License 2.0
4.62k stars 408 forks source link

Collapsed sections are expanded again when you re-open a book #2689

Closed mmower closed 1 week ago

mmower commented 1 week ago

When you re-open a Livebook all the sections that were collapsed are expanded.

This is a nuisance when you want things hidden (for example old code that you want to keep around, but have no desire to use or see).

jonatanklosko commented 1 week ago

This is expected, the collapse is purely a client-side, per-user action and is not stored anywhere. Propagating the change across clients is not desired, because people may be looking at different parts of the notebook. And saving it in the notebook itself is also not desired, this is mostly a security consideration; when user opens a notebook from somewhere, if a section was collapsed they could not notice it and execute it accidentally (by running cells later in the notebook, since all previous cells are evaluated automatically).