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

[Bug]: datanames argument set_datanames function does not work with dot-prefixed datanames #1389

Open
3 tasks done
averissimo opened this issue Oct 18, 2024 · 0 comments
Open
3 tasks done
Labels
bug Something isn't working

Comments

@averissimo
Copy link
Contributor

averissimo commented Oct 18, 2024

What happened?

Since the introduction of dot prefixed datanames that are ignored in #1342 that we cannot set a dataname that starts with a prefix.

The teal app will not allow modules to use .something or .another as those are ignored since we moved to use the ls() function.

Discussion

Q: Should we keep this as a feature and notify the user or should we allow for datanames that start with dot to be displayed?

Reproducible app

devtools::load_all("../teal")

data <- teal_data() |> 
  within({
    iris <- iris
    mtcars <- mtcars
    .something <- iris
    .another <- mtcars
  })

app <- init(
  data = data,
  modules = modules(
    label = "iris, mtcars and .something",
    example_module("M1", datanames = c(".something", "iris")),
    example_module("M2") |> set_datanames(c(".something", "iris")),
    example_module("M3 (iris)") |> set_datanames("iris"),
    example_module("M4 (all)")
  ),
  title = "Example App"
)
      
shiny::runApp(app)

Code of Conduct

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

Contribution Guidelines

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

Security Policy

  • I agree to follow this project's Security Policy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant