rstudio / shiny

Easy interactive web applications with R
http://shiny.rstudio.com
Other
5.31k stars 1.87k forks source link

`runExample()` improvements #3907

Open schloerke opened 9 months ago

schloerke commented 9 months 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 3 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 3 months ago

I think this can be closed now?

gadenbuie commented 3 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.