voila-dashboards / voila

Voilà turns Jupyter notebooks into standalone web applications
https://voila.readthedocs.io
Other
5.33k stars 497 forks source link

Update Voila shell #1369

Closed trungleduc closed 11 months ago

trungleduc commented 11 months ago
github-actions[bot] commented 11 months ago

Binder :point_left: Launch a Binder on branch trungleduc/voila/extension-config

trungleduc commented 11 months ago

@jtpio @martinRenou I'm trying to do a quick hack to make the shell extensible, but can not use the same layout system as in JupyterLab since the widgets do not show up.

Not sure if we should ship this in 0.5.0 or if this feature needs more discussion.

jtpio commented 11 months ago

but can not use the same layout system as in JupyterLab since the widgets do not show up.

What do you mean by this? Wondering if these areas could be hidden by default, and visible if a widget is added to them?

Not sure if we should ship this in 0.5.0 or if this feature needs more discussion.

I guess even if a partially working implementation would be available in 0.5.0 it would already be good. And could be polished for 1.0.0. For example maybe the theme toggle top bar extension from https://github.com/jupyterlab-contrib/jupyterlab-topbar could also be reused in Voila?

trungleduc commented 11 months ago

but can not use the same layout system as in JupyterLab since the widgets do not show up.

What do you mean by this? Wondering if these areas could be hidden by default, and visible if a widget is added to them?

I tried to mimic the Lab shell with a BoxLayout as a root layout. But the problem is that the divs containing widgets exist before the creation of the shell widget. By appending these divs into the shell's node, I got all zero-height divs and the widgets are not rendered.

trungleduc commented 11 months ago

Hi all, this PR is ready for review again. Now I have a properly working shell with the top, main and bottom areas.

martinRenou commented 11 months ago

Did you have an example of an extension somewhere to was putting something in the top bar?

If you agree, maybe this repo could go under the voila-dashboards org

trungleduc commented 11 months ago

Did you have an example of an extension somewhere to was putting something in the top bar?

If you agree, maybe this repo could go under the voila-dashboards org

I'm working on it, will ping you to create the repo later

jtpio commented 11 months ago

Would it be possible to add a screenshot to have an idea of what the Voila dashboard looks like when there is a top bar component?

Also being able to reuse one of the extensions from https://github.com/jupyterlab-contrib/jupyterlab-topbar would be great.

trungleduc commented 11 months ago

Would it be possible to add a screenshot to have an idea of what the Voila dashboard looks like when there is a top bar component?

The top and bottom are empty divs of 10px min-height and hidden by default. Their positions are fixed and the scrollbar is now shown inside the main content area. Here is a screenshot where the two are activated, I added the background for visibility.

vl2

vl

Also being able to reuse one of the extensions from https://github.com/jupyterlab-contrib/jupyterlab-topbar would be great.

I doubt it since Voila does not provide lots of tokens.

martinRenou commented 11 months ago

I think we need to be careful not to break custom templates by adding this kind of things. Custom templates are tested on the CI so for now with just the top and bottom that seems ok to me! Look great! Thanks

martinRenou commented 11 months ago

Doing another beta with this now

jtpio commented 11 months ago

I doubt it since Voila does not provide lots of tokens.

Yeah the one used by these extensions is IToolbarWidgetRegistry. Also it may not make sense to pick up all lab extensions in Voila that would add components to the top area.