-
Notifications
You must be signed in to change notification settings - Fork 20
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
Pass URL query parameters to the Shiny app in Viewer.tsx
#79
base: main
Are you sure you want to change the base?
Conversation
Also includes some formatting fixes from prettier.
** Updates description to link issue if this PR was merged. Should we also include the hash? Closing #84 in favor of this PR |
I think so, yes. It makes sense to me that if the query parameters are passed through, the hash part should be too. @wch and I did have a short discussion about this. IIRC the main question is how this kind of behaviour should be handled when shinylive is used as part of a larger context such as a Quarto doc. In that case, there could be multiple apps embedded into the same page, and Quarto might also be using the query and fragment parts of the URL for its own devices. Should those be passed through? Probably not. A quick solution is to make this optional, we could pass some flag through |
@georgestagg any update here I've been eagerly waiting for this PR to merge. |
Whoops! Re-opened. Apologies for the noise. |
Fixes posit-dev/r-shinylive#28
I saw someone ask for this recently, the idea being that the query parameters in a shinylive.io URL should be forwarded and accessible to the inner Shiny app running in the
iframe
on the page.I am unsure if we actually would want this behaviour or not, I could be convinced either way. But in any case, the implementation is simple (grab the parameters from the outer page URL and append to the
iframe
'ssrc
attribute) so I have placed the change here for discussion.Also includes some formatting changes from prettier, apologies for the noise.
runApp()
.