-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
[idea] use Shinylive in pkg docs #1404
Comments
Closes #1404 Note that the shinylive R apps will be broken till the `teal` is released on CRAN because we are unable to use the dev version of the packages from pharmaverse.r-universe because the webr binaries build there are only compatible with the [webr REPL](https://webr.r-wasm.org/latest/) and not the [shinylive](https://shinylive.io/r/examples/) yet.
Hey @vedhav, thanks for the PR. That was a great job. However, I'm still missing shinylive implementation in two places that are important especially for the new comers - it is README and getting started vignette. Would you mind adding this there as well so that we can close it for good? Thanks! |
Sure, I can add it in the getting started vignette. GitHub |
I'm typing on the phone so can't check it myself - does markdown support raw html? Maybe this way? Just a thought |
I would suggest creating README.Rmd file, that has a knitr chunk with below setting:
so it is added only during the PKGDOWN build of docs. Copied from the other places where we have more options for roxyshinylive. {r shinylive_iframe_1, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = requireNamespace("roxy.shinylive", quietly = TRUE) && knitr::is_html_output() && identical(Sys.getenv("IN_PKGDOWN"), "true")} README.Rmd would require a new github automation which renders this file to README.md, each time README.Rmd is changed. Optionally a git hook preventing to change README.md manually. Something similar that we have for rendering documentation. |
Good idea! I was actually thinking about something simpler with hardcoded url (because I would probably not expect changes in the app code) but if you can do this via |
This is an idea that I would let you refine it better.
I would love to see the documentation (README, vignettes, function reference, etc.) more interactive using Shinylive.
Recently we created a small tool for that purpose
roxy.shinylive
. Feel free to use it. It's already in the modules packages and I think it's robust enough to be implemented in the core packages.The text was updated successfully, but these errors were encountered: