Skip to content

[Feature Request]: Decouple roxy.shinylive from shinylive.io #18

@vedhav

Description

@vedhav

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:

  1. The maintainers might change the domain. Or perhaps an internal pkgdown website might not have access to the shinylive.io domain.
  2. A change in hashing logic for the shinylive.io will break the pkgdown sites.
  3. 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:

  1. 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.
  2. 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

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions