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

Running XPath notebooks in CodeSpaces #5

Open
RandomFractals opened this issue Jul 31, 2021 · 3 comments
Open

Running XPath notebooks in CodeSpaces #5

RandomFractals opened this issue Jul 31, 2021 · 3 comments

Comments

@RandomFractals
Copy link

RandomFractals commented Jul 31, 2021

might need more fs fixing for CodeSpaces. Are you using workspace.fs to load your built-in XSLT stylesheets?

xpath-code-spaces

potentially related to #4

Altho it works on Windows now. see: #2 (comment)

@pgfearo
Copy link
Member

pgfearo commented Aug 1, 2021

As CodeSpaces on GitHub is still in Beta (and I haven't signed up for it yet) I'm inclined to defer investigation of this.

Are you suggesting that I need to use workspace.fs? I haven't had much success in the past with figuring out how to process URIs that do not have the file:: scheme - so have much to learn. VS Code documentation seems to be a bit sparse here.

@pgfearo
Copy link
Member

pgfearo commented Aug 1, 2021

This VS Code Remote Repositories may be useful for reference.

@RandomFractals
Copy link
Author

RandomFractals commented Aug 1, 2021

@pgfearo you probably don't need that.

However, you do need to make sure you use path.join to construct file path for your built-in stylesheets to ensure they load properly on different platforms and operating systems.

Example:

    const extensionPath: string = _context.asAbsolutePath('./');
		if (notebookUrl) {
			const notebookUri: Uri =  Uri.file(path.join(extensionPath, notebookUrl));
			// open data table example notebook
			commands.executeCommand(constants.VSCodeOpenCommand, notebookUri);	
		}
	}

You can find more info on that feature I just added here: RandomFractals/vscode-data-table#75

I've used similar setup in Vega Viewer and Geo Data Viewer and have not seen any complaints from devs on different platforms.

so, that's the alternative if you don't want to use workspace.fs just yet. Altho, that api is fairly stable and been around for some time now.

Btw, you can use that built-in notebooks example setup for your examples if you'd like. should be easy copy and paste of the setup I just created in my data table extension.

Here is a pic of that notebook examples quick pick list feature:

data-table-notebook-examples

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

No branches or pull requests

2 participants