Skip to content

Add support for plotviewer #56

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 1 commit into from
Jul 12, 2021
Merged

Add support for plotviewer #56

merged 1 commit into from
Jul 12, 2021

Conversation

DonJayamanne
Copy link
Contributor

No description provided.

@@ -64,7 +66,7 @@ export class CellOutput extends React.Component<ICellOutputProps> {
const imgSrc =
mimeType.toLowerCase().includes('svg') && typeof data === 'string' ? undefined : URL.createObjectURL(data);
const customMetadata = metadata.metadata as JSONObject | undefined;

const showPlotViewer = metadata.__displayOpenPlotIcon === true;
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems weird that the renderer knows about metadata from the extension. Feels like the code adding this metadata should be in the same extension. I wonder if we can handle output in this extension and add the metadata tag?

Copy link
Contributor

Choose a reason for hiding this comment

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

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 wonder if we can handle output in this extension and add the metadata tag?

Then the renderer needs to be in the same extension. I think we need commands for outputs (that would solve this)

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 think this will happen microsoft/vscode#124917

Copy link
Contributor

Choose a reason for hiding this comment

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

Then the renderer needs to be in the same extension

Yeah that's kinda my point. The __displayOpenPlotIcon is an implicit dependency right now. Seems better if the renderer extension had this in in its extension.js file (although that's a moot point at the moment, but might not be soon).

Commands for outputs would eliminate the need for this code altogether then. That would be cool.

@DonJayamanne DonJayamanne merged commit 91210f6 into main Jul 12, 2021
@DonJayamanne DonJayamanne deleted the fixIssue6315 branch July 12, 2021 21:28
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 this pull request may close these issues.

2 participants