cmoog / vscode-sql-notebook

Open SQL files as VSCode Notebooks.
https://marketplace.visualstudio.com/items?itemName=cmoog.sqlnotebook
MIT License
120 stars 16 forks source link

Data table extension #37

Closed RollsChris closed 8 months ago

RollsChris commented 2 years ago

Work for integrating data table extension:

File effected: package.json controller.js

thanks

RollsChris commented 2 years ago

Sorry it got confusing and found it easier to start again ;) didnt realise PR would cancel.

i think someone needs to sort the gitignore file out.. it shows a lot of build output as change.

Thanks

cmoog commented 2 years ago

i think someone needs to sort the gitignore file out.. it shows a lot of build output as change.

If you run rm -rf ./out from the project root, everything should be cleaned up. Otherwise, try a fresh clone.

RollsChris commented 2 years ago

could just ignore them lol

cmoog commented 2 years ago

./out is an artifact of the previous build scripts and only exists because you were building an old commit.

RollsChris commented 2 years ago

ok yea i understand

cmoog commented 2 years ago

Is there a vscode api for checking whether an extension is installed? I'm wondering if we can avoid the strict requirement on this data table extension by changing our presentation behavior based on whether the user has it installed already or not...

cmoog commented 2 years ago

Also, I'm noticing some cases where the presentation is strictly worse. For instance, checkout the before/after below:

Screen Shot 2022-03-31 at 4 16 42 PM Screen Shot 2022-03-31 at 4 15 25 PM

I'll have some time this weekend to do a deep dive and see if we can close the gap on some of these tradeoffs.

RollsChris commented 2 years ago

I was thinking the same.. but i don't know. hold fire then and ill take a look if you like.

I can see that.. not an issue for me really if it means we get all the other features?

I haven't really played around with it that much, I'm pushing to get it in a bit fast because I'm fed of getting what i need by running it locally lol but lets do it properly

RollsChris commented 2 years ago

these notebooks have it implemented already if you want to check some out and let me know what features you like?:

REST Book 📓 Python 🐍 TypeScript Notebook 📓 .NET Interactive Notebook 📓 and Pyolite 🐍 Notebook Examples 📚

jwhitaker-swiftnav commented 1 year ago

I think the VSCode notebook API allows multiple formats for a single output - if that works how I think it does, could vscode-sql-notebook just provide both 'text/markdown' for its own, and 'application/json' (or whatever) for DataTable? That way users can switch between the two as needed on a per-cell basis, and it wouldn't be such a big deal if DataTable is occasionally worse.

cmoog commented 8 months ago

Release 0.7.0 includes support for JSON cell output. It now should be possible to leverage any extension that registers a JSON media type cell renderer. Full release notes here: https://github.com/cmoog/vscode-sql-notebook/releases/tag/v0.7.0