Skip to content

Notebook docs #3807

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

Merged
merged 39 commits into from
Jul 9, 2020
Merged

Notebook docs #3807

merged 39 commits into from
Jul 9, 2020

Conversation

JacksonKearl
Copy link
Contributor

Ref #3784

@JacksonKearl JacksonKearl marked this pull request as draft June 23, 2020 19:08
@JacksonKearl JacksonKearl requested a review from kieferrm June 23, 2020 19:08
@JacksonKearl JacksonKearl self-assigned this Jun 23, 2020
@JacksonKearl JacksonKearl added the extensibility extension author content under /api label Jun 23, 2020
@JacksonKearl JacksonKearl added this to the June 2020 milestone Jun 23, 2020
Copy link
Member

@rebornix rebornix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work and I like the flow a lot ❤️ . Only a couple of suggestions.

- text/x-javascript

To render an alternative mimetype, a `NotebookOutputRenderer` must be registered for that mimetype.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may also want to talk about multi-mimetype output and how extensions and users can control the display order of multi-mimetype output.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gave an example above with

{
	outputKind: vscode.CellOutputKind.Rich,
	data: {
		'text/html': '<b>Hello</b> World',
		'application/json': { hello: 'world' },
		'application/hello-world': 'my-hello-world-data-interchange-format',
	}
}

is that what you mean by multi-mimetype output?

And how can extensions and users can control the display order of multi-mimetype output?

Copy link
Member

@rebornix rebornix Jun 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's a multi-mimetype output. Firstly, we have builtin display orders

https://github.com/microsoft/vscode/blob/d8ef78152ce82d2e821ae2ef85ca08a54f89fa84/src/vs/workbench/contrib/notebook/common/notebookCommon.ts#L33-L53

and both notebook content providers

https://github.com/microsoft/vscode/blob/6ff3cb7ca2dfa93988aa44cadd97b8e4db25c69b/src/vs/vscode.proposed.d.ts#L1474

and users ("notebook.displayOrder": []) can control that. Also, users settings > document metadata > builtin orders.

@roblourens
Copy link
Member

Minor point but it sounds like maybe we should be using mediaType or contentType instead of mimeType which might be an outdated term.

@roblourens
Copy link
Member

In the actual API I mean

@JacksonKearl
Copy link
Contributor Author

JacksonKearl commented Jun 28, 2020

@roblourens that makes sense to me. Maybe open an issue in vscode?


## Supporting Debugging
For some kernels, such as those that implement a programming language, it can be desirable to allow debugging a cell's execution. To accomplish this, a notebook kernel can implement a [debug adapter](https://microsoft.github.io/debug-adapter-protocol/), either by directly implementing the protocol, or providing an interface between an existing notebook debugger and the protocol.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think any kernel would be tied to a programming language. A provider might not be (markdown notebook etc) but I think any kernel would execute something right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some that execute HTTP requests..

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh good point

@JacksonKearl JacksonKearl marked this pull request as ready for review July 8, 2020 01:04
@JacksonKearl
Copy link
Contributor Author

cc @gregvanl or @ornellaalt :)

@rebornix
Copy link
Member

rebornix commented Jul 8, 2020

Minor point but it sounds like maybe we should be using mediaType or contentType instead of mimeType which might be an outdated term.

@roblourens @JacksonKearl I'm wondering if mimeType is a correct/better term here, which represents type/subType but without parameters (e.g., text/html; charset=UTF-8). Also mimeType is used in Jupyter notebook and VS Code code base (Language Defintion, Emmet, Git)

@roblourens
Copy link
Member

Ok I guess we should stick with it if that's what is typically used

@JacksonKearl JacksonKearl merged commit 706f5cc into master Jul 9, 2020
@tanhakabir tanhakabir deleted the notebook branch March 30, 2022 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extensibility extension author content under /api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants