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

The UI function cannot use the request argument #395

Closed
kamilzyla opened this issue Nov 29, 2022 · 0 comments · Fixed by #556
Closed

The UI function cannot use the request argument #395

kamilzyla opened this issue Nov 29, 2022 · 0 comments · Fixed by #556
Labels
status: ready Well-defined and immediately actionable type: enhancement Minor change or improvement for existing functionality

Comments

@kamilzyla
Copy link
Collaborator

kamilzyla commented Nov 29, 2022

Background

When using bookmarking in Shiny, the UI must be a function. According to the documentation of shiny::enableBookmarking() it should take request as an argument, but its contents are not documented and experiments prove that the function can also take no arguments.

Thus both UI definitions below should work in vanilla Shiny:

ui <- function() "Hello!"
ui <- function(request) {
  dput(request)
  "Hello!"
}

We encountered this while working on #283.

Problem

With legacy_entrypoint: source both UI definitions should work as in vanilla Shiny. However if the request argument is actually used in the function (dput(request)) it will not work in Rhino.

@kamilzyla kamilzyla added type: enhancement Minor change or improvement for existing functionality status: ready Well-defined and immediately actionable labels Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready Well-defined and immediately actionable type: enhancement Minor change or improvement for existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant