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

[Feature Request]: Add arguments to report_previewer to be able to change default author #848

Closed
3 tasks done
Tracked by #4
gogonzo opened this issue Jun 13, 2023 · 0 comments · Fixed by #849
Closed
3 tasks done
Tracked by #4
Labels
enhancement New feature or request

Comments

@gogonzo
Copy link
Contributor

gogonzo commented Jun 13, 2023

Feature description

report_previewer_ui/srv in teal is added automatically if any module has a reporter argument but it is entirely controlled by teal internals. report_previewer_module is exported from teal and it should be possible for app developer to use custom previewer module instead of default one.

library(teal.modules.general)
pkgload::load_all("teal")
library(scda)

ADSL <- synthetic_cdisc_data("latest")$adsl
ADTTE <- synthetic_cdisc_data("latest")$adtte

module_variable_browser <- tm_variable_browser(
  label = "Variable browser",
  ggplot2_args = teal.widgets::ggplot2_args(
    labs = list(subtitle = "Plot generated by Variable Browser Module")
  )
)

app <- init(
  data = cdisc_data(
    cdisc_dataset("ADSL", ADSL, code = "ADSL <- synthetic_cdisc_data(\"latest\")$adsl"),
    cdisc_dataset("ADTTE", ADTTE, code = "ADTTE <- synthetic_cdisc_data(\"latest\")$adtte"),
    check = TRUE
  ),
  modules(
    module_variable_browser,
    reporter_previewer_module(label = "reports")
  )
)
#> [INFO] 2022-10-14 01:39:09.2209 pid:2564 token:[] teal.modules.general Initializing tm_variable_browser
if (interactive()) {
  shinyApp(app$ui, app$server)
}

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
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant