Closed ianhi closed 3 years ago
It would be very nice to be able to place sidecars in other directions than just on the right. As far as I'm aware, there are a couple of ways this could be implemented.
One way is to duplicate the current "right-side" behavior for left, top and bottom. I haven't tested it, but I believe a partial PR for this exists in #8. A slight issue with this is that the current mechanism for hiding/revealing/closing sidecars only exists on the right side of the window.
However, I like your alternative better. It would be nice to take advantage of the existing jupyterlab window functionality. Being able to call Sidecar(position='left')
and have a new tab appear would be really nice.
For the left positioning you can swap sides from the context menu:
but it can be positioned in kinda strange ways, and also you lose the ability to close it:
If it ends up being that floating tabs don't have a place in this extension then at the very least it could serve as a nice launching point for a separate extension like this but with tabs. though I'm struggling to think of as snappy a name for such an extension.
It may even be enough just to change the 'right' to 'main' in this line
which is indeed exactly what the PR you mentioned does
I think that it can be closed now as #8 was just merged :) :tada:
I think that it can be closed now as #8 was just merged :) tada
Indeed. thanks!
This sidecar is great! One thing that would improve it for me would be the ability to pull the side car off as it's own jupyterlab tab so I have more freedom in positioning and resizing it. Jupyterlab has the ability to create a new view of cell output in a new tab (https://youtu.be/Asa_ML45HP8) but there doesn't seem to be a way to do this from python like this widget does. It also doesn't capture the output from the appearing in the original cell like this widget does.
If this is both viable and desirable then maybe it could be available as a context menu option on the tab in the sidebar?