rstudio / shiny

Easy interactive web applications with R
https://shiny.posit.co/
Other
5.38k stars 1.86k forks source link

`runExample()` improvements #3907

Open schloerke opened 1 year ago

schloerke commented 1 year ago

Prior PR https://github.com/rstudio/shiny/pull/1458 that sparked conversation. (Note: PR closed when HEAD branch was moved.)

Goal

Adopt some plumber::plumb_api() functionality for shiny::runExample():

Code to alter from:

gadenbuie commented 8 months ago

This issue proposes shiny as the directoy

  • Use "shiny" as subfolder within inst to distinguish from generically named "examples" folder

In #3917, Karan used shiny-examples

https://github.com/rstudio/shiny/blob/e0d67873830e09465f05925970abc81fb129ca90/R/run-example.R#L80

and I generally agree with him -- but I think we should name this folder examples-shiny.

I think shiny is too generic and there are lots of reasons someone might want to include a bare shiny folder in their package. But examples-shiny sorts with the original examples folder and makes its purpose very clear.

cpsievert commented 8 months ago

I think this can be closed now?

gadenbuie commented 8 months ago

I think this can be closed now?

I thought there was still some planned work around user conveniences. My implementation was kind of bare-bones compared to what Karan had started.