Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Render cells into existing div matching
#cell-${id}if present, so you can prepare e.g. a dashboard layout. Example usage: https://github.com/tophtucker/notebooks/blob/dashboard-templates/template2.html.This is just a draft. In my quick playing around, it feels awkward to have to use cell ID when it’s not present anywhere in the UI. (I didn’t really realize until now that of course cells no longer have names!)
Without this edit, you can already make
<main>a CSS grid that’ll auto-layout whatever gets added to it. But I like the idea of being able to stub out holes where my names will go. If the cell IDs are too indirect, then… it’s almost likedisplaycould take a second parameter that gives it a label, an element to target or display to? Or the other way around?In any case, I’ve long wanted to use a notebook for building my components and then have a vanilla HTML+CSS template that scaffolds it by just referring to cell names. Sort of like alternative embedding solutions where you could have a component like
<Cell id={i} />and put it wherever and have it hook into a shared runtime.