Is there a way of showing a progress indicator?

Hi,

I'm trying to develop a Joplin plugin that takes the selected text and sends it to a remote service for feedback. This is a long-running process of indeterminate time.

  • What's the best way of showing a progress indicator in a Joplin extension?
  • Is there a way of locking user input during this process?

Unfortunately no, there is no status bar or somthing similar to show the progress. Only a plugin panle. But I find this too much for just one piece of status when the user should able to work.

I mean there was the possibility to display a module dialogue like during import... But I'm no longer sure and would have to read the API documentation again first.

Thanks Jack.

Do you know if it is possble to do this with a dialog? I'd need to be able to close it from the same context as the dialog is opened once the work has completed, but I don't know if that is possible.

S

I'm guessing you want to play ChatGPT API.

Exactly. I've been using it with VS Code to do much the same. e.g. I just chuck in prompts that make the selection for e.g. "more sarcastic." Best use case for ChatGPT I've found so far.

I'm also playing with it and it feels fun and has a lot of potential. I think you could develop a plugin for Joplin that replicates Notion's AI features.

Yes. Used for the right things it's an extraordinary technology. The press on ChatGPT has been a bit exhausting - and misguided in my opinion.

Anyway, back to the problem at hand, I'm still struggling a bit. Here's where I'm up to:

  • I can show either a panel or a dialog with a spinner to show progress. The latter option works best, because it locks the interface, and therefore the selection (sort of) while processing is active.
  • However I'm unable to work out how I can shut the dialog once the activity is complete.

I did wonder if the best way of getting this to work would actually to be to make the remote call in the dialog itself in a script tag, then submit the dialog form once the activity is complete. Seems a bit hacky though.

Am I missing a better way?

Do you know of any other extension examples that need to wait on a long-running activity before returning to the UI?