Feature description
The current logic of roxy.shinylive is to generate the app link with the code hash and embed the iframe link of the shinylive.io website with this code.
The problem with this logic is that we are heavily dependent with the deployed shinylive.io website rather than the shinylive R package which is the main package responsible for generating the HTML/CSS/JS assets to create the shinylive bundle. Additionally, there are some quirks/risks of using the shinylive.io website:
- The maintainers might change the domain. Or perhaps an internal pkgdown website might not have access to the
shinylive.io domain.
- A change in hashing logic for the
shinylive.io will break the pkgdown sites.
- Currently, using the packages from the
r-universe in shinylive.io is tricky. It has an auto-detect logic to force install R packages that are detected in the code and we'd have to manually unmount and install the package from r-universe for it to work. (Example)
An alternative way to use this feature would be to use the shinylive::export to create the bundle assets this way:
- A single pkgdown site typically needs the same R package dependencies, so the asset files related to the webR and R package dependencies that are generated using the
shinylive::export can be just created once. And, it is possible to install r-universe packages here.
- And we will just need the
app.json file generated for each example app code.
I have not explored this a lot. But, I hope there is a way to just generate the app.json files for each example app code and maintain single asset files for webR and R package dependencies in a way that we do not have any external website dependency like shinylive.io.
I still think it is nice to have shinylive.io iframes as it has code editor, which might not be possible in the new way proposed above. This will give the users two ways to embed shinylive-r apps. This will also make sure that our multi-version pkgdown docs can use diferent versions of shinylive.
P.S Additionally, it will be nice to have the logic like install_from_repo so users can just specify the packages and repo somewhere and roxy.shinylive can force install the packages from the repo on shinylive.io.
Code of Conduct
Contribution Guidelines
Feature description
The current logic of
roxy.shinyliveis to generate the app link with the code hash and embed the iframe link of theshinylive.iowebsite with this code.The problem with this logic is that we are heavily dependent with the deployed
shinylive.iowebsite rather than theshinyliveR package which is the main package responsible for generating the HTML/CSS/JS assets to create the shinylive bundle. Additionally, there are some quirks/risks of using theshinylive.iowebsite:shinylive.iodomain.shinylive.iowill break the pkgdown sites.r-universeinshinylive.iois tricky. It has an auto-detect logic to force install R packages that are detected in the code and we'd have to manually unmount and install the package fromr-universefor it to work. (Example)An alternative way to use this feature would be to use the
shinylive::exportto create the bundle assets this way:shinylive::exportcan be just created once. And, it is possible to installr-universepackages here.app.jsonfile generated for each example app code.I have not explored this a lot. But, I hope there is a way to just generate the
app.jsonfiles for each example app code and maintain single asset files for webR and R package dependencies in a way that we do not have any external website dependency likeshinylive.io.I still think it is nice to have
shinylive.ioiframes as it has code editor, which might not be possible in the new way proposed above. This will give the users two ways to embed shinylive-r apps. This will also make sure that our multi-version pkgdown docs can use diferent versions of shinylive.P.S Additionally, it will be nice to have the logic like
install_from_reposo users can just specify the packages and repo somewhere androxy.shinylivecan force install the packages from the repo onshinylive.io.Code of Conduct
Contribution Guidelines