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

Better handle markup rendering errors in notebooks #161153

Merged
merged 1 commit into from
Sep 19, 2022

Conversation

mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented Sep 16, 2022

Show an error to users if rendering of markup items fail. Previously when a renderer fails to load or render, we would not show any user facing errors (and would sometimes prevent the entire notebook from loading)

Show an error to users if rendering of markup items fail. Previously when a renderer fails to load or render, we would not show any user facing errors (and would sometimes prevent the entire notebook from loading)
@mjbvz mjbvz added this to the September 2022 milestone Sep 16, 2022
@mjbvz mjbvz self-assigned this Sep 16, 2022
@mjbvz mjbvz enabled auto-merge (squash) September 16, 2022 23:20
@@ -716,8 +716,18 @@ async function webviewPreloads(ctx: PreloadContext) {
};
}

function showPreloadErrors(outputNode: HTMLElement, ...errors: readonly Error[]) {
outputNode.innerText = `Error loading preloads:`;
async function renderOutputItem(rendererApi: rendererApi.RendererApi, rendererId: string, item: rendererApi.OutputItem, element: HTMLElement, signal: AbortSignal) {
Copy link
Collaborator Author

@mjbvz mjbvz Sep 16, 2022

Choose a reason for hiding this comment

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

Eventually I'm planning to have both markup and output elements go through the same rendering pipeline

For legacy reasons, we currently have two pipelines that do different things. This PR gets them to be a little more similar

@mjbvz mjbvz changed the title Better handle markup rendering errors in noetebooks Better handle markup rendering errors in notebooks Sep 16, 2022
@mjbvz mjbvz merged commit 3f92eb6 into microsoft:main Sep 19, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants