vscode-data-preview icon indicating copy to clipboard operation
vscode-data-preview copied to clipboard

Enable as a web extension?

Open whilp opened this issue 4 years ago • 3 comments

It would be amazing to view and edit data files without a heavy installation. I imagine some of the dependencies here would make it hard to fully enable this extension for the web. But perhaps a useful subset could still be exposed?

https://code.visualstudio.com/api/extension-guides/web-extensions

whilp avatar Nov 20 '21 18:11 whilp

yeah, this extension is grossly out of date, and updating it to work with new https://vscode.dev in a browser might require some elbow grease.

I am starting to work on a simpler tabular data viewer next week and will consider making it work in a browser too:

https://github.com/RandomFractals/tabular-data-viewer

RandomFractals avatar Nov 20 '21 20:11 RandomFractals

@RandomFractals I just went through this exercise in Marquee. Maybe this helps to get some inspirations. Main tasks were:

  • create additional webpack bundle
  • replace fs with vscode.workspace.fs where ever possible (and if not use if (globalThis.process) { ... } to exclude the code from the web extension bundle)
  • load webview template via vscode.workspace.fs or bundle it with your extension

christian-bromann avatar Feb 15 '22 10:02 christian-bromann

@christian-bromann yes, I am familiar with the steps. I might do it eventually in this or the new tabular data viewer extension. I still think the number of devs using it in a web editor is a much smaller audience, and there are other simpler extensions that show data grids in the new web editor version.

Btw, your Marquee dash is really cool! I played with it a bit and liked it a lot. Probably the first dash for vscode devs that I actually enjoyed using and exploring the code behind.

RandomFractals avatar Feb 15 '22 13:02 RandomFractals