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

JN 7.0. → Remembering layout of View panels upon saving and reopening a notebook #6990

Open
MichalRIcar opened this issue Jul 28, 2023 · 7 comments

Comments

@MichalRIcar
Copy link

MichalRIcar commented Jul 28, 2023

Hello,

I would like to propose that new JN 7.0 notebook keeps info about the last state of user's layout - e.g. let's say that notebook's View setup is left panel Table of Contents, right panel is Debugger - and once saved with this layout it will be activated upon opening.

Or at least add it to Settings as an option, pls - whether to respect saved layout upon opening.

Best,
Michal

@MichalRIcar MichalRIcar added enhancement status:Needs Triage Applied to issues that need triage labels Jul 28, 2023
@RRosio RRosio removed the status:Needs Triage Applied to issues that need triage label Aug 1, 2023
@RRosio RRosio added this to the 7.0.x milestone Aug 1, 2023
@jtpio
Copy link
Member

jtpio commented Aug 3, 2023

Thanks @MichalRIcar for the suggestion.

This is a feature that exists in JupyterLab. For now Notebook 7 does not implement it but it could be considered.

Or maybe you would be able to use JupyterLab directly instead of Notebook 7?

@MichalRIcar
Copy link
Author

Hello @jtpio,

thank you for considering it as I see it as very useful feature.

My solutions are for users, thus JN works as a frontend rather than dev env. JL doesn't really provide such clean and intuitive environment. Even though differences between JN and JL are not substantial from dev point of view, somehow it feels very different from user point of view..

Best,
Michal

@ViacheslavLabs
Copy link

Hi @jtpio ,

I have long notebooks, and a Table of Contents helps a lot.
In Notebook 7 I need to go to View -> Table of Contents every time I open the notebook instead of just clicking on the already opened Table of Contents as it was in the previous version.
So it's a regression that makes me go back to Notebook 6.

@fjhickernell
Copy link

JupyterLab is nice, but Jupyter Notebook is may be easier for some. I would appreciate this feature.

@jtpio
Copy link
Member

jtpio commented Aug 14, 2024

If someone would like to give a shot at implementing this feature, please feel free!

Happy to provide some help and guidance.

@dwmit
Copy link

dwmit commented Nov 5, 2024

@jtpio Could you please provide some guidance on how to approach this? Would love to have a try but not sure where to start.

And to second some of the opinions here: Jupyter lab is nice but after trying it for a while I still prefer Jupyter notebook---more responsive, especially when working on a large notebook. Each notebook having its own tab provides additional conveniences (tab grouping, etc.).

@jtpio
Copy link
Member

jtpio commented Nov 6, 2024

Thanks @dwmit!

To achieve layout restoration, Jupyter Notebook would probably have to include a ILayoutRestorer, similar to the one in JupyterLab: https://github.com/jupyterlab/jupyterlab/blob/7de5d18738f49b1bc05856be1242065302c985ca/packages/application-extension/src/index.tsx#L836-L921

Not sure we'll be able to reuse the one from JupyterLab directly though, as the restoration logic in Jupyter Notebook will likely be slightly different.

So a first step could be to start introducing this ILayoutRestorer, and update the application shell to make use of it: https://github.com/jupyter/notebook/blob/main/packages/application/src/shell.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants