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

Rowspan and colspan of a cell in a grid layout #13

Open
marcel-goldschen-ohm opened this issue Jan 25, 2024 · 2 comments
Open

Rowspan and colspan of a cell in a grid layout #13

marcel-goldschen-ohm opened this issue Jan 25, 2024 · 2 comments

Comments

@marcel-goldschen-ohm
Copy link

Thanks for this, I was really missing the old split cell extension!

One "feature" of the old split cell extension that I really enjoyed was that I could have a markdown cell with an image taking up the majority of the vertical screen space in a half width column, and in the adjacent column I could have several code cells all half width that would all stack vertically in the column neighboring the markdown cell. Apparently split cells were added using a flow layout or similar.

As far as I can tell gridwidth only allows having a single row of adjacent cells each with some width irrespective of whether they have vastly different heights. Any chance of implementing a more grid-like style where cells can be placed into an actual rows/columns grid where both rowspan and colspan can be set for individual cells for more flexible layouts?

@parmentelat
Copy link
Owner

parmentelat commented Jan 25, 2024

Hey

I see what you mean, and I reckon this is a drastic change from how the classic notebook "splitcell" plugin used to work

I gave this a quick look, but at first sight I cannot see an easy way to achieve this; the current implementation uses an as-simple-as-possible approach, which is to set the cells container a display: flex property, and then set each cell a width property which is a ratio like e.g. 50%
however the flexbox layout algorithm does not seem to support for what you would like to get; and I am really reluctant in messing further with the properties further up the elements tree, as it is quite likely to break other aspects of the notebook layout

this being said if you can think of a better approach, I'm all ears :)

PS.
on the other hand the previous method had its own drawbacks, particularly when zooming in and out was heavily used (I'm referring to slideshows for example...) so over time I got to appreciate the more stable and deterministic results we are getting now; but I admit this is not a satisfying answer for all use cases ;)

@marcel-goldschen-ohm
Copy link
Author

No worries, I kind of figured this might be a big ask. Thanks again though for what you have already done, which is still a big help as is. Cheers!

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

No branches or pull requests

2 participants