profile
viewpoint
Peng Lyu rebornix Microsoft Seattle https://rebornix.com @Microsoft developer on Visual Studio Code

octref/polacode 5796

📸 Polaroid for your code

auchenberg/vscode-browser-preview 4153

A real browser preview inside your editor that you can debug.

Chillee/VSCodeNeovim 328

A rewrite of VSCodeVim, backed by neovim. Still in development, not meant for use.

microsoft/vscode-sublime-keybindings 190

Sublime Text Keymap extension for VS Code

microsoft/vscode-atom-keybindings 115

Port of Atom Keybindings for VS Code.

rebornix/DotBadge 18

C# port of Shields-style badge library.

rebornix/debugger.html 3

The Firefox debugger that works anywhere :boom:

rebornix/docker-guillotine-sample 3

Docker sample for guillotine, which is currently used by GitHub to shorten URLs

Chillee/Vim 2

:shipit: Vim for Visual Studio Code

issue commentmicrosoft/vscode

Opening a notebook triggers a cell change

Good catch, the event should not be emitted.

DonJayamanne

comment created time in 4 hours

issue commentmicrosoft/vscode

Impossible to distinguish multiple output renderers provided in the same extension

We can show the id of the renderer in the quick pick entry description.

connor4312

comment created time in 4 hours

issue commentmicrosoft/vscode

Saving untitled notebooks

We should also improve the overall experience for creating untitled notebook documents, they can be created in two approaches:

  • Users press cmd/ctrl+n to create an untitled file, switch to another view type (tracked in https://github.com/microsoft/vscode/pull/93669)
  • Users run a specific command to quickly create a notebook untitled file. workbench.action.files.newUntitledFile command should take view type as arguments.

cc @mjbvz we may also want to adopt this in Custom Editor world.

DonJayamanne

comment created time in 5 hours

pull request commentmicrosoft/vscode

Initial state persistence API

LGTM, good work!

connor4312

comment created time in 6 hours

Pull request review commentmicrosoft/vscode

Initial state persistence API

+/*---------------------------------------------------------------------------------------------+ *  Copyright (c) Microsoft Corporation. All rights reserved.+ *  Licensed under the MIT License. See License.txt in the project root for license information.+ *--------------------------------------------------------------------------------------------*/++import type { Event } from 'vs/base/common/event';+import type { IDisposable } from 'vs/base/common/lifecycle';+import { ToWebviewMessage } from 'vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView';++// !! IMPORTANT !! everything must be in-line within the webviewPreloads+// function. Imports are not allowed. This is stringifies and injected into+// the webview.++declare const acquireVsCodeApi: () => ({ getState(): { [key: string]: unknown }, setState(data: { [key: string]: unknown }): void, postMessage: (msg: unknown) => void });++declare class ResizeObserver {+	constructor(onChange: (entries: { target: HTMLElement, contentRect?: ClientRect }[]) => void);+	observe(element: Element): void;+	disconnect(): void;+}++declare const __outputNodePadding__: number;++type Listener<T> = { fn: (evt: T) => void; thisArg: unknown };++interface EmitterLike<T> {+	fire(data: T): void;+	event: Event<T>;+}++function webviewPreloads() {+	const vscode = acquireVsCodeApi();+	const preservedScriptAttributes: (keyof HTMLScriptElement)[] = [+		'type', 'src', 'nonce', 'noModule', 'async',+	];++	// derived from https://github.com/jquery/jquery/blob/d0ce00cdfa680f1f0c38460bc51ea14079ae8b07/src/core/DOMEval.js+	const domEval = (container: Element) => {+		const arr = Array.from(container.getElementsByTagName('script'));+		for (let n = 0; n < arr.length; n++) {+			let node = arr[n];+			let scriptTag = document.createElement('script');+			scriptTag.text = node.innerText;+			for (let key of preservedScriptAttributes) {+				const val = node[key] || node.getAttribute && node.getAttribute(key);+				if (val) {+					scriptTag.setAttribute(key, val as any);+				}+			}++			// TODO: should script with src not be removed?+			container.appendChild(scriptTag).parentNode!.removeChild(scriptTag);+		}+	};++	let observers: ResizeObserver[] = [];++	const resizeObserve = (container: Element, id: string) => {+		const resizeObserver = new ResizeObserver(entries => {+			for (let entry of entries) {+				if (entry.target.id === id && entry.contentRect) {+					vscode.postMessage({+						__vscode_notebook_message: true,+						type: 'dimension',+						id: id,+						data: {+							height: entry.contentRect.height + __outputNodePadding__ * 2+						}+					});+				}+			}+		});++		resizeObserver.observe(container);+		observers.push(resizeObserver);+	};++	function scrollWillGoToParent(event: WheelEvent) {+		for (let node = event.target as Node | null; node; node = node.parentNode) {+			if (!(node instanceof Element) || node.id === 'container') {+				return false;+			}++			if (event.deltaY < 0 && node.scrollTop > 0) {+				return true;+			}++			if (event.deltaY > 0 && node.scrollTop + node.clientHeight < node.scrollHeight) {+				return true;+			}+		}++		return false;+	}++	const handleWheel = (event: WheelEvent) => {+		if (event.defaultPrevented || scrollWillGoToParent(event)) {+			return;+		}++		vscode.postMessage({+			__vscode_notebook_message: true,+			type: 'did-scroll-wheel',+			payload: {+				deltaMode: event.deltaMode,+				deltaX: event.deltaX,+				deltaY: event.deltaY,+				deltaZ: event.deltaZ,+				detail: event.detail,+				type: event.type+			}+		});+	};++	function focusFirstFocusableInCell(cellId: string) {+		const cellOutputContainer = document.getElementById(cellId);+		if (cellOutputContainer) {+			const focusableElement = cellOutputContainer.querySelector('[tabindex="0"], [href], button, input, option, select, textarea') as HTMLElement | null;+			focusableElement?.focus();+		}+	}++	function createFocusSink(cellId: string, outputId: string, focusNext?: boolean) {+		const element = document.createElement('div');+		element.tabIndex = 0;+		element.addEventListener('focus', () => {+			vscode.postMessage({+				__vscode_notebook_message: true,+				type: 'focus-editor',+				id: outputId,+				focusNext+			});++			setTimeout(() => { // Wait a tick to prevent the focus indicator blinking before webview blurs+				// Move focus off the focus sink - single use+				focusFirstFocusableInCell(cellId);+			}, 50);+		});++		return element;+	}++	const dontEmit = Symbol('dontEmit');++	function createEmitter<T>(listenerChange: (listeners: Set<Listener<T>>) => void = () => undefined): EmitterLike<T> {+		const listeners = new Set<Listener<T>>();+		return {+			fire(data) {+				for (const listener of [...listeners]) {+					listener.fn.call(listener.thisArg, data);+				}+			},+			event(fn, thisArg, disposables) {+				const listenerObj = { fn, thisArg };+				const disposable: IDisposable = {+					dispose: () => {+						listeners.delete(listenerObj);+						listenerChange(listeners);+					},+				};++				listeners.add(listenerObj);+				listenerChange(listeners);++				if (disposables instanceof Array) {+					disposables.push(disposable);+				} else if (disposables) {+					disposables.add(disposable);+				}++				return disposable;+			},+		};+	}++	// Maps the events in the given emitter, invoking mapFn on each one. mapFn can return+	// the dontEmit symbol to skip emission.+	function mapEmitter<T, R>(emitter: EmitterLike<T>, mapFn: (data: T) => R | typeof dontEmit) {+		let listener: IDisposable;+		const mapped = createEmitter(listeners => {+			if (listeners.size && !listener) {+				listener = emitter.event(data => {+					const v = mapFn(data);+					if (v !== dontEmit) {+						mapped.fire(v);+					}+				});+			} else if (listener && !listeners.size) {+				listener.dispose();+			}+		});++		return mapped.event;+	}+++	const onWillDestroyCell = createEmitter<[string | undefined /* namespace */, string | undefined /* cell uri */]>();+	const onDidCreateCell = createEmitter<[string | undefined /* namespace */, HTMLElement]>();++	const matchesNs = (namespace: string, query: string | undefined) => namespace === '*' || query === namespace || query === 'undefined';++	(window as any).acquireNotebookRendererApi = <T>(namespace: string) => {+		if (!namespace || typeof namespace !== 'string') {+			throw new Error(`acquireNotebookRendererApi should be called your renderer type as a string, got: ${namespace}.`);+		}++		return {+			postMessage: vscode.postMessage,+			setState(newState: T) {+				vscode.setState({ ...vscode.getState(), [namespace]: newState });+			},+			getState(): T | undefined {+				const state = vscode.getState();+				return typeof state === 'object' && state ? state[namespace] as T : undefined;+			},+			onWillDestroyCell: mapEmitter(onWillDestroyCell, ([ns, cellUri]) => matchesNs(namespace, ns) ? cellUri : dontEmit),+			onDidCreateCell: mapEmitter(onDidCreateCell, ([ns, element]) => matchesNs(namespace, ns) ? element : dontEmit),+		};+	};++	window.addEventListener('wheel', handleWheel);++	window.addEventListener('message', rawEvent => {+		const event = rawEvent as ({ data: ToWebviewMessage });++		switch (event.data.type) {+			case 'html':+				{+					const id = event.data.id;+					let cellOutputContainer = document.getElementById(id);+					let outputId = event.data.outputId;+					if (!cellOutputContainer) {+						const container = document.getElementById('container')!;++						const upperWrapperElement = createFocusSink(id, outputId);+						container.appendChild(upperWrapperElement);++						let newElement = document.createElement('div');++						newElement.id = id;+						container.appendChild(newElement);+						cellOutputContainer = newElement;++						cellOutputContainer.addEventListener('mouseenter', () => {+							vscode.postMessage({+								__vscode_notebook_message: true,+								type: 'mouseenter',+								id: outputId,+								data: {}+							});+						});+						cellOutputContainer.addEventListener('mouseleave', () => {+							vscode.postMessage({+								__vscode_notebook_message: true,+								type: 'mouseleave',+								id: outputId,+								data: {}+							});+						});++						const lowerWrapperElement = createFocusSink(id, outputId, true);+						container.appendChild(lowerWrapperElement);+					}++					let outputNode = document.createElement('div');+					outputNode.style.position = 'absolute';+					outputNode.style.top = event.data.top + 'px';+					outputNode.style.left = event.data.left + 'px';+					outputNode.style.width = 'calc(100% - ' + event.data.left + 'px)';+					outputNode.style.minHeight = '32px';++					outputNode.id = outputId;+					let content = event.data.content;+					outputNode.innerHTML = content;+					cellOutputContainer.appendChild(outputNode);++					// eval+					domEval(outputNode);+					resizeObserve(outputNode, outputId);+					onDidCreateCell.fire([event.data.apiNamespace, outputNode]);++					vscode.postMessage({+						__vscode_notebook_message: true,+						type: 'dimension',+						id: outputId,+						data: {+							height: outputNode.clientHeight+						}+					});++					// don't hide until after this step so that the height is right+					cellOutputContainer.style.display = event.data.initiallyHidden ? 'none' : 'block';+				}+				break;+			case 'view-scroll':+				{+					// const date = new Date();+					// console.log('----- will scroll ----  ', date.getMinutes() + ':' + date.getSeconds() + ':' + date.getMilliseconds());++					for (let i = 0; i < event.data.widgets.length; i++) {+						let widget = document.getElementById(event.data.widgets[i].id)!;+						widget.style.top = event.data.widgets[i].top + 'px';+						widget.parentElement!.style.display = 'block';+					}+					break;+				}+			case 'clear':+				onWillDestroyCell.fire([undefined, undefined]);+				document.getElementById('container')!.innerHTML = '';+				for (let i = 0; i < observers.length; i++) {+					observers[i].disconnect();+				}++				observers = [];+				break;+			case 'clearOutput':+				{+					const id = event.data.id;+					onWillDestroyCell.fire([event.data.apiNamespace, event.data.cellUri]);+					let output = document.getElementById(id);+					if (output && output.parentNode) {+						document.getElementById(id)!.parentNode!.removeChild(output);+					}+					// @TODO remove observer+				}+				break;+			case 'hideOutput':+				{+					const container = document.getElementById(event.data.id)?.parentElement;+					if (container) {+						container.style.display = 'none';+					}+				}+				break;+			case 'showOutput':+				{+					let output = document.getElementById(event.data.id);+					if (output) {+						output.parentElement!.style.display = 'block';+						output.style.top = event.data.top + 'px';+					}+				}+				break;+			case 'preload':+				let resources = event.data.resources;+				let preloadsContainer = document.getElementById('__vscode_preloads')!;+				for (let i = 0; i < resources.length; i++) {+					const { uri } = resources[i];+					const scriptTag = document.createElement('script');+					scriptTag.setAttribute('src', uri);+					preloadsContainer.appendChild(scriptTag);+				}+				break;+			case 'focus-output':+				{+					focusFirstFocusableInCell(event.data.id);+					break;+				}+		}+	});++	vscode.postMessage({+		__vscode_notebook_message: true,+		type: 'initialized'+	});+}++export const preloadsScriptStr = (outputNodePadding: number) => `(${webviewPreloads})()`.replace(/__outputNodePadding__/g, `${outputNodePadding}`);

nice, love toString() ;)

connor4312

comment created time in 6 hours

push eventmicrosoft/vscode

rebornix

commit sha 0e4e9899fddf958796a140938cd373fb70caeebb

Fix #96436. Store notebook editor contrib in memento.

view details

push time in 6 hours

issue closedmicrosoft/vscode

Cannot open notebook in file-only workbench

  • have this setting "window.openFilesInNewWindow": "on"
  • open an existing issues notebook
  • :bug: the notebook opens as text file, not notebook
  • :bug: there is no reopen with command

closed time in 6 hours

jrieken

issue commentmicrosoft/vscode

Saving untitled notebooks

Good catch, untitled file should not trigger save until users explicitly run Save, which will invoke SaveAs.

DonJayamanne

comment created time in 6 hours

issue commentmicrosoft/vscode

Test notebook

Testers FYI: this TPI covers most features/polishes we made to Notebook core, it doesn't cover changes we made to other VS Code components but they are covered in other TPIs:

  • Undo/Redo #98991
  • Language features #98821
roblourens

comment created time in 6 hours

push eventmicrosoft/vscode

rebornix

commit sha f91775a693e4830eb8ac4642d6556407ca90851c

:lipstick:

view details

push time in 7 hours

issue commentmicrosoft/vscode

Notebook UI not applied to file that was already opened in the workspace

Maybe the first time when a new editor type is registered on user's machine, we can show a notification.

TylerLeonhardt

comment created time in 7 hours

issue commentmicrosoft/vscode

Notebook UI not applied to file that was already opened in the workspace

After digging into the code a bit more, I think this might be a "feature", with which you can always see the content with the last editor type you specified (in above case, it's file). However I also agree this is not friendly for first-time user experience with "custom" editors. cc @mjbvz

TylerLeonhardt

comment created time in 7 hours

issue closedmicrosoft/vscode

Notebook: splitting editor results in "Cannot read property sendMessage of undefined"

Refs: https://github.com/microsoft/vscode/issues/96279

  • open a GH notebook
  • click on split button

=> 🐛 Unable to open 'foo.github-issues': Cannot read property 'sendMessage' of undefined.

closed time in 7 hours

bpasero

issue commentmicrosoft/vscode

Notebook: splitting editor results in "Cannot read property sendMessage of undefined"

Already fixed in Insiders.

bpasero

comment created time in 7 hours

issue commentmicrosoft/vscode

Notebook cell results fully unaccessible

Currently behavior: if the workbench is in accessibility mode / screen reader attached, text/markdown will have higher priority than text/html, which is our heuristics and might not be true. Tagging an output mimetype as "accessible" is appealing but I think it should not be done by the extension itself, otherwise it's just another property for changing mimetype display order.

In GH Notebook, it's fairly easy to make the text/markdown output to be accessible: adding self explanatory aria labels for links and users can easily tab through the results (also no "loads more ... ").

isidorn

comment created time in 7 hours

push eventmicrosoft/vscode

Daniel Imms

commit sha 71b4653ab62590c50e1d07715b8fb43e072481dd

Move renderAction into ContentHoverWidget

view details

Jagua

commit sha 0a7841c45a16a1aa340630bd60e4ce66d804261e

Fix indentation and typo of json-language server readme

view details

Daniel Imms

commit sha e08737549252b3439a36cc7e205a51cf03ec52a5

Create a hover widget in base and extend by editor/term widgets

view details

Daniel Imms

commit sha 5007d89065dbb6ad4c2efaecff6a5e5a5a72ac40

Move renderAction to base hover widget

view details

Daniel Imms

commit sha 8f8d9919be1f277f223410480d83fe3bb9369da1

Push more into base hover widget

view details

isidor

commit sha 6e50f24e64dd085e373376c381253ead02069ea1

vscode api: introduce accessibilityInformation

view details

isidor

commit sha dc31d5b59e9775f5237e388897fe834907c77706

move accessibilityInformation to existing file and reanme to IAccessibilityInformation

view details

Daniel Imms

commit sha d1b2607eb2cd328419f7543a896dd3229c29dab5

Rename to BaseHoverWidget

view details

rebornix

commit sha 3e2df0a371fdc832240f9de5c4749c0bf1257871

hide kernel switcher

view details

SteVen Batten

commit sha ee183be23836f409afeb6f1eadbf8d26d47c228c

fix double terminal

view details

Alex Dima

commit sha 8f808113251590bf6ef8ad82cfcddb048eb0268b

Push back Escape handling to get rid of BaseHoverWidget.hide()

view details

Matt Bierner

commit sha f3454d430bb7ef8a5c7c6b571c33906b697423b4

Better clean for 452a377c5e0556a1f5402c69f6747f270c770520

view details

Alex Dima

commit sha a2e7af7af5396073352e35e38aaa5a08e36a9d66

Get rid of BaseHoverWidget._renderAction

view details

Alex Dima

commit sha 7f1224cab27edad5e867beaa1d462fe7b3d3b083

Avoid extending from BaseHoverWidget

view details

Alex Dima

commit sha 0bdb7009d8bbfe497e82daff6b71b82c48af2231

Rename HoverWidget.domNode to HoverWidget.contentsDomNode

view details

Alex Dima

commit sha 12628f1e2b9df20d7923a2b18cb2b1f3d6359983

Rename base file

view details

Alex Dima

commit sha 88bcf236cf8b7e46341e7f54e512414b9d2d934f

Rename .monaco-editor-hover to .monaco-hover

view details

Alex Dima

commit sha 6c49bbf9e89626d203157375fe837a6735a9727b

Move out layer breaking class names

view details

Daniel Imms

commit sha cb63d2ddc3e1c11e6fc5998336e0b0697ea7e6d9

Merge pull request #97834 from microsoft/tyriar/97496 Move common parts of editor and terminal hover widget into base ui

view details

Rachel Macfarlane

commit sha 9e5e0326226f9b2cdd44ca4048b527349dca6d65

Always show confimation dialog on sign out, fixes #96612

view details

push time in 7 hours

push eventmicrosoft/vscode

Miguel Solorio

commit sha f3c7c4df8e2c0706244049fe0b6a2e880ecd9ec6

Hard to see which buttons are toggled in find/replace dialog boxes Fixes #97204

view details

Miguel Solorio

commit sha d662ba0f31b84ae9356789d8ac8868a8bdf06b9d

Merge branch 'master' into misolori/issue97204

view details

Peng Lyu

commit sha 45a80baf128967dc4910e6fd0f66863e9f4e1e43

Merge branch 'master' into misolori/issue97204

view details

Peng Lyu

commit sha 8ebaa0c0f1ce0718e1d75d81b1a97cdebba76369

Merge pull request #97207 from microsoft/misolori/issue97204 Add active toggle foreground color tokens

view details

push time in 7 hours

pull request commentmicrosoft/vscode

Add active toggle foreground color tokens

LGTM, thanks!

misolori

comment created time in 7 hours

delete branch microsoft/vscode

delete branch : misolori/issue97204

delete time in 7 hours

PR merged microsoft/vscode

Reviewers
Add active toggle foreground color tokens

This PR fixes #97204. I've always wanted to make the active toggles have more contrast and since we now use codicons we can do that. I've added inputOption.activeForeground as a color token. Below is an example of that new color token and the updated style for active inputs.

Dark

image

Light

image

cc @aeschli @roblourens

+50 -7

1 comment

11 changed files

misolori

pr closed time in 7 hours

issue closedmicrosoft/vscode

Hard to see which buttons are toggled in find/replace dialog boxes

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ --> <!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ --> <!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. --> OS: Windows 10 image

As you can see in the image above it is really hard to see which buttons are toggled and which are not especially when you have the monitor's contrast and brightness turned down all the way which is what I have when working at night.

The blue highlighting has very little contrast on the dark background. I have to look very closely to see which buttons are toggled.

Maybe a white highlighting or a lighter text color is more appropriate to indicate which buttons are on and which are off.

Thank you.

closed time in 7 hours

user474

issue closedmicrosoft/vscode

In the "search and replace" window, a question mark is displayed instead of the number of the searched word Expected Result: The number of the searched word can only be a positive integer.

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ --> <!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ --> <!-- Please search existing issues to avoid creating duplicates. --> <!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->

<!-- Use Help > Report Issue to prefill these. -->

  • VSCode Version: 1.45.0 (user setup) Commit: d69a79b73808559a91206d73d7717ff5f798f23c Date: 2020-05-07T16:18:48.860Z Electron: 7.2.4 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0
  • OS Version: Windows_NT x64 10.0.18362

Steps to Reproduce:

  1. Open several tabs with files with source code (at least one search word should be present in any of them).
  2. Change focus between tabs.

or

  1. Open several tabs with files with source code (at least one search word should be present in any of them).
  2. Delete the line that contains the search word. <!-- Launch with code --disable-extensions to check. --> Does this issue occur when all extensions are disabled?: Yes screenshot

closed time in 7 hours

sgdreamer7

push eventmicrosoft/vscode

rebornix

commit sha fbdc028fe4abd3601adbd23883791453501536c3

Fix #97681. Use neareast find match position.

view details

push time in 7 hours

issue closedmicrosoft/vscode

find shows count '? of 2' after removing any found result

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ --> <!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ --> <!-- Please search existing issues to avoid creating duplicates. --> <!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->

<!-- Use Help > Report Issue to prefill these. -->

  • VSCode Version: 1.45.0
  • OS Version: macOS 10.13.6 (Darwin x64 17.7.0)

Steps to Reproduce:

  1. in a new file add code as shown in image Screen Shot 2020-05-13 at 12 19 48

  2. then start changing the found result, the count changes to '?'. shouldn't it be now 2 of 2

<!-- Launch with code --disable-extensions to check. --> Does this issue occur when all extensions are disabled?: Yes

If this is a expected behavior, then let me know.

closed time in 7 hours

nithil

issue commentmicrosoft/vscode

Integration test failure: notebook workflow notebook cell actions

Fixes have been pushed to master, considering we are in the endgame, I'm not going to enable this particular integration test this iteration but have it turned on early next week.

bpasero

comment created time in 8 hours

issue commentmicrosoft/vscode

Notebook tests: run against web too

Notebook integration tests enabled for both desktop and web. Not for remote currently due to webview prototype handler bug, will turn it on once that's fixed.

bpasero

comment created time in 9 hours

issue commentmicrosoft/vscode

Notebook output doesn't render VT-100 codes for `text/plain`

It's still available, but it only renders as plain text. We might also want to change its name to CellTextOuput to keep aligned.

brettfo

comment created time in 9 hours

push eventmicrosoft/vscode

Daniel Kelling

commit sha 4b00bed17724df21c5a03ac929358bff22ff4a0d

Add support for Unicode-aware regular expressions in Monaco Monarch language definitions

view details

Ladislau Szomoru

commit sha ed5e512a2f855598edb19c7c2a6ceabe66477bbd

Do not push an empty string to the result

view details

Rob Lourens

commit sha 7be726fd8a2151869880e5876607917463e23695

Support downloading blob URLs and data URLs when clicked in a notebook webview Fix #98101

view details

Rob Lourens

commit sha 2c137b4ea2a4eec013d215f3ca7c5e6c23586aff

Fix build

view details

Matt Bierner

commit sha 5f8e6d0b196b90e7d9b1590284db54c05b4f29b1

Make sure add all missing imports quick fix comes after individual add missing import quick fixes Fixes #98613

view details

Matt Bierner

commit sha dfde221caad8b5cccce0dc76d388704c7337d109

Fix the remove unused source action not removing single unused interfaces

view details

SteVen Batten

commit sha b9d2db5ebefed45055a7d667a80c3da25c326c35

allow toggling home indicator

view details

SteVen Batten

commit sha 5bec7163f38617daf60ff76e09df11429aa18894

polish #98016 based on user feedback

view details

matt penrice

commit sha 3cb12a21b5711022d304d8ea1252bbf620d6eb15

Create VsCodeResource for schemed filepaths (#94986)

view details

rebornix

commit sha a537cb7370c70b2e6a9d30d917b4ddb58a8c666c

:lipstick:

view details

Miguel Solorio

commit sha e70bf91f5516d7016cfeeaf30c10086ad73c2fc7

Update hover feedback for cell margins for dragging

view details

Matt Bierner

commit sha 2b9c5271a1c1502f54daf742ed07d7b5467b0154

Fix rewriting of vscode-webview-resource schemes when using iframe based webviews

view details

Matt Bierner

commit sha b2cb8682f9c589e8e05e21621d98745c5314bd55

Remove rewriting logic added for #98768 This only appears to work in very specific case

view details

Matt Bierner

commit sha 50f907f0ba9b0c799a7c1d2f28a625bf30041636

Add more strict typing for webview options We can only send URI components over from the extension host to the renderer process. Make sure the typings reflect that Follow up on #98746

view details

rebornix

commit sha 472571daa3b05dea6e17a17240a1cf7fe7f3cacd

await notebookEditor.setModel: sends all initialization events to ext host when opening notebook.

view details

rebornix

commit sha 0663fac3acdc53a344e2272cd8c421555429cfd9

support cell text model attach/detach on web.

view details

rebornix

commit sha c2131f984e8b3e007896ef3bf1fa4af6206e2f46

set visible editors active property correctly.

view details

rebornix

commit sha 7fccb0d608511be3d92c988fb7309c1da95b8b85

use updateState/compute instead of sending delta directly.

view details

rebornix

commit sha 0bf860564a3e2fb05518d5c29eb0ed4cf920a4bb

Diffing editors/documents/visibleEditors/activeEditor.

view details

rebornix

commit sha a14a793150e7a1837277d365c2b2b658d873cc8b

split editor does not await, notebook events are not sent to ext host in time on Web.

view details

push time in 9 hours

push eventmicrosoft/vscode

rebornix

commit sha 7e9abe577dae3a6c4ca10c56c7680eb71b9996b3

notebook resolve should wait for * activated events.

view details

push time in 9 hours

push eventmicrosoft/vscode

rebornix

commit sha f9ca74dcf17c76785347e3069511285575b601d3

add explicit activation event for notebook test ext.

view details

push time in 9 hours

push eventmicrosoft/vscode

rebornix

commit sha 1efb60088b9bb36500bff3c119afccf846107d7e

Update distro

view details

push time in 11 hours

push eventmicrosoft/vscode

rebornix

commit sha 472571daa3b05dea6e17a17240a1cf7fe7f3cacd

await notebookEditor.setModel: sends all initialization events to ext host when opening notebook.

view details

rebornix

commit sha 0663fac3acdc53a344e2272cd8c421555429cfd9

support cell text model attach/detach on web.

view details

rebornix

commit sha c2131f984e8b3e007896ef3bf1fa4af6206e2f46

set visible editors active property correctly.

view details

rebornix

commit sha 7fccb0d608511be3d92c988fb7309c1da95b8b85

use updateState/compute instead of sending delta directly.

view details

rebornix

commit sha 0bf860564a3e2fb05518d5c29eb0ed4cf920a4bb

Diffing editors/documents/visibleEditors/activeEditor.

view details

rebornix

commit sha a14a793150e7a1837277d365c2b2b658d873cc8b

split editor does not await, notebook events are not sent to ext host in time on Web.

view details

rebornix

commit sha b1c870fe25d2a405847cbc15887a3dbccafdf546

Disable webview related tests on web.

view details

rebornix

commit sha ed0803e668dc626c5e632ad1ff71ba85cbb83cd1

fix false negative tests

view details

rebornix

commit sha ff9504d7d493463ef71b080a08dd5304f6ca6a63

Fix windows file name match

view details

rebornix

commit sha 466d8724c83f71f6e4fbec6c0fc6f750b05a1600

140Merge remote-tracking branch 'origin/master' into rebornix/notebook-events

view details

rebornix

commit sha f94d697d52609878bf8d1dd0634f0f3a1ac3dec9

Fix kernel glob match

view details

rebornix

commit sha a3f81e94534d6134d72b5fd938eda7ba7c6fe537

fix mimetype pattern match

view details

rebornix

commit sha 7a38b84bc786c0b0bcbe4a2b8e00de0f9e5a03a0

vscode resolve file.

view details

Peng Lyu

commit sha 6e6a2bab2e96da33116a83a95c8ba790f04b54ba

Merge pull request #98923 from microsoft/rebornix/notebook-events notebook events between renderer & exthost

view details

push time in 11 hours

delete branch microsoft/vscode

delete branch : rebornix/notebook-events

delete time in 11 hours

PR merged microsoft/vscode

notebook events between renderer & exthost

<!-- Thank you for submitting a Pull Request. Please:

  • Read our Pull Request guidelines: https://github.com/Microsoft/vscode/wiki/How-to-Contribute#pull-requests.
  • Associate an issue with the Pull Request.
  • Ensure that the code is up-to-date with the master branch.
  • Include a description of the proposed changes and how to test them. -->

The event flow in Notebook was not correct previously but integration tests didn't catch any bug because the events are sent between renderer & ext host really fast so most of the time, if you run a command and await for it, the editors/documents mirrors in the ext host are up to date. This is not true when the latency between the renderer and ext host are somewhat high.

This explains why we are seeing one flaky test failure with moveDown command on CI only, on which the tests might fail if the CI machine is under heavy loads.

Our web integration tests unveil the root cause of the failure: at least half of the tests failed on Web as the events are not sent to ext host from renderer in time. This PR tracks the refactoring of the event syncing of Notebook component to fix the bugs.

+265 -117

0 comment

9 changed files

rebornix

pr closed time in 11 hours

push eventmicrosoft/vscode

rebornix

commit sha 7a38b84bc786c0b0bcbe4a2b8e00de0f9e5a03a0

vscode resolve file.

view details

push time in 11 hours

push eventmicrosoft/vscode

rebornix

commit sha a3f81e94534d6134d72b5fd938eda7ba7c6fe537

fix mimetype pattern match

view details

push time in 12 hours

push eventmicrosoft/vscode

rebornix

commit sha f94d697d52609878bf8d1dd0634f0f3a1ac3dec9

Fix kernel glob match

view details

push time in 13 hours

push eventmicrosoft/vscode

Ladislau Szomoru

commit sha ed5e512a2f855598edb19c7c2a6ceabe66477bbd

Do not push an empty string to the result

view details

Rob Lourens

commit sha 7be726fd8a2151869880e5876607917463e23695

Support downloading blob URLs and data URLs when clicked in a notebook webview Fix #98101

view details

Rob Lourens

commit sha 2c137b4ea2a4eec013d215f3ca7c5e6c23586aff

Fix build

view details

Jackson Kearl

commit sha 8a25d277c5b693a0bd05af0db349ac981495a1e2

Dont show Search: Focus Next/Prev when not applicable. Fixes #98880.

view details

Rob Lourens

commit sha 57c79f4c7d70d687dabfa78fd455f523278a84d2

Move data URL handling code out of preload script. Guess extension based on mimetype if 'download' isn't provided

view details

Rob Lourens

commit sha 02016869377547ca53314059422daee4fc37424f

Merge pull request #98690 from microsoft/roblou/downloadBlobUrl Support downloading blob URLs and data URLs when clicked in a notebook webview

view details

Rob Lourens

commit sha 79a1f5a5ca0c6c53db617aa1fa5a2396d2caebe2

Break infinite loop in "focus previous result". Don't run focus next/previous at all when not valid

view details

Rob Lourens

commit sha 21e43b670352ff1fdc8a75737c4ea76d5f22a916

Enforce notebook cell title menu as proposed API

view details

Benjamin Pasero

commit sha 06524e63d00a7af0a1a71af7113432687d6fc7fb

notification - add animation steps to progress (fix #97900)

view details

Benjamin Pasero

commit sha 41150cfa63f72c117c2a4c145221ca37f51ddc4c

Files: unable to "Save as.." with same name, different case (fix #98864)

view details

Benjamin Pasero

commit sha 9bc5425eaa062f4d17985b6923138603d83a3f93

working copy file service - assert delete/move/copy operations are valid before even attempting them

view details

Benjamin Pasero

commit sha 75bfdbe70692da5e0975a3e7de570b4e86eed5fe

workaround #98934 (#98936)

view details

Benjamin Pasero

commit sha 705e1ba5a9bb4230b96b072fadc567d08fe02aa5

working copy files - use URI identity service and optimize move/copy to same URI

view details

Benjamin Pasero

commit sha 781950c23e552c74473735693833b904e4c8ba92

editors - change whenClosed to use editor interface

view details

Benjamin Pasero

commit sha b0b329c1a27670400f9e1c1e0a110ee2572f158c

:lipstick: code style

view details

Benjamin Pasero

commit sha 190292e56b06505108a1ee1109a847aab0e1d7f5

a couple of URI identity related changes - adopt URI identity service in editor service - allow to open an editor with a certain URI if a model exists for that URI and not use canonical form - make sure to only accept models of identical URIs into file editor inputs upon creation

view details

Benjamin Pasero

commit sha 0b634c485da784088b3ba62d3719f17da4dba0c4

files - avoid isEqual check for doSave()

view details

Benjamin Pasero

commit sha acd3be0499d9c3d105a63024d07744c9be267238

fix bad name of service

view details

Jackson Kearl

commit sha c4df96bbef0d9b2f7984608fa22745c0194ef242

Add release pipeline action & bump actions. Closes #97536.

view details

Alex Dima

commit sha f8e068f30a6088af6c0cec73d6e5ae2b52e66e83

Fixes #98750: Do not remove all undo/redo elements when an undo/redo key is shared

view details

push time in 13 hours

issue closedmicrosoft/vscode

Notebook debt for May

A brief summary of items we didn't finish in last iteration and issues reported during endgame

  • [x] Drag & Drop #96308
  • [x] API refactoring #95854
  • [x] TextBuffer/TextModel (blocker of https://github.com/microsoft/vscode/pull/96156)
    • The idea is every CellTextModel will manage its content in ITextBuffer, which be used as the backing store for TextModel thus every edit in Monaco Editor will be updated in the text buffer immediately. Also we will have a set of TextModel like API to use even when the cell is not attached to an editor yet.
  • [x] Renderers
    • [x] acquireVSCodeApi(rendererId) in Notebook Webview #95361
    • [x] development mode API #95926
    • [x] polish hot reloading #95908, #95990
  • [ ] Working Copy (revert, hot exit)
    • [ ] revert
    • [x] hot exit
    • [x] 🔧 register working copy in NotebookTextModel other than NotebookViewModel to avoid duplicated registration #96402
  • [x] Language selector
  • [x] Undo/redo of notebook only workspace edits should be one operation
  • [ ] Composite Editor
    • [x] add isCompositeEditor context key
    • [ ] add a way to see all editors/uris of a composite editor
  • [x] revisit vscode-notebook-scheme for cell, maybe vscode-notebook-cell?

closed time in 14 hours

rebornix

issue closedmicrosoft/vscode

Should we remove the status bar of a cell when output is cleared?

After running "Clear All Cells Output", the cells still say X results, took Y.ZZsecs. I find that confusing since there are no results any more.

closed time in 14 hours

sbatten

issue commentmicrosoft/vscode

Should we remove the status bar of a cell when output is cleared?

This is doable now by extensions.

sbatten

comment created time in 14 hours

PR opened microsoft/vscode

notebook events between renderer & exthost

<!-- Thank you for submitting a Pull Request. Please:

  • Read our Pull Request guidelines: https://github.com/Microsoft/vscode/wiki/How-to-Contribute#pull-requests.
  • Associate an issue with the Pull Request.
  • Ensure that the code is up-to-date with the master branch.
  • Include a description of the proposed changes and how to test them. -->

The event flow in Notebook was not correct previously but integration tests didn't catch any bug because the events are sent between renderer & ext host really fast so most of the time, if you run a command and await for it, the editors/documents mirrors in the ext host are up to date. This is not true when the latency between the renderer and ext host are somewhat high.

This explains why we are seeing one flaky test failure with moveDown command on CI only, on which the tests might fail if the CI machine is under heavy loads.

Our web integration tests unveil the root cause of the failure: at least half of the tests failed on Web as the events are not sent to ext host from renderer in time. This PR tracks the refactoring of the event syncing of Notebook component to fix the bugs.

+222 -81

0 comment

7 changed files

pr created time in a day

push eventmicrosoft/vscode

rebornix

commit sha ff9504d7d493463ef71b080a08dd5304f6ca6a63

Fix windows file name match

view details

push time in a day

create barnchmicrosoft/vscode

branch : rebornix/notebook-events

created branch time in 2 days

push eventmicrosoft/vscode

rebornix

commit sha a537cb7370c70b2e6a9d30d917b4ddb58a8c666c

:lipstick:

view details

push time in 3 days

push eventmicrosoft/vscode

rebornix

commit sha 1a3cd6719938c07b84a47dba2bda1bcf6bf31c79

await for content change event might hide the bug.

view details

push time in 3 days

PR opened microsoft/vscode

Notebook failing test troubleshoot

<!-- Thank you for submitting a Pull Request. Please:

  • Read our Pull Request guidelines: https://github.com/Microsoft/vscode/wiki/How-to-Contribute#pull-requests.
  • Associate an issue with the Pull Request.
  • Ensure that the code is up-to-date with the master branch.
  • Include a description of the proposed changes and how to test them. -->

There is a bug with events handling of notebook moveDown command, which breaks sometimes on CI machine. We will use this PR to try to reproduce this issue and find its root cause.

+29 -9

0 comment

1 changed file

pr created time in 3 days

create barnchmicrosoft/vscode

branch : rebornix/notebook-flaky-move-cell-test

created branch time in 3 days

push eventmicrosoft/vscode

rebornix

commit sha 89b16f2c7c1c524c0eb22443fdb91816e16b3765

Fix #98036. update editor container focus when focus goes into detached notebook and outputs in webview.

view details

push time in 3 days

issue closedmicrosoft/vscode

Editor group isn't focused when notebook gets focus

  • Open two editor groups, one with a notebook and one with a text editor or empty
  • Click into the second, its editor group is focused
  • Click into the notebook, the group is not focused (the title bar is still gray)

The Composite is tracking focus on the editor container and now the notebook is outside of that. We need to signal focus manually or tell it to track a different element

https://github.com/microsoft/vscode/blob/957534cd8626395a76a82a4484e0a2cf7b056172/src/vs/workbench/browser/composite.ts#L65

closed time in 3 days

roblourens

issue commentmicrosoft/vscode

Support for custom link handler in Markdown Cell and Webviews

Moving this to June and we still need to discuss what's the right solution for this problem. Command links work well in VS Code but they are not platform agnostic.

DonJayamanne

comment created time in 3 days

push eventmicrosoft/vscode

rebornix

commit sha 56326dbd859d5e6b44fad994cd9d004da4eb26d0

base href in notebook webview.

view details

push time in 4 days

push eventmicrosoft/vscode

rebornix

commit sha 8a7b0996ba5e61a921bf3c251e000ff6b52037fb

differenciate notebook moving to new group and splitting

view details

rebornix

commit sha 5f39cbb5160bb41af0b930b3b37a9796de17e957

Merge remote-tracking branch 'origin/master' into rebornix/notebookMoveNSplit

view details

rebornix

commit sha 1e52b05cbae841a0dfc24f6abde8ac91ee2448dc

editor open in group context

view details

rebornix

commit sha 6a02064cfaeecba72d99f9c41db4693990b7a234

:lipstick:

view details

rebornix

commit sha 0ca29c58f5045228ccdb69765565f01ac318dd73

pass context to open editor.

view details

Benjamin Pasero

commit sha fb0ed655dc03d555ce74edb3c39ec9adb6342698

Merge branch 'master' into rebornix/notebookMoveNSplit

view details

rebornix

commit sha 9025542d2699d243da4f15e1106bdca4305bef26

:lipstick: enum

view details

rebornix

commit sha 8317591a5b8d68a94b4094307ca22444f1f49da6

tests :guard:

view details

rebornix

commit sha 426622cd281ec949e84453968f3a747d55423966

Merge remote-tracking branch 'origin/master' into rebornix/notebookMoveNSplit

view details

Peng Lyu

commit sha ebdff39cca7f5ee5e4ddd16e92d7fce2cce5cd93

Merge pull request #98607 from microsoft/rebornix/notebookMoveNSplit differentiate notebook moving to new group and splitting

view details

push time in 4 days

delete branch microsoft/vscode

delete branch : rebornix/notebookMoveNSplit

delete time in 4 days

PR merged microsoft/vscode

differentiate notebook moving to new group and splitting notebook

<!-- Thank you for submitting a Pull Request. Please:

  • Read our Pull Request guidelines: https://github.com/Microsoft/vscode/wiki/How-to-Contribute#pull-requests.
  • Associate an issue with the Pull Request.
  • Ensure that the code is up-to-date with the master branch.
  • Include a description of the proposed changes and how to test them. -->

@bpasero the short summary for the PR is differentiating Move Editor to New Group and Splitting Editors. Please let me know if there is any better way to archive the same thing.

Currently EditorOverride doesn't have enough information about whether users are splitting an editor or just moving an editor to another editor group. It's fine for Monaco Editor as recreating the view/models for the editor is cheap while for Notebook (and potentially any editor using webview), we can't do that as recreating a new editor means the intermediate of the webview is lost.

The workflow for moving an editor to a new group

- editorGroupView.openEditor(input, options)
  - editorOverride.open(input, options)
  - NotebookEditor.setInput()
    - new `NotebookEditorWidget`
- editorGroupView.closeEditor(input)

For moving notebook editor to a new group, we want to reuse the NotebookEditorWidget referenced in previous Notebook Editor, however we don't know if it's safe to do so as editorGroupView.closeEditor(input) happens after we create the new editor in the new group. In this PR, I tried to give this information to EditorOverride and they can decide if they should create a complete new editor or not.

+125 -39

4 comments

14 changed files

rebornix

pr closed time in 4 days

issue closedmicrosoft/vscode

Webview resource: support baseUrl and relative path

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ --> <!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ --> <!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

In webview, extensions are now converting file based URIs to vscode-webview-resource URI. It works for absolute paths but doesn't work for relative path. For example, say we have a webview which has base Url set as

<base url="vscode-webview-resource://7bec02ec-b6dc-4935-bece-581e0f5d9254/file///Users/rudi//notebook-test/test/">

and then use relative path for images


Currently it's not resolved properly. If there is baseUrl set for the web view, we may want to convert it to

vscode-webview-resource://7bec02ec-b6dc-4935-bece-581e0f5d9254/file///Users/rudi//notebook-test/test/bridge.jpg

closed time in 4 days

rebornix

issue commentmicrosoft/vscode

Webview resource: support baseUrl and relative path

oops, I used wrong attribute name, it should be href. Sorry for bothering, it works as charm.

rebornix

comment created time in 4 days

push eventmicrosoft/vscode

Martin Aeschlimann

commit sha 2e5b0824d1d3c1114a6f7fc36f9694723c86fc9c

Allow to run css language server headless

view details

Martin Aeschlimann

commit sha 5ef9b1a707376e90834ee4d196ed230af71dd3fa

[css] remove path completion (now provided by service)

view details

Martin Aeschlimann

commit sha 8fd550c1933f568d274b311ba356b6e629d4b6bc

[css] update service

view details

Martin Aeschlimann

commit sha f9bb157b093809e89f6e00827a70e65631424c2b

Merge branch 'master' into aeschli/cssheadless

view details

Martin Aeschlimann

commit sha d1a3e6ede65a3d0559b5146b6d7fdaf5a0ad4ac3

run webpack in code-dev

view details

Martin Aeschlimann

commit sha 2d47826dac4026c5e598ec2cddafc053e12dd950

Adopt LS service/client that has common & node

view details

Martin Aeschlimann

commit sha 90861d49248fb31c57004060cb9d9dabe6210f9e

Merge branch 'master' into aeschli/cssheadless

view details

Martin Aeschlimann

commit sha 3ed67bc863464ee8a1806d4c402b00bb7f409b24

add client/server browser parts

view details

Martin Aeschlimann

commit sha 32f9787b892570e6cb8e13df6a501afababb9adc

unused import

view details

Benjamin Pasero

commit sha fd0051cde72ca015166e3f6fc10af9230fcc54ec

Custom Titlebar is incomplete and not draggable (fix #98669)

view details

Sandeep Somavarapu

commit sha f676774cb7d6060dcbb540ca0480f60e4d07fbda

Revert "Revert "allow setting default tag while installing extensions"" This reverts commit 40559425c7c7219a25f148a41d678c488629a662.

view details

Sandeep Somavarapu

commit sha 1ca5155a29be48b721156780b82681ca1c35d17b

fix tests

view details

Alex Ross

commit sha 1d268b701376470bc638100fbe17d283404ac559

showCandidate should have a better name (#98566) Fixes microsoft/vscode-internalbacklog#995

view details

IllusionMH

commit sha b01ef3badeb9af5da18739aaefa4e0b3bdfa39f4

Fix debug icon. Use Codicons instead of text

view details

Miguel Solorio

commit sha 1dc2f7cb42d8c8c39775acd5020b92632799dd3f

Merge pull request #98716 from IllusionMH/fix-debug-icon-98704 Fix debug icon. Use Codicons instead of text

view details

Martin Aeschlimann

commit sha ed834bea3aa757d8936700e8701d70fca7dec2e2

web: nls for package.json

view details

Martin Aeschlimann

commit sha 1ece4c4c2549a788806913c51af2378fa002ba0a

adopt new languageserver node modules

view details

Matt Hernandez

commit sha 29183ffa2b3ff56d0993f4ed428dfdb5a7e3590a

Update distro reference. Updated to take the latest distro changes.

view details

HiDeoo

commit sha 2427bb7b6d763fa82dba56a5e2bb928f930fc34e

Fix typo in vscode.d.ts (#98692)

view details

Sandeep Somavarapu

commit sha 5b3e8dc54366998a538510a7c35acd9e792e3a6e

Fix #98726

view details

push time in 4 days

push eventmicrosoft/vscode

rebornix

commit sha 9025542d2699d243da4f15e1106bdca4305bef26

:lipstick: enum

view details

rebornix

commit sha 8317591a5b8d68a94b4094307ca22444f1f49da6

tests :guard:

view details

push time in 4 days

push eventmicrosoft/vscode

rebornix

commit sha 37a3496bb050538c67940d9c846334ecba1e032b

share undo stack between text models in a notebook. the undo stack is not shared with notebook itself yet due to #98750.

view details

push time in 4 days

issue openedmicrosoft/vscode

Undo/Redo: model dispose will clear undo stack when there are other contributors

Issue Type: <b>Bug</b>

The newly introduced registerUriComparisonKeyComputer works great for sharing undo stack between multiple text models / notebook models but the model service will try to delete the undo stack when one of the models is disposed

  • open a notebook
  • add a new cell
  • delete the cell, wait a bit
  • undo, nothing happens

The undo stack is cleared by https://github.com/microsoft/vscode/blob/master/src/vs/editor/common/services/modelServiceImpl.ts#L525

VS Code version: Code - Insiders 1.46.0-insider (876f2e70f9a2e1988887f8ca82294418afac15a2, 2020-05-27T05:41:02.088Z) OS version: Darwin x64 19.4.0 Remote OS version: Darwin x64 19.4.0

<details> <summary>System Info</summary>

Item Value
CPUs Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)
GPU Status 2d_canvas: enabled<br>flash_3d: enabled<br>flash_stage3d: enabled<br>flash_stage3d_baseline: enabled<br>gpu_compositing: enabled<br>metal: disabled_off<br>multiple_raster_threads: enabled_on<br>oop_rasterization: disabled_off<br>protected_video_decode: unavailable_off<br>rasterization: enabled<br>skia_renderer: disabled_off_ok<br>video_decode: enabled<br>viz_display_compositor: enabled_on<br>viz_hit_test_surface_layer: disabled_off_ok<br>webgl: enabled<br>webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 32.00GB (1.36GB free)
Process Argv -psn_0_3576681
Screen Reader no
VM 12%
Item Value
Remote SSH: penlv-imac
OS Darwin x64 19.4.0
CPUs Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz (8 x 6182)
Memory (System) 32.00GB (21.16GB free)
VM 0%

</details> <!-- generated by issue reporter -->

created time in 4 days

issue commentmicrosoft/vscode

Notebook renderer: state persistence

First of all, good work and I like the shape of the API in overall.

One way might be to allow users to call acquireNotebookRendererApi synchronously or with their renderer ID.

Not a fan of using document.currentScript as the namespace. Like you said above, it might not work if renderers use split bundles and it also makes it unclear what's the expected behavior when renderers generate inline scripts in outputs (as the namespace can change). acquireNotebookRendererApi(renderType) has no such problem if I understand correctly.

onDidMountCell

Currently we support rendering multiple outputs for a single cell (we might still have some layout issue with this) so we may need onDidMountCellOutput other than onDidMountCell. Also a cell can have multiple outputs rendered by different renderers.

onWillUnmount* / onDidUnmount*

Similarly, we need onWillUnmountOutput but the catch is we don't have identifiers for outputs, so we can't describe onDidUnmount* as the DOM element is then already removed from the DOM tree. Probably we can have a single event onBeforeUnmount*: Event<Uri, HTMLElement>

Not having types also makes writing this painful (currently all webview side code, including JS parts, is in an HTML template literal), maybe @eamodio's work with getting webpack bundles in our build process will help here?

The challenge is we need to inline the scripts in the HTML template as Webview iframes are hosted in another domain.

Ideally we could write the notebook API in a standalone TS file and then get it as a string in the editor code.

This can work and we did that for vs/loader.js https://github.com/microsoft/vscode/blob/master/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts#L190-L205 .

rebornix

comment created time in 5 days

issue commentmicrosoft/vscode

Can't switch between builtin and custom renderer

Actually the preload scripts is loaded as the first time it's rendered properly:

  • open test.sample notebook
  • execute cell, the custom json view is rendered
  • switch to builtin json viewer
  • switch back, now the custom output is re-rendered and the core will insert the transformed output into the webview again, however the unload inline script doesn't seem to execute
<div id="__vscode_preloads"><script src="vscode-webview-resource://4f28e183-4c2c-43b2-afc2-ddf2dd5cb8f8/file///Users/penlv/code/work/vscode-notebook-renderer-starter/out/client/index.js"></script></div>
<div id="container" class="widgetarea" style="position: absolute;width:100%;top: 0px"><div tabindex="0"></div><div id="6cfb7927-4498-4f64-8603-b72da2531f9a" style="display: block;"><div id="367cfb35-0c76-4975-8319-0a5cb0308318" style="position: absolute; top: 76px; left: 0px; width: calc(100% - 0px); min-height: 32px;">
      <script type="renderer/sample-notebook-renderer" data-mime-type="application/json" onload="(() => { debugger; window['render-notebook-sample-notebook-renderer'] &amp;&amp; window['render-notebook-sample-notebook-renderer'](document.currentScript) })()">
        {"name":"vscode-notebook-renderer-starter","displayName":"vscode-notebook-renderer-starter","description":"Notebook renderer starter template","version":"0.0.1","engines":{"vscode":"^1.44.0"},"categories":["Other"],"activationEvents":["*"],"main":"./out/extension/extension.js","enableProposedApi":true,"contributes":{"notebookOutputRenderer":[{"viewType":"sample-notebook-renderer","displayName":"Sample Notebook Renderer","mimeTypes":["application/json"]}],"notebookProvider":[{"viewType":"sample-notebook-renderer","displayName":"CPU Profile Notebook","selector":[{"filenamePattern":"*.sample"}]}]},"scripts":{"vscode:prepublish":"npm run compile","compile":"npm run compile:extension && npm run compile:client","compile:extension":"tsc -b","compile:client":"webpack --info-verbosity verbose --mode production","lint":"eslint src --ext ts","watch":"concurrently -r \"npm:watch:*\"","watch:extension":"tsc -b --watch","watch:client":"webpack --info-verbosity verbose --mode development --watch","dev":"concurrently -r npm:watch:extension npm:dev:client","dev:client":"webpack-dev-server","pretest":"npm run compile && npm run lint","test":"node ./out/test/runTest.js","updatetypes":"cd src/extension/types && vscode-dts dev && vscode-dts master"},"devDependencies":{"@types/glob":"^7.1.1","@types/mocha":"^7.0.1","@types/node":"^12.11.7","@types/webpack-env":"^1.15.2","@typescript-eslint/eslint-plugin":"^2.18.0","@typescript-eslint/parser":"^2.18.0","concurrently":"^5.1.0","css-loader":"^3.5.2","eslint":"^6.8.0","fork-ts-checker-webpack-plugin":"^4.1.3","glob":"^7.1.6","mocha":"^7.0.1","style-loader":"^1.1.4","ts-loader":"^7.0.1","typescript":"^3.7.5","vscode-notebook-error-overlay":"^1.0.1","vscode-test":"^1.3.0","webpack":"^4.43.0","webpack-cli":"^3.3.11","webpack-dev-server":"^3.10.3"}}
      </script>
    </div></div><div tabindex="0"></div></div>

Even after the first load, window['render-notebook-sample-notebook-renderer'] is always undefined.

roblourens

comment created time in 5 days

issue commentmicrosoft/vscode

Notebook output doesn't render VT-100 codes for `text/plain`

mimetype text/plain in CellOutputKind.Rich output will now support ansi colors. CellOutputKind.Text will only be displayed as plain text.

brettfo

comment created time in 5 days

push eventmicrosoft/vscode

rebornix

commit sha ce9ed171c13b3fbd236b89cdd64b47d5a0976f96

Fix #98202. support ansi colors in rich text/plain.

view details

push time in 5 days

issue closedmicrosoft/vscode

Notebook output doesn't render VT-100 codes for `text/plain`

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ --> <!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ --> <!-- Please search existing issues to avoid creating duplicates. --> <!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->

<!-- Use Help > Report Issue to prefill these. -->

  • VSCode Version: 1.46.0-insider
  • OS Version: Win10

Steps to Reproduce:

  1. Install .NET Interactive notebook extension.
  2. Open an existing file with the extension .dotnet-interactive.
  3. Set first cell contents to this and execute:
Console.Write("\x1b[38;2;0;255;0m"); // set text color to green
Console.WriteLine("green");
Console.Write("\x1b[0m"); // reset colors

<!-- Launch with code --disable-extensions to check. --> Does this issue occur when all extensions are disabled?: N/A

Expected: The output stream contains VT-100 codes to set text color that should be honored.

Jupyter notebooks properly interprets these values in the text/plain mime type.

Top image is VS Code, bottom is Jupyter: image

closed time in 5 days

brettfo

issue commentmicrosoft/vscode

Add commands to run current & below or run all above cells

  • 1 for supporting multiple selections for cell execution
-executeCell(document: NotebookDocument, cell: NotebookCell, token: CancellationToken): Promise<void>;
+executeCell(document: NotebookDocument, cells: NotebookCell[], token: CancellationToken): Promise<void>;

and the same token can be used to cancel the execution. Also if the execution involves multiple cells, we may want to show a cancel button on the editor toolbar to cancel the button.

DonJayamanne

comment created time in 5 days

push eventmicrosoft/vscode

rebornix

commit sha 914fa13e269eeef6903da3962753fcd6e5132067

support renderer and content provider registered in different extension host.

view details

rebornix

commit sha 714991ce959f0f3d1484087afd4d26013c52a98d

switch mimetype now should be done async.

view details

rebornix

commit sha 5df295d6437289498ba5912e5b889e7303a61671

Merge remote-tracking branch 'origin/master' into rebornix/multi-exthost-renderers

view details

rebornix

commit sha 8cf4a447dea97e401ddeb9c687f4ee5688a3e7b8

Merge remote-tracking branch 'origin/master' into rebornix/multi-exthost-renderers

view details

rebornix

commit sha 315807911c9503a5518b0b727b33e5b4d076ac8e

transform outputs for backup

view details

rebornix

commit sha 8bac4d17ad3693bd5059002fb90e44fac58d3e08

combine events from edits from ext host.

view details

Peng Lyu

commit sha c86d1760eae82434aee0ad406234649bf1baa47f

Merge pull request #98691 from microsoft/rebornix/multi-exthost-renderers load custom renderers when reloading from backup.

view details

push time in 5 days

delete branch microsoft/vscode

delete branch : rebornix/multi-exthost-renderers

delete time in 5 days

PR merged microsoft/vscode

load custom renderers when reloading from backup.

<!-- Thank you for submitting a Pull Request. Please:

  • Read our Pull Request guidelines: https://github.com/Microsoft/vscode/wiki/How-to-Contribute#pull-requests.
  • Associate an issue with the Pull Request.
  • Ensure that the code is up-to-date with the master branch.
  • Include a description of the proposed changes and how to test them. -->

Support running renderers in multiple ext host and loading renderers when reloading from backup.

+676 -396

0 comment

18 changed files

rebornix

pr closed time in 5 days

PR opened microsoft/vscode

load custom renderers when reloading from backup.

<!-- Thank you for submitting a Pull Request. Please:

  • Read our Pull Request guidelines: https://github.com/Microsoft/vscode/wiki/How-to-Contribute#pull-requests.
  • Associate an issue with the Pull Request.
  • Ensure that the code is up-to-date with the master branch.
  • Include a description of the proposed changes and how to test them. -->

Support running renderers in multiple ext host and loading renderers when reloading from backup.

+676 -396

0 comment

18 changed files

pr created time in 5 days

create barnchmicrosoft/vscode

branch : rebornix/multi-exthost-renderers

created branch time in 5 days

issue commentmicrosoft/vscode

Webview resource: support baseUrl and relative path

@DonJayamanne mentioned that it works in normal Webview before so I'm wondering if something changed recently in how the Webview handles resources.

rebornix

comment created time in 5 days

issue commentmicrosoft/vscode

tsserver 100% CPU

Right, I yarn after fetching master due to electron version change. Will keep an eye on this.

rebornix

comment created time in 5 days

pull request commentmicrosoft/vscode

differentiate notebook moving to new group and splitting

OpenEditorInGroupContext enum is introduced to indicate the reason how the editor is opened in the new group. We may want to extend to something like { reason, balaba } if later on we want to extend the context.

rebornix

comment created time in 5 days

push eventmicrosoft/vscode

rebornix

commit sha 0ca29c58f5045228ccdb69765565f01ac318dd73

pass context to open editor.

view details

push time in 5 days

push eventmicrosoft/vscode

João Moreno

commit sha 5edf3d10631e426db6ffd3f273b8270c47b40b46

initial steps for win32 arm64

view details

João Moreno

commit sha 13ab842239fe1ec15026beccbda40d94315b657c

fix auto trigger

view details

João Moreno

commit sha d424ff23caddce71733849a830fdfbcaabf9a28b

skip remote for win32 arm64

view details

João Moreno

commit sha 04be06ff6f1d7c1077d5f09dbe9f2cbad605c80d

fix skip remote

view details

Janis Gailis

commit sha a34e15b15f4fd68c655fd17438461a2f1b4260cc

Add terminal colors Terminal colors are taken from Monokai, with the exception for ANSI black, which is the editor background color.

view details

Benjamin Pasero

commit sha 3514e96bf5b684579a1bdabbdac9fd9dda281906

sandbox - add rules for new electron-sandbox layer

view details

Benjamin Pasero

commit sha a4a5b1f19c5e2991024aa813b12f1f6a8a4cd75e

sandbox - expose limited IPC via preload script

view details

Benjamin Pasero

commit sha c3c1a95c760e30202c44e24157f7b3075b77799b

sandbox - introduce IPC over sandbox helper

view details

Benjamin Pasero

commit sha dc8f291781000951ddbf6bea734ff7e16371ff94

sandbox - let workspaces service use sandboxed IPC

view details

Benjamin Pasero

commit sha 88af9b528f03f3d82163528c13da977a92106ec2

sandbox - make sure to use sandboxed main process service consistently in renderer

view details

Benjamin Pasero

commit sha 97f43a2fab44e72c560c79c44ff056ccd3cef0a9

sandbox - produce checksum for preload script

view details

Benjamin Pasero

commit sha 1ee6f73c9f1cdbcf5b1b33c37efab8ed6aa6aff5

sandbox - move storageKeysSyncRegistryService

view details

Benjamin Pasero

commit sha b1c12cac1046886be24009e3d47e52824df0bec7

sandbox - move menubarService

view details

Benjamin Pasero

commit sha 0565b5fc034501156f0b3e1fdbc2ba653bf68029

sandbox - move issueService

view details

Benjamin Pasero

commit sha bfe3cc05664da0b033573387378b7ac03d6e8434

sandbox - move IExtensionHostDebugService

view details

Benjamin Pasero

commit sha a5554716a0c9b1bcd3c0b0329fa356ae1647ac0c

sandbox - move updateService

view details

Benjamin Pasero

commit sha 2c2750be083ef78b58a6f3c47217aa699a5a3121

sandbox - get rid of IMainProcessService2

view details

Benjamin Pasero

commit sha 88ae7a43871d9bda8c2cc1951be8857935cab30e

sandbox - fix tests

view details

rzj17

commit sha 60d906fd579f15dafe4e6c1f584b43a4598fbfb2

Modify git add/revert to use splitInChunks

view details

Benjamin Pasero

commit sha 9c36a570c3ba587aa35a219994e00ef855dfc926

sandbox - move contextMenuService

view details

push time in 5 days

pull request commentmicrosoft/vscode

differentiate notebook moving to new group and splitting

Yes, an enum is better. I'll update the PR>

rebornix

comment created time in 5 days

issue openedmicrosoft/vscode

tsserver 100% CPU

Issue Type: <b>Bug</b>

Ran into this issue a couple of times with VS Code repo recently with TypeScript 3.9.3, the syntax only tsserver is running fine.

VS Code version: Code - Insiders 1.46.0-insider (876f2e70f9a2e1988887f8ca82294418afac15a2, 2020-05-27T05:41:02.088Z) OS version: Darwin x64 19.4.0 Remote OS version: Darwin x64 19.4.0

<details> <summary>System Info</summary>

Item Value
CPUs Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)
GPU Status 2d_canvas: enabled<br>flash_3d: enabled<br>flash_stage3d: enabled<br>flash_stage3d_baseline: enabled<br>gpu_compositing: enabled<br>metal: disabled_off<br>multiple_raster_threads: enabled_on<br>oop_rasterization: disabled_off<br>protected_video_decode: unavailable_off<br>rasterization: enabled<br>skia_renderer: disabled_off_ok<br>video_decode: enabled<br>viz_display_compositor: enabled_on<br>viz_hit_test_surface_layer: disabled_off_ok<br>webgl: enabled<br>webgl2: enabled
Load (avg) 3, 3, 3
Memory (System) 32.00GB (0.95GB free)
Process Argv -psn_0_3576681
Screen Reader no
VM 12%
Item Value
Remote SSH: penlv-imac
OS Darwin x64 19.4.0
CPUs Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz (8 x 6182)
Memory (System) 32.00GB (21.50GB free)
VM 0%

</details><details><summary>Extensions (23)</summary>

Extension Author (truncated) Version
comment-tagged-templates bie 0.3.0
github-markdown-preview bie 0.0.2
markdown-emoji bie 0.0.9
markdown-preview-github-styles bie 0.1.6
gitlens eam 10.2.1
tsl-problem-matcher eam 0.2.0
vscode-pull-request-github-insiders Git 2020.5.38341
vscode-docker ms- 1.2.1
vscode-language-pack-zh-hans MS- 1.46.0
remote-containers ms- 0.118.0
remote-ssh-edit-nightly ms- 2020.5.19620
remote-ssh-nightly ms- 2020.5.19620
js-debug-nightly ms- 2020.5.1917
powershell ms- 2020.4.0
vscode-github-issue-notebooks ms- 0.0.24
vsliveshare ms- 1.0.2236
debugger-for-chrome msj 4.12.8
kuskus-extensions-pack ros 1.0.1
kuskus-kusto-language-server ros 1.0.1
kuskus-kusto-syntax-highlighting ros 1.1.8
sourcekit-lsp unp 0.0.1
notebook-renderers vsc 1.0.0
notebook-test vsc 1.0.0

(5 theme extensions excluded)

</details> <!-- generated by issue reporter -->

created time in 6 days

pull request commentmicrosoft/vscode

differentiate notebook moving to new group and splitting

@bpasero thanks for the feedback, makes sense that we should not pollute the EditorOptions as it's widely used.

The move/copy knowledge is inside the EditorGroupView and the knowledge needs to be transferred from group to another when opening a new editor in a new group, I'd like to propose following changes, considering now how editor override works.

Firstly, the info is transferred through openEditor:

export interface IEditorGroup {
-	 openEditor(editor: IEditorInput, options?: IEditorOptions | ITextEditorOptions): Promise<IEditorPane | null>;
+        openEditor(editor: IEditorInput, options?: IEditorOptions | ITextEditorOptions, keepCopy?: boolean): Promise<IEditorPane | null>;
}

and then we pass the info to editorOverrides

async openEditor(editor: EditorInput, options?: EditorOptions, keepCopy?: boolean): Promise<IEditorPane | null> {

		// Guard against invalid inputs
		if (!editor) {
			return null;
		}

		// Editor opening event allows for prevention
-		const event = new EditorOpeningEvent(this._group.id, editor, options);
+		const event = new EditorOpeningEvent(this._group.id, editor, options, keepCopy);
		this._onWillOpenEditor.fire(event);
		const prevented = event.isPrevented();
		if (prevented) {
			return withUndefinedAsNull(await prevented());
		}

		// Proceed with opening
		return withUndefinedAsNull(await this.doOpenEditor(editor, options));
	}

and lastly this._onWillOpenEditor.fire(event); will trigger the editor overrides, which is the current design.

@bpasero how do you like it now? The challenge here is editor overrides are triggered when an editor is opened in the group view (through onWillOpenEditor event), it means that the group needs to know that if an editor is "move" or "copy".

rebornix

comment created time in 6 days

push eventmicrosoft/vscode

rebornix

commit sha 9ae8d33358e97a8d2b630912d0017d105b4e484c

disable second move down.

view details

push time in 6 days

issue commentmicrosoft/vscode

Notebook output doesn't render VT-100 codes for `text/plain`

We do support ansi colors with Error output, which is supported by https://github.com/microsoft/vscode/blob/master/src/vs/workbench/contrib/notebook/browser/view/output/transforms/errorTransform.ts#L54 . We can use the same transformer for text/plain mime type.

brettfo

comment created time in 6 days

Pull request review commentmicrosoft/vscode

differentiate notebook moving to new group and splitting

 export class NotebookContribution extends Disposable implements IWorkbenchContri 				const copiedInput = this.instantiationService.createInstance(NotebookEditorInput, originalInput.resource, originalInput.name, originalInput.viewType); 				copiedInput.updateGroup(group.id); -				// transfer ownership of editor widget-				// const widgetRef = NotebookRegistry.getNotebookEditorWidget(originalInput);-				// if (widgetRef) {-				// 	NotebookRegistry.releaseNotebookEditorWidget(originalInput);-				// 	NotebookRegistry.claimNotebookEditorWidget(copiedInput, widgetRef);-				// }+				if (!options?.shouldCreateNewWhenOverride) {

@bpasero here we check if it's splitting or moving by reading shouldCreateNewWhenOverride, if it's just moving the editor, the new editor input will claim ownership of the NotebookEditorWidget (which is a detached DOM node). Write

rebornix

comment created time in 6 days

PR opened microsoft/vscode

differentiate notebook moving to new group and splitting

<!-- Thank you for submitting a Pull Request. Please:

  • Read our Pull Request guidelines: https://github.com/Microsoft/vscode/wiki/How-to-Contribute#pull-requests.
  • Associate an issue with the Pull Request.
  • Ensure that the code is up-to-date with the master branch.
  • Include a description of the proposed changes and how to test them. -->

@bpasero the short summary for the PR is differentiating Move Editor to New Group and Splitting Editors. Please let me know if there is any better way to archive the same thing.

Currently EditorOverride doesn't have enough information about whether users are splitting an editor or just moving an editor to another editor group. It's fine for Monaco Editor as recreating the view/models for the editor is cheap while for Notebook (and potentially any editor using webview), we can't do that as recreating a new editor means the intermediate of the webview is lost.

The workflow for moving an editor to a new group

- editorGroupView.openEditor(input, options)
  - editorOverride.open(input, options)
  - NotebookEditor.setInput()
    - new `NotebookEditorWidget`
- editorGroupView.closeEditor(input)

For moving notebook editor to a new group, we want to reuse the NotebookEditorWidget referenced in previous Notebook Editor, however we don't know if it's safe to do so as editorGroupView.closeEditor(input) happens after we create the new editor in the new group. In this PR, I tried to give this information to EditorOverride and they can decide if they should create a complete new editor or not.

+60 -19

0 comment

8 changed files

pr created time in 6 days

create barnchmicrosoft/vscode

branch : rebornix/notebookMoveNSplit

created branch time in 6 days

push eventmicrosoft/vscode

rebornix

commit sha 56393440fbed29946cb38ba737302d9021f7ae57

add error messages for notebook workflow integration tests.

view details

push time in 7 days

push eventmicrosoft/vscode

rebornix

commit sha b26e0bcf39c1b8faaf770265391b5a387d1d9172

send out missing selection change event when moving cells.

view details

push time in 7 days

push eventmicrosoft/vscode

rebornix

commit sha 8687508aa689b1f16d5f6ff317eb25bcf4544586

avoid content override when updating local resource roots.

view details

push time in 7 days

issue openedmicrosoft/vscode

Webview resource: support baseUrl and relative path

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ --> <!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ --> <!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

In webview, extensions are now converting file based URIs to vscode-webview-resource URI. It works for absolute paths but doesn't work for relative path. For example, say we have a webview which has base Url set as

<base url="vscode-webview-resource://7bec02ec-b6dc-4935-bece-581e0f5d9254/file///Users/rudi//notebook-test/test/">

and then use relative path for images


Currently it's not resolved properly. If there is baseUrl set for the web view, we may want to convert it to

vscode-webview-resource://7bec02ec-b6dc-4935-bece-581e0f5d9254/file///Users/rudi//notebook-test/test/bridge.jpg

created time in 7 days

create barnchrebornix/Vim

branch : rebornix/nodelss

created branch time in 7 days

issue commentmicrosoft/vscode

Web: broken Notebooks smoketests

It seems @roblourens pushed some fixes https://github.com/microsoft/vscode/commit/b877c4d411d0e2e08d6fccb75faf8471838426be

bpasero

comment created time in 7 days

issue commentmicrosoft/vscode

Web: broken Notebooks smoketests

Thanks for the ping. I checked the release history and found that we didn't have a build which passed the web smoke test ever. The error timeout 'quick-input-widget' doesn't seem to be notebook logic related, I guess it's due to how the notebook document is being opened (but never finishes successfully).

Tried to debug this issue but didn't get web smoke test running locally, things I tried

  • distro branch, yarn gulp vscode-reh-web-darwin
  • switch to master branch
  • VSCODE_REMOTE_SERVER_PATH=/Users/penlv/code/vscode-reh-web-darwin VSCODE_DEV=1 yarn smoketest --web

and then I kept seeing error

refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' https://az416426.vo.msecnd.net 'unsafe-eval' https: 'sha256-UDiEJoRBTqdFzC+PxQOVuk7jNe7IZzGHJIl9OFBHyCE='". Either the 'unsafe-inline' keyword, a hash ('sha256-5PEzOFm7Jc8UuC0tkwsErHIw36A1igTT942G8MD5G+w='), or a nonce ('nonce-...') is required to enable inline execution.

semver-umd.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)

Also in the HTML, the semver-umd script is referenced as

<link rel="prefetch" href="./semver-umd.js">

which is different from what I saw in https://github.com/microsoft/vscode/blob/master/src/vs/code/browser/workbench/workbench.html#L22

@bpasero do you know how to test this locally without above errors? it is even better if you can share how to troubleshoot the web smoke test.

bpasero

comment created time in 7 days

startedLision/WKWebViewJavascriptBridge

started time in 8 days

issue commentmicrosoft/vscode

Feedback on Notebook Extension API

It feels slightly awkward to ask vscode.notebook.visibleNotebookEditors.find(…) in the render() method… if I don't have the NotebookEditor available at that point, I won't be able to create the asWebviewUri, so could that be passed in as a parameter?

@darknoon good catch, the render API was designed before we introduced the messaging channel on the NotebookEditor. It's better to pass in NotebookEditor other than NotebookDocument though I'm not sure if that would be the final decision. We might go with passing in a comm object which allows you to convert Uri and communicate with the webview in the editor, other than exposing the message channel to every one in the extension host.

darknoon

comment created time in 11 days

issue commentmicrosoft/vscode

Feedback on Notebook Extension API

@darknoon thanks for your insightful feedback, good work! We will create issues for the bugs / ux feedback later on, now I can answer a few questions posted above to unblock you from continuing your exploration with our API


There doesn't seem to be a way to track changes to notebook cells before they are executed (is this meant to be handled by language extensions instead?). For example, it would be cool to provide speculative execution à la Chrome's console.

Currently cells in a notebook document will be opened as normal text editor once it's rendered or its content is modified. That means you can listen to vscode.workspace.onDidOpenTextDocument, etc to access its content.

Since an Observable notebook will continue executing and returning results, maybe should have an API to choose whether document is dirtied by continued output

Yes it's part of our plan to allow extensions to control if outputs can make the editor dirty.

How do I attach DevTools to the Webview that is hosting the cell outputs? It was annoying to be flying blind as to what is happening with outputs.

F1 -> Developer: Open Webview Developer Tools

Notebook open/close events weren't being called

Right, it's fixed in latest Insiders

Have been using Map<Cell, MyObject> to do internal bookkeeping, is this safe in general? I noticed that the Julia code is using Uri.toString()

NotebookCell.uri can be used as the unique ID for a cell during one session (before the editor is closed completely or the window is reloaded).

Can this work with remote development

Yes, almost. We currently don't support running custom renderer as a UI extension and running the notebook content provider in remote. It's a bug since we are now handling output transformation in ext host. The fix will come next week.

Syncing outputs with webviews

Good questions and I can understand the pain you went through to make it work properly. Right now we didn't introduce any life cycle concept yet to the renderers (@connor4312 has good proposals for it https://github.com/microsoft/vscode/issues/95361#issuecomment-630925871), thus the renderer needs to solve the racing between preload scripts loading and output evaluation.

THe catch here is the scripts loading are handled by the browser, and we (vscode core) don't know if the initialization of the preload scripts are done or not. The pattern we use right now is

# preload scripts
(function () {
    ...
    initialization() ...
    window.observeCell = () => { ... }
    // search for all cells are not rendered yet
    cells.forEach(cell => observeCell(cell))
})();

# output cell

if (window.observeCell) { window.observeCell(cell)}
darknoon

comment created time in 12 days

push eventmicrosoft/notebook-extension-samples

rebornix

commit sha b2ac4925d7e02ffeb153fbf84f2a5d92cc0527fb

Revert "load ipywidgets as kernel preloads" This reverts commit 1da34c79a7d58405081012fb0ed4f7ea0403a777.

view details

push time in 12 days

push eventmicrosoft/vscode

rebornix

commit sha dfb4dbe9618df37c77bc8c93de9e892a30b23ec6

restore notebook state after test.

view details

push time in 12 days

push eventmicrosoft/vscode

rebornix

commit sha efec95c760151c56398dc2d0555f23fdfcdc4f67

allow workspace folder in notebook webview.

view details

push time in 12 days

push eventmicrosoft/notebook-extension-samples

rebornix

commit sha 1da34c79a7d58405081012fb0ed4f7ea0403a777

load ipywidgets as kernel preloads

view details

push time in 12 days

more