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

Add some guidance to user regarding interactive documents #2564

Open
cderv opened this issue Jul 24, 2024 · 4 comments
Open

Add some guidance to user regarding interactive documents #2564

cderv opened this issue Jul 24, 2024 · 4 comments
Labels
documentation theme: shiny regarding shiny support in R Markdown document

Comments

@cderv
Copy link
Collaborator

cderv commented Jul 24, 2024

The runtime: shiny vs runtime: shinyrmd distinction is really subtle for someone writing interactive documents.

There are examples where a server.R and ui.Rmd but use runtime: shiny rather than runtime: shinyrmd.

We could add context to rmarkdown::run to understand if the wrong runtime has been specified and guide the user.

Especially:

  • server.R + ui.Rmd should always mean runtime: shinyrmd
  • server: shiny should be used now (instead of runtime: shinyrmd

Adding this note to log and remember this possible improvement.

@cderv cderv added the theme: shiny regarding shiny support in R Markdown document label Jul 24, 2024
@vpag
Copy link

vpag commented Jan 9, 2025

server: shiny should be used now (instead of runtime: shinyrmd)

Why should? (Did you mean "server: shiny_prerendered... instead of... shinyrmd", or maybe some deprecations/changes are coming to prerendering-related technique, or smth. else?)

@cderv
Copy link
Collaborator Author

cderv commented Jan 10, 2025

I think what I meant was "should recommend" to avoid confusion. And also because on Quarto side, only server: shiny is supported. https://quarto.org/docs/interactive/shiny/

(Did you mean "server: shiny_prerendered... instead of... shinyrmd"

No I meant server: shiny. server: shiny_prerendered does not exist. runtime: shiny_prerendered is equivalent to runtime: shinyrmd.

All this is just several ways to do things. It was introduced through time and can lead to confusion now.

On rmarkdown side, there is no deprecation. So using runtime: shinyrmd works. However, for document rendered through Quarto, then server: shiny is expected.

What does not for sure is using server.R + ui.Rmd and not using server: shiny.

Anyhow, this is documentation improvement mainly.

No change coming.

@vpag
Copy link

vpag commented Jan 10, 2025

Ok, so that is for code style, I see.

With a bit of misunderstanding of "...only server: shiny is supported" -- I've just got the same html-output for both (server: shiny and runtime: shiny_prerendered) variants with quarto render|serve. Also, as per conditions evaluated at is_shiny_prerendered(), seems like all of those fronmatter options are equivalent for Rmd/qmd, if I'm not missing some case.

And for now, anyway,

On rmarkdown side, there is no deprecation.
No change coming.

Superb. Thanks!

@cderv
Copy link
Collaborator Author

cderv commented Jan 14, 2025

I've just got the same html-output for both (server: shiny and runtime: shiny_prerendered) variants with quarto render|serve.

Internally code is the same. On Quarto side, we do check only for server and not runtime. So some processing or checks on Quarto code can be missed if you use runtime with Quarto. And we don't document it.

Anyhow, I labelled it documentation issue anyway. Thanks a lot for your question to help us improve!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation theme: shiny regarding shiny support in R Markdown document
Projects
None yet
Development

No branches or pull requests

2 participants