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

Execute the addins in interactive mode #2350

Merged
merged 3 commits into from
May 5, 2021
Merged

Execute the addins in interactive mode #2350

merged 3 commits into from
May 5, 2021

Conversation

jennybc
Copy link
Member

@jennybc jennybc commented May 1, 2021

I prefer the user experience this offers. I feel better oriented and informed about what command I actually invoked and how things are going.

And even, morally, it seems fitting to use Interactive: true for these:

https://rstudio.github.io/rstudioaddins/#execution-modes

The Interactive field within the addin registration describes whether the addin is interactive or non-interactive. It’s important to understand when an addin should be declared as interactive versus non-interactive, as this effects how RStudio will attempt to execute the addin:

  • Interactive addins are invoked by emitting a call to their function directly into the R console. For addins that display user-interface (e.g. using a Shiny application) this enables users to stop/interrupt them.

  • Non-interactive addins are run in the background and can not be interrupted, so it’s imperative that these addins complete execution quickly. Otherwise, it’s possible that your addin could freeze the user’s R session.

The use case for non-interactive addins is typically simple text insertion or transformation, in which case users would be annoyed if each invocation resulted in code being inserted into the console.

@jennybc
Copy link
Member Author

jennybc commented May 1, 2021

Also added small tweak to the error message. Probably influenced by the boatload of error messages I've written lately, even though I can't style it (yet).

@jimhester jimhester merged commit f5dc632 into master May 5, 2021
@jimhester jimhester deleted the addin-interactive branch May 5, 2021 12:41
@jimhester
Copy link
Member

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants