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

update to qenv #462

Merged
merged 8 commits into from
Sep 22, 2022
Merged

Conversation

nikolas-burkoff
Copy link
Contributor

Part of insightsengineering/teal.code#34 see insightsengineering/teal.code#74

I also replaced dontrun with if (interactive()) as it was annoying me so much not being able to run the apps in RSrudio easily

R/tm_file_viewer.R Outdated Show resolved Hide resolved
@Polkas
Copy link
Contributor

Polkas commented Sep 20, 2022

LGTM - approve

@@ -77,7 +77,7 @@ tm_front_page <- function(label = "Front page",
ui = ui_front_page,
ui_args = args,
server_args = list(tables = tables, show_metadata = show_metadata),
filters = NULL
filters = if (show_metadata) "all" else NULL
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this, but if I don't do this I get an error from teal saying if filters = NULL then you cannot use data

@nikolas-burkoff
Copy link
Contributor Author

nikolas-burkoff commented Sep 22, 2022

@pawelru this is starting to look really nice - it shouldn't be too hard to remove the do.call etc.

library(teal.modules.general)
library(shiny)

data <- new_tdata(list(iris = iris))

var_brow <- tm_variable_browser()
dat_tab <- tm_data_table()

ui <- fluidPage(
  fluidRow(
    column(8, do.call(var_brow$ui, c(list(id = "id_1", data = data), var_brow$ui_args))),
    column(4, do.call(dat_tab$ui, c(list(id = "id_2", data = data), dat_tab$ui_args)))
  )
)

server <- function(input, output, session) {
  do.call(var_brow$server, c(list("id_1", data = data), var_brow$server_args))
  do.call(dat_tab$server, c(list("id_2", data = data), dat_tab$server_args))
}

shinyApp(ui, server)

image

Note the reporter buttons don't do anything and after insightsengineering/teal#678 they won't appear at all

Copy link
Collaborator

@mhallal1 mhallal1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

3 participants