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

Add Cell information to API render method #128

Closed
altavir opened this issue Feb 23, 2021 · 2 comments · Fixed by #130
Closed

Add Cell information to API render method #128

altavir opened this issue Feb 23, 2021 · 2 comments · Fixed by #130

Comments

@altavir
Copy link
Contributor

altavir commented Feb 23, 2021

I think the renderer should be available of its cell if possible, so it should be inline fun <reified T : Any> render(noinline renderer: Cell.(T) -> Any) instead of inline fun <reified T : Any> render(noinline renderer: (T) -> Any).

@ileasile
Copy link
Collaborator

You have an access to the Notebook instance, and you may simply refer this cell as notebook?.currentCell, why doesn't it suit you?

@altavir
Copy link
Contributor Author

altavir commented Feb 25, 2021

Did not think about that. I think it would suffice. Still, from API wholeness point of view, it still makes sense. For example, it would be possible to create stand-alone renderers. Of course with currentCell it is just cosmetics.

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

Successfully merging a pull request may close this issue.

2 participants