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

Problem with cell number in presence of viewof cell #29

Open
juba opened this issue Jul 29, 2020 · 2 comments
Open

Problem with cell number in presence of viewof cell #29

juba opened this issue Jul 29, 2020 · 2 comments

Comments

@juba
Copy link
Owner

juba commented Jul 29, 2020

It seems that the presence of a viewof cell breaks the cells numbering used to display unnamed cells.

For example in the following test notebook :

https://observablehq.com/d/9351a542d6f01f6d

The cell "second unnamed cell" should be number 3, but to display it we have to pass 4 to include :

robservable(
  "https://observablehq.com/d/9351a542d6f01f6d",
  include = 4
)

I think that's because a viewof cell is exported as two cells : one for the input and one for the value, thus breaking the cell counter.

@juba juba changed the title Problem with unnamed cell number in presence of viewof cell Problem with cell number in presence of viewof cell Jul 29, 2020
@thomasballinger
Copy link

On Twitter I called this technique clever and I stand by that, but it's also not guaranteed by the API that cells will be rendered in this specific order. Including unnamed cells is really cool though, if we get to this we might give them more stable and visible identifiers than order on the page.

@juba
Copy link
Owner Author

juba commented Jul 30, 2020

To give credit where it is due, the clever part is from @timelyportfolio :-)

I agree that having a way, via the API, to identify unnamed cell would indeed be great !

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