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 left/right areas visible in RetroLab for extensions #6403

Closed
JasonWeill opened this issue Nov 3, 2021 · 5 comments · Fixed by #6487
Closed

Make left/right areas visible in RetroLab for extensions #6403

JasonWeill opened this issue Nov 3, 2021 · 5 comments · Fixed by #6487
Milestone

Comments

@JasonWeill
Copy link
Collaborator

This issue is a successor to jupyterlab/retrolab#257.

Problem

Extensions in RetroLab may not appear if they need to add items to the left or right areas. These areas are not present in RetroLab and cannot be shown.

Proposed Solution

Allow users to install extensions that show up in the left and right panels. Do not show the left and right tab bars, as is done in JupyterLab, but instead show each extension in the View menu as a cascading submenu item. The left and right panels should have an X (close) button to dismiss them. Left and right panels should appear in a horizontal grid with the main area, not overlapping the main area.

Additional context

@jtpio showed @ellisonbg and myself a concept to let users hide tab bars and side panels on the left and right of a notebook: https://gist.github.com/jtpio/4e9a3d435d7c3950dc4150c10abbb1d7

@welcome
Copy link

welcome bot commented Nov 3, 2021

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@jtpio
Copy link
Member

jtpio commented Nov 4, 2021

Thanks @jweill-aws for opening this issue 👍

Do not show the left and right tab bars, as is done in JupyterLab, but instead show each extension in the View menu as a cascading submenu item

This sound like a nice approach. If we start having the tab bars (also called activity bar in JupyterLab 4.0.0ax), then it might look too similar to the existing the Simple Interface.

TOC2 is one of the popular extensions for the classic notebook, and it could be interesting to take a look at it for inspiration / reference:

toc2

@jtpio
Copy link
Member

jtpio commented Nov 4, 2021

In jupyterlab/retrolab#257 there is a section about reusing the LabShell from JupyterLab. But maybe we don't need to go down that road for now, and instead expand the current RetroShell to allow for the left and right areas. There would also be new public methods to show the these areas.

Do not show the left and right tab bars, as is done in JupyterLab, but instead show each extension in the View menu as a cascading submenu item

For this there could be a plugin that lists the available widgets in the left and right areas, and creates the menu entries accordingly.

@jtpio
Copy link
Member

jtpio commented Nov 5, 2021

For this there could be a plugin that lists the available widgets in the left and right areas, and creates the menu entries accordingly.

This could be based on the shell.widgets() method, after we add support for the left and right areas:

https://github.com/jupyterlab/retrolab/blob/2a96903699b66544a2c3c076cc5583e35d79dca7/packages/application/src/shell.ts#L171-L182

With this method we can dynamically retrieve the list of widgets that were added to the left / right areas by other extensions.

The plugin could then also use the shell.activateById() method to decide which of the widgets in the left and right area currently has the focus. For now it only handles the main area:

https://github.com/jupyterlab/retrolab/blob/2a96903699b66544a2c3c076cc5583e35d79dca7/packages/application/src/shell.ts#L106-L114

The plugin handling that logic could then live in the application-extension package alongside other application related plugins, using the public methods on app.shell. For example this plugin controls the visibility of the header:

https://github.com/jupyterlab/retrolab/blob/2a96903699b66544a2c3c076cc5583e35d79dca7/packages/application-extension/src/index.ts#L449-L514

@JasonWeill
Copy link
Collaborator Author

I'm working on adding the toc-extension package to the retrolab monorepo, as that seems to be highly requested as a first extension. There are a substantial amount of dependencies on this extension; one changelist I have has over 500 new files just to get compilation working.

@jtpio jtpio added this to the 7.0 milestone Apr 27, 2022
@jtpio jtpio transferred this issue from jupyterlab/retrolab Apr 27, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants