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

Shinylive links #326

Open
JohnCoene opened this issue Feb 29, 2024 · 5 comments
Open

Shinylive links #326

JohnCoene opened this issue Feb 29, 2024 · 5 comments
Labels
question Further information is requested

Comments

@JohnCoene
Copy link
Member

The create_app_link function is an exported function used in the documentation.

https://github.com/blockr-org/blockr/blob/78782f38edd9c45be9ee012dc4c90149e784853b/R/utils.R#L393

How can we easily update the embedded app (embedded by this function)?

@JohnCoene JohnCoene added the question Further information is requested label Feb 29, 2024
@DivadNojnarg
Copy link
Collaborator

I was working on this https://github.com/DivadNojnarg/shinylivePkgdown2 to automatically export an app to shinylive from the R code. However, I currently don't have availability to finalise it.

At the moment, the "process" is manual, boring and dumb. You have to copy/paste your app code like:

webr::install("blockr", repos = "https://blockr-org.github.io/webr-repos")
library(blockr)
stack <- new_stack(
    data_block,
    select_block
)

serve_stack(stack)

to the Posit shinylive React app editor (https://shinylive.io/r/examples/) and export the encoded url (click on sharing the app button top right corner) after code= for instance what I get with the above R code: NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAdzgCMAnRRASwgGdSoAbbgCgA6YOtyIEA1gyG4ABAzioi7GQF4ZQgBalSqdogD0+kWMkBaIgwDmGSy1IaArnQwsi+2o1PzF7IQEoBCG4WRigGAE8+YwkGAI4uCRkAHlMZCDhqAH1OKAlBCBlCmQATKC5M6PFcQKKZdjhuOAJSCtEJQLjA+oYANzhshPE+HIk-MABfAF0gA which you pass to app_code param. You'll also need a #nolint statement.

@JohnCoene
Copy link
Member Author

I understand that it just seems a bit complicated to update the documentation, if we want to deploy an updated version of the app we have to change link/code in many places.

@DivadNojnarg
Copy link
Collaborator

Yes. You also currently have to update the custom wasm repo each time blockr is updated.

That's why this would be much better https://github.com/DivadNojnarg/shinylivePkgdown2 as it would automatically export all apps as soon as you update the code.

@DivadNojnarg
Copy link
Collaborator

ccing @schloerke :) for another usecase

@DivadNojnarg DivadNojnarg changed the title Shinyline links Shinylive links Mar 1, 2024
@parmsam-pfizer
Copy link

{roxy.shinylive} created by @pawelru and built on top of {lzstring} might help solve for this. Hopefully, encode/decode functions will be in {shinylive} soon too: posit-dev/r-shinylive#92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants