RoamJS / developer

MIT License
2 stars 1 forks source link

Invoke sparql from live code block #6

Open dvargas92495 opened 1 year ago

kvistgaard commented 1 year ago

See a full description here

mdroidian commented 1 year ago

Ah, so would you want something like a button on the Sparql code block? And the results to be outputted as children of the code block?

image

kvistgaard commented 1 year ago

Not really. And better not. Running it from the command pallette should be fine and whoever wants will make a custom hotkey.

On Sun, 22 Oct 2023, 20:19 Michael Gartner, @.***> wrote:

Ah, so would you want something like a button on the Sparql code block? And the results to be outputted as children of the code block?

[image: image] https://user-images.githubusercontent.com/3792666/277183368-d4d343af-6a8c-4460-b0a0-250b108911bc.png

— Reply to this email directly, view it on GitHub https://github.com/RoamJS/developer/issues/6#issuecomment-1774163095, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZYZ4PDTYPHI4J5ZQKRRL3YAVPR5AVCNFSM6AAAAAAUR4CEFGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZUGE3DGMBZGU . You are receiving this because you commented.Message ID: @.***>

mdroidian commented 1 year ago

Alright. So I added a new command Run SPARQL Query: Custom

This will load to the Custom Query page initially and grab the last edited sparql code block from the current page.

What left would then be:

EDIT: added tasks

Hopefully this will be helpful in the interim.

https://www.loom.com/share/5ad18cdec7164697893e3c698acf4131

kvistgaard commented 1 year ago

Wouldn't it be easier to run the command when the cursor is on the query block or its parent?

In addition, it would be nice to be able to start it from the block menu as is the case with some other extensions.

image

BTW, what do you mean by

import endpoint / output format with command

mdroidian commented 1 year ago

Wouldn't it be easier to run the command when the cursor is on the query block or its parent?

Depends on the use case, I guess. I believe currently it imports at the cursor position, so if one wanted to import at a different block than the sparql code block, that functionality would be lost. But I'd be happy to add this feature to the list.

In addition, it would be nice to be able to start it from the block menu as is the case with some other extensions.

This can be added to the list as well.

import endpoint / output format with command

This was referring to grabbing the endpoint from a comment in the sparql query block and updating the endpoint in the dialog