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

Cell output rendered in incorrect order #97547

Closed
DonJayamanne opened this issue May 11, 2020 · 0 comments
Closed

Cell output rendered in incorrect order #97547

DonJayamanne opened this issue May 11, 2020 · 0 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders notebook verified Verification succeeded
Milestone

Comments

@DonJayamanne
Copy link
Contributor

  • Version: 1.46.0-insider
  • Commit: 2b472d1
  • Date: 2020-05-11T09:54:42.339Z
  • Electron: 7.2.4
  • Chrome: 78.0.3904.130
  • Node.js: 12.8.1
  • V8: 7.8.279.23-electron.0
  • OS: Darwin x64 19.4.0

Steps to Reproduce:

  1. When executing a cell add the following as output for the cell
  2. Use built in VS Code renderers
  3. Expected output is First Plot, then Second Plot, however in reality this is reversed.
  • Note:
  • The output order is First Plot, then Second Plot.
  • If you remove the image/svg+xml from data, then the order is correct.
public async executeCell(
        document: vscode.NotebookDocument,
        cell: vscode.NotebookCell | undefined,
        token: CancellationToken
    ): Promise<void> {

	cell.outputs = [
	    {
	        outputKind: 3,
	        data: {
	            'text/plain': 'First Plot',
	            'image/svg+xml':
	                '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg><svg width="220px" height="120px"  xmlns="http://www.w3.org/2000/svg"><g><text font-size="32"  x="25" y="60">First Plot!</text></g></svg>\n',
	            'image/png':
	                'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\n'
	        }
	    },
	    {
	        outputKind: 3,
	        data: {
	            'text/plain': 'Second Plot',
	            'image/svg+xml':
	                '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg><svg width="220px" height="120px"  xmlns="http://www.w3.org/2000/svg"><g><text font-size="32"  x="25" y="60">First Plot!</text></g></svg>\n',
	            'image/png':
	                'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\n'
	        }
	    }
	];
@rebornix rebornix added the bug Issue identified by VS Code Team member as probable bug label Jun 2, 2020
@rebornix rebornix added this to the June 2020 milestone Jun 17, 2020
rebornix added a commit that referenced this issue Jun 17, 2020
@roblourens roblourens added the verified Verification succeeded label Jul 2, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Aug 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders notebook verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants
@roblourens @rebornix @DonJayamanne and others