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

reporter_cleaning #175

Merged
merged 4 commits into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions R/tm_g_gh_boxplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,7 @@ ui_g_boxplot <- function(id, ...) {
),
encoding = div(
### Reporter
shiny::tags$div(
teal.reporter::add_card_button_ui(ns("addReportCard")),
teal.reporter::download_report_button_ui(ns("downloadButton")),
teal.reporter::reset_report_button_ui(ns("resetButton"))
),
shiny::tags$br(),
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
###
templ_ui_dataname(a$dataname),
teal.widgets::optionalSelectInput(
Expand Down Expand Up @@ -557,7 +552,6 @@ srv_g_boxplot <- function(id,
card <- teal.reporter::TealReportCard$new()
card$set_name("Box Plot")
card$append_text("Box Plot", "header2")
card$append_text("Filter State", "header3")
card$append_fs(datasets$get_filter_state())
card$append_text("Selected Options", "header3")
card$append_text(
Expand All @@ -576,19 +570,15 @@ srv_g_boxplot <- function(id,
card$append_text("Comment", "header3")
card$append_text(comment)
}
card$append_text("Show R Code", "header3")
card$append_src(paste(get_rcode(
chunks = teal.code::get_chunks_object(parent_idx = 1L),
chunks = teal.code::get_chunks_object(parent_idx = 2L),
datasets = datasets,
title = "",
description = ""
), collapse = "\n"))
card
}

teal.reporter::add_card_button_srv("addReportCard", reporter = reporter, card_fun = card_fun)
teal.reporter::download_report_button_srv("downloadButton", reporter = reporter)
teal.reporter::reset_report_button_srv("resetButton", reporter)
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
}
###

Expand Down
16 changes: 3 additions & 13 deletions R/tm_g_gh_correlationplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,7 @@ ui_g_correlationplot <- function(id, ...) {
output = templ_ui_output_datatable(ns),
encoding = div(
### Reporter
shiny::tags$div(
teal.reporter::add_card_button_ui(ns("addReportCard")),
teal.reporter::download_report_button_ui(ns("downloadButton")),
teal.reporter::reset_report_button_ui(ns("resetButton"))
),
shiny::tags$br(),
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
###
templ_ui_dataname(a$dataname),
teal.widgets::optionalSelectInput(
Expand Down Expand Up @@ -886,7 +881,6 @@ srv_g_correlationplot <- function(id,
card <- teal.reporter::TealReportCard$new()
card$set_name("Correlation Plot")
card$append_text("Correlation Plot", "header2")
card$append_text("Filter State", "header3")
card$append_fs(datasets$get_filter_state())
card$append_text("Selected Options", "header3")
card$append_text(
Expand All @@ -905,19 +899,15 @@ srv_g_correlationplot <- function(id,
card$append_text("Comment", "header3")
card$append_text(comment)
}
card$append_text("Show R Code", "header3")
card$append_src(paste(get_rcode(
chunks = teal.code::get_chunks_object(parent_idx = 1L),
chunks = teal.code::get_chunks_object(parent_idx = 2L),
datasets = datasets,
title = "",
description = ""
), collapse = "\n"))
card
}

teal.reporter::add_card_button_srv("addReportCard", reporter = reporter, card_fun = card_fun)
teal.reporter::download_report_button_srv("downloadButton", reporter = reporter)
teal.reporter::reset_report_button_srv("resetButton", reporter)
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
}
###

Expand Down
16 changes: 3 additions & 13 deletions R/tm_g_gh_density_distribution_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,7 @@ ui_g_density_distribution_plot <- function(id, ...) {
),
encoding = div(
### Reporter
shiny::tags$div(
teal.reporter::add_card_button_ui(ns("addReportCard")),
teal.reporter::download_report_button_ui(ns("downloadButton")),
teal.reporter::reset_report_button_ui(ns("resetButton"))
),
shiny::tags$br(),
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
###
templ_ui_dataname(a$dataname),
teal.widgets::optionalSelectInput(
Expand Down Expand Up @@ -436,7 +431,6 @@ srv_g_density_distribution_plot <- function(id, # nolint
card <- teal.reporter::TealReportCard$new()
card$set_name("Density Distribution Plot")
card$append_text("Density Distribution Plot", "header2")
card$append_text("Filter State", "header3")
card$append_fs(datasets$get_filter_state())
card$append_text("Selected Options", "header3")
card$append_text(
Expand All @@ -453,19 +447,15 @@ srv_g_density_distribution_plot <- function(id, # nolint
card$append_text("Comment", "header3")
card$append_text(comment)
}
card$append_text("Show R Code", "header3")
card$append_src(paste(get_rcode(
chunks = teal.code::get_chunks_object(parent_idx = 1L),
chunks = teal.code::get_chunks_object(parent_idx = 2L),
datasets = datasets,
title = "",
description = ""
), collapse = "\n"))
card
}

teal.reporter::add_card_button_srv("addReportCard", reporter = reporter, card_fun = card_fun)
teal.reporter::download_report_button_srv("downloadButton", reporter = reporter)
teal.reporter::reset_report_button_srv("resetButton", reporter)
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
}
###

Expand Down
15 changes: 3 additions & 12 deletions R/tm_g_gh_lineplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,7 @@ ui_lineplot <- function(id, ...) {
output = teal.widgets::plot_with_settings_ui(id = ns("plot")),
encoding = div(
### Reporter
shiny::tags$div(
teal.reporter::add_card_button_ui(ns("addReportCard")),
teal.reporter::download_report_button_ui(ns("downloadButton")),
teal.reporter::reset_report_button_ui(ns("resetButton"))
),
shiny::tags$br(),
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
###
templ_ui_dataname(a$dataname),
teal.widgets::optionalSelectInput(
Expand Down Expand Up @@ -770,7 +765,6 @@ srv_lineplot <- function(id,
card <- teal.reporter::TealReportCard$new()
card$set_name("Line Plot")
card$append_text("Line Plot", "header2")
card$append_text("Filter State", "header3")
card$append_fs(datasets$get_filter_state())
card$append_text("Selected Options", "header3")
card$append_text(
Expand All @@ -789,18 +783,15 @@ srv_lineplot <- function(id,
card$append_text("Comment", "header3")
card$append_text(comment)
}
card$append_text("Show R Code", "header3")
card$append_src(paste(get_rcode(
chunks = teal.code::get_chunks_object(parent_idx = 1L),
chunks = teal.code::get_chunks_object(parent_idx = 2L),
datasets = datasets,
title = "",
description = ""
), collapse = "\n"))
card
}
teal.reporter::add_card_button_srv("addReportCard", reporter = reporter, card_fun = card_fun)
teal.reporter::download_report_button_srv("downloadButton", reporter = reporter)
teal.reporter::reset_report_button_srv("resetButton", reporter)
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
}
###

Expand Down
15 changes: 3 additions & 12 deletions R/tm_g_gh_scatterplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,7 @@ ui_g_scatterplot <- function(id, ...) {
output = templ_ui_output_datatable(ns),
encoding = div(
### Reporter
shiny::tags$div(
teal.reporter::add_card_button_ui(ns("addReportCard")),
teal.reporter::download_report_button_ui(ns("downloadButton")),
teal.reporter::reset_report_button_ui(ns("resetButton"))
),
shiny::tags$br(),
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
###
templ_ui_dataname(a$dataname),
teal.widgets::optionalSelectInput(
Expand Down Expand Up @@ -382,7 +377,6 @@ srv_g_scatterplot <- function(id,
card <- teal.reporter::TealReportCard$new()
card$set_name("Scatter Plot")
card$append_text("Scatter Plot", "header2")
card$append_text("Filter State", "header3")
card$append_fs(datasets$get_filter_state())
card$append_text("Selected Options", "header3")
card$append_text(
Expand All @@ -401,18 +395,15 @@ srv_g_scatterplot <- function(id,
card$append_text("Comment", "header3")
card$append_text(comment)
}
card$append_text("Show R Code", "header3")
card$append_src(paste(get_rcode(
chunks = teal.code::get_chunks_object(parent_idx = 1L),
chunks = teal.code::get_chunks_object(parent_idx = 2L),
datasets = datasets,
title = "",
description = ""
), collapse = "\n"))
card
}
teal.reporter::add_card_button_srv("addReportCard", reporter = reporter, card_fun = card_fun)
teal.reporter::download_report_button_srv("downloadButton", reporter = reporter)
teal.reporter::reset_report_button_srv("resetButton", reporter)
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
}
###

Expand Down
15 changes: 3 additions & 12 deletions R/tm_g_gh_spaghettiplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,7 @@ g_ui_spaghettiplot <- function(id, ...) {
output = templ_ui_output_datatable(ns),
encoding = div(
### Reporter
shiny::tags$div(
teal.reporter::add_card_button_ui(ns("addReportCard")),
teal.reporter::download_report_button_ui(ns("downloadButton")),
teal.reporter::reset_report_button_ui(ns("resetButton"))
),
shiny::tags$br(),
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
###
templ_ui_dataname(a$dataname),
teal.widgets::optionalSelectInput(
Expand Down Expand Up @@ -475,7 +470,6 @@ srv_g_spaghettiplot <- function(id,
card <- teal.reporter::TealReportCard$new()
card$set_name("Spaghetti Plot")
card$append_text("Spaghetti Plot", "header2")
card$append_text("Filter State", "header3")
card$append_fs(datasets$get_filter_state())
card$append_text("Selected Options", "header3")
card$append_text(
Expand All @@ -487,18 +481,15 @@ srv_g_spaghettiplot <- function(id,
card$append_text("Comment", "header3")
card$append_text(comment)
}
card$append_text("Show R Code", "header3")
card$append_src(paste(get_rcode(
chunks = teal.code::get_chunks_object(parent_idx = 1L),
chunks = teal.code::get_chunks_object(parent_idx = 2L),
datasets = datasets,
title = "",
description = ""
), collapse = "\n"))
card
}
teal.reporter::add_card_button_srv("addReportCard", reporter = reporter, card_fun = card_fun)
teal.reporter::download_report_button_srv("downloadButton", reporter = reporter)
teal.reporter::reset_report_button_srv("resetButton", reporter)
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
}
###

Expand Down