Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Didact tutorial doesn't reload when reloading VS Code window #133

Closed
alexweininger opened this issue Jun 18, 2020 · 17 comments
Closed

Didact tutorial doesn't reload when reloading VS Code window #133

alexweininger opened this issue Jun 18, 2020 · 17 comments

Comments

@alexweininger
Copy link
Contributor

Repro steps:

  1. Start didact tutorial
  2. Reload VS Code window (Command pallet > reload VS Code window)

Expected behavior:
The didact tutorial resumes and is displayed

Actual behavior:
Blank webview:
image

@bfitzpat
Copy link
Collaborator

Just to confirm... We're talking about this command? workbench.action.reloadWindow?

image

@bfitzpat
Copy link
Collaborator

Can you provide a bit more of a reproducible case? I definitely see that the stylesheet isn't loaded properly when I do this on a "registered" tutorial.

Are you trying this with a preview? i.e. you have a didact file you're editing, you open a preview window (Open preview Ctrl+Shift+V)

Just trying to come up with an accurate set of reproduction steps @alexweininger

Thanks in advance!

@alexweininger
Copy link
Contributor Author

By start didact tutorial I mean I am clicking the "Start" button in the Didact tutorials pane here:
image

@bfitzpat
Copy link
Collaborator

That's fine. I'm just not sure how you're "reloading" the tutorial. Obviously it's a registered tutorial if you're going from the view. What command are you then using to reload it?

@alexweininger
Copy link
Contributor Author

I am reloading the VS Code window. I'm doing this by going to the command pallet (F1) and then typing "Reload Window" and selecting the "Developer: Reload Window" item from the item picker.

@bfitzpat
Copy link
Collaborator

Interesting. I'll see if I can duplicate.

@bfitzpat
Copy link
Collaborator

@alexweininger I am unable to reproduce here with the Didact examples that are registered. Could it be something local? What version of vscode are you using? Insiders? Or the current public one?

@alexweininger
Copy link
Contributor Author

@bfitzpat

Hmm. I actually think it's only happening when I start the tutorial via our code.

like so:

const tutorialUri: Uri = Uri.file(ext.context.asAbsolutePath('resources/TrialApp.didact.md'));
commands.executeCommand('vscode.didact.startDidact', tutorialUri, ViewColumn.Two);

I am on the current VS Code Insiders build.

@bfitzpat
Copy link
Collaborator

We try to stick with the latest public build (for stability issues) but I will give that a shot here -- currently updating to 1.46.1 and will see if I can dupe.

@bfitzpat
Copy link
Collaborator

I am unable to duplicate it locally with 1.46.1...

I created a new command...

	context.subscriptions.push(vscode.commands.registerCommand('didact.dothething', () => {
		const testUri: vscode.Uri = vscode.Uri.file(context.asAbsolutePath('demos/markdown/simple-example.didact.md'));
		vscode.commands.executeCommand('vscode.didact.startDidact', testUri, vscode.ViewColumn.Two);
	}));

And exposed it via package.json

			{
				"command" : "didact.dothething",
				"title": "Didact Do The Thing"
			}

And you can see in the gif that I am calling my new command and then calling the Reload Window command.

issue133

Is there something else in your workspace conflicting somehow? Something that contributes something for markdown? Or some change in the insiders build that's messing things up?

@bfitzpat
Copy link
Collaborator

@alexweininger

Also note that I'm on a variation of Ubuntu linux, not Windows, so that may also be a contributing factor. I'd be curious to see what happens when you switch to the stable version of VS Code however??

@alexweininger
Copy link
Contributor Author

alexweininger commented Jun 23, 2020

@bfitzpat Testing on stable, and I'm not getting the bug anymore. I've also had this bug on Mac and Windows (Insiders)

@bfitzpat
Copy link
Collaborator

At least it's consistent across all Insiders builds. :) (I know, small consolation.) I wonder what's changed that's causing issues?

@alexweininger
Copy link
Contributor Author

It seems like it could be an issue with how didact is caching?

@alexweininger
Copy link
Contributor Author

alexweininger commented Jun 23, 2020

@bfitzpat A teammate of mine informed me that the VS Code team was having issues with webviews on the Insiders release today. (they broke something). So if our problem isn't fixed tomorrow or the next day then I think we should re-investigate.

Here is one of the related issues:
microsoft/vscode#100740

@bfitzpat
Copy link
Collaborator

So if our problem isn't fixed tomorrow or the next day then I think we should re-investigate.

Sounds good!

@bfitzpat
Copy link
Collaborator

bfitzpat commented Jul 6, 2020

@alexweininger - going to consider this closed unless I hear otherwise. Feel free to re-open if it's still a problem.

@bfitzpat bfitzpat closed this as completed Jul 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants