From bc597d46c642a69f130945670f4fd68da48b069b Mon Sep 17 00:00:00 2001 From: Marcin <133694481+m7pr@users.noreply.github.com> Date: Fri, 10 May 2024 11:14:32 +0200 Subject: [PATCH] 1176 remove `Show Warnings` from modules (#749) Part of https://github.com/insightsengineering/teal/issues/1176 --- NEWS.md | 2 ++ R/tm_a_pca.R | 8 -------- R/tm_a_regression.R | 8 -------- R/tm_g_association.R | 8 -------- R/tm_g_bivariate.R | 8 -------- R/tm_g_distribution.R | 8 -------- R/tm_g_response.R | 8 -------- R/tm_g_scatterplot.R | 8 -------- R/tm_g_scatterplotmatrix.R | 8 -------- R/tm_missing_data.R | 8 -------- R/tm_outliers.R | 8 -------- R/tm_t_crosstable.R | 8 -------- 12 files changed, 2 insertions(+), 88 deletions(-) diff --git a/NEWS.md b/NEWS.md index f7f16e5c2..5f3a56258 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # teal.modules.general 0.3.0.9029 +* Removed `Show Warnings` modals from modules. + # teal.modules.general 0.3.0 ### Enhancements diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index a87a437cf..f1f5344f0 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -282,7 +282,6 @@ ui_a_pca <- function(id, ...) { ) ), forms = tagList( - teal.widgets::verbatim_popup_ui(ns("warning"), "Show Warnings"), teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") ), pre_output = args$pre_output, @@ -1033,13 +1032,6 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl ) }) - teal.widgets::verbatim_popup_srv( - id = "warning", - verbatim_content = reactive(teal.code::get_warnings(output_q())), - title = "Warning", - disabled = reactive(is.null(teal.code::get_warnings(output_q()))) - ) - teal.widgets::verbatim_popup_srv( id = "rcode", verbatim_content = reactive(teal.code::get_code(output_q())), diff --git a/R/tm_a_regression.R b/R/tm_a_regression.R index d276aaa2d..653b9bc66 100644 --- a/R/tm_a_regression.R +++ b/R/tm_a_regression.R @@ -348,7 +348,6 @@ ui_a_regression <- function(id, ...) { ) ), forms = tagList( - teal.widgets::verbatim_popup_ui(ns("warning"), "Show Warnings"), teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") ), pre_output = args$pre_output, @@ -1000,13 +999,6 @@ srv_a_regression <- function(id, ) }) - teal.widgets::verbatim_popup_srv( - id = "warning", - verbatim_content = reactive(teal.code::get_warnings(output_q())), - title = "Warning", - disabled = reactive(is.null(teal.code::get_warnings(output_q()))) - ) - teal.widgets::verbatim_popup_srv( id = "rcode", verbatim_content = reactive(teal.code::get_code(output_q())), diff --git a/R/tm_g_association.R b/R/tm_g_association.R index ae1ccebe6..5c64f6b6e 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -262,7 +262,6 @@ ui_tm_g_association <- function(id, ...) { ) ), forms = tagList( - teal.widgets::verbatim_popup_ui(ns("warning"), "Show Warnings"), teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") ), pre_output = args$pre_output, @@ -506,13 +505,6 @@ srv_tm_g_association <- function(id, teal.code::dev_suppress(output_q()[["title"]]) }) - teal.widgets::verbatim_popup_srv( - id = "warning", - verbatim_content = reactive(teal.code::get_warnings(output_q())), - title = "Warning", - disabled = reactive(is.null(teal.code::get_warnings(output_q()))) - ) - teal.widgets::verbatim_popup_srv( id = "rcode", verbatim_content = reactive(teal.code::get_code(output_q())), diff --git a/R/tm_g_bivariate.R b/R/tm_g_bivariate.R index 570f56a89..81aa8799f 100644 --- a/R/tm_g_bivariate.R +++ b/R/tm_g_bivariate.R @@ -431,7 +431,6 @@ ui_g_bivariate <- function(id, ...) { ) ), forms = tagList( - teal.widgets::verbatim_popup_ui(ns("warning"), button_label = "Show Warnings"), teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") ), pre_output = args$pre_output, @@ -689,13 +688,6 @@ srv_g_bivariate <- function(id, width = plot_width ) - teal.widgets::verbatim_popup_srv( - id = "warning", - verbatim_content = reactive(teal.code::get_warnings(output_q())), - title = "Warning", - disabled = reactive(is.null(teal.code::get_warnings(output_q()))) - ) - teal.widgets::verbatim_popup_srv( id = "rcode", verbatim_content = reactive(teal.code::get_code(output_q())), diff --git a/R/tm_g_distribution.R b/R/tm_g_distribution.R index 758db9038..cec2584af 100644 --- a/R/tm_g_distribution.R +++ b/R/tm_g_distribution.R @@ -333,7 +333,6 @@ ui_distribution <- function(id, ...) { ) ), forms = tagList( - teal.widgets::verbatim_popup_ui(ns("warning"), "Show Warnings"), teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") ), pre_output = args$pre_output, @@ -1267,13 +1266,6 @@ srv_distribution <- function(id, rownames = FALSE ) - teal.widgets::verbatim_popup_srv( - id = "warning", - verbatim_content = reactive(teal.code::get_warnings(output_q())), - title = "Warning", - disabled = reactive(is.null(teal.code::get_warnings(output_q()))) - ) - teal.widgets::verbatim_popup_srv( id = "rcode", verbatim_content = reactive(teal.code::get_code(output_q())), diff --git a/R/tm_g_response.R b/R/tm_g_response.R index 78d7cc05b..d4d00cad1 100644 --- a/R/tm_g_response.R +++ b/R/tm_g_response.R @@ -289,7 +289,6 @@ ui_g_response <- function(id, ...) { ) ), forms = tagList( - teal.widgets::verbatim_popup_ui(ns("warning"), button_label = "Show Warnings"), teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") ), pre_output = args$pre_output, @@ -547,13 +546,6 @@ srv_g_response <- function(id, width = plot_width ) - teal.widgets::verbatim_popup_srv( - id = "warning", - verbatim_content = reactive(teal.code::get_warnings(output_q())), - title = "Warning", - disabled = reactive(is.null(teal.code::get_warnings(output_q()))) - ) - teal.widgets::verbatim_popup_srv( id = "rcode", verbatim_content = reactive(teal.code::get_code(output_q())), diff --git a/R/tm_g_scatterplot.R b/R/tm_g_scatterplot.R index e1ee34d10..554c2f80f 100644 --- a/R/tm_g_scatterplot.R +++ b/R/tm_g_scatterplot.R @@ -466,7 +466,6 @@ ui_g_scatterplot <- function(id, ...) { ) ), forms = tagList( - teal.widgets::verbatim_popup_ui(ns("warning"), button_label = "Show Warnings"), teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") ), pre_output = args$pre_output, @@ -1022,13 +1021,6 @@ srv_g_scatterplot <- function(id, } }) - teal.widgets::verbatim_popup_srv( - id = "warning", - verbatim_content = reactive(teal.code::get_warnings(output_q())), - title = "Warning", - disabled = reactive(is.null(teal.code::get_warnings(output_q()))) - ) - teal.widgets::verbatim_popup_srv( id = "rcode", verbatim_content = reactive(teal.code::get_code(output_q())), diff --git a/R/tm_g_scatterplotmatrix.R b/R/tm_g_scatterplotmatrix.R index ef329c3d7..58547ff6c 100644 --- a/R/tm_g_scatterplotmatrix.R +++ b/R/tm_g_scatterplotmatrix.R @@ -252,7 +252,6 @@ ui_g_scatterplotmatrix <- function(id, ...) { ) ), forms = tagList( - teal.widgets::verbatim_popup_ui(ns("warning"), "Show Warnings"), teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") ), pre_output = args$pre_output, @@ -441,13 +440,6 @@ srv_g_scatterplotmatrix <- function(id, data, reporter, filter_panel_api, variab } }) - teal.widgets::verbatim_popup_srv( - id = "warning", - verbatim_content = reactive(teal.code::get_warnings(output_q())), - title = "Warning", - disabled = reactive(is.null(teal.code::get_warnings(output_q()))) - ) - teal.widgets::verbatim_popup_srv( id = "rcode", verbatim_content = reactive(teal.code::get_code(output_q())), diff --git a/R/tm_missing_data.R b/R/tm_missing_data.R index 34737766e..a5ad2af9f 100644 --- a/R/tm_missing_data.R +++ b/R/tm_missing_data.R @@ -228,7 +228,6 @@ srv_page_missing_data <- function(id, data, reporter, filter_panel_api, parent_d conditionalPanel( is_tab_active_js(ns("dataname_tab"), x), tagList( - teal.widgets::verbatim_popup_ui(dataname_ns("warning"), "Show Warnings"), teal.widgets::verbatim_popup_ui(dataname_ns("rcode"), "Show R code") ) ) @@ -1269,13 +1268,6 @@ srv_missing_data <- function(id, data, reporter, filter_panel_api, dataname, par } }) - teal.widgets::verbatim_popup_srv( - id = "warning", - verbatim_content = reactive(teal.code::get_warnings(final_q())), - title = "Warning", - disabled = reactive(is.null(teal.code::get_warnings(final_q()))) - ) - teal.widgets::verbatim_popup_srv( id = "rcode", verbatim_content = reactive(teal.code::get_code(final_q())), diff --git a/R/tm_outliers.R b/R/tm_outliers.R index 84b323008..1089c6ade 100644 --- a/R/tm_outliers.R +++ b/R/tm_outliers.R @@ -317,7 +317,6 @@ ui_outliers <- function(id, ...) { ) ), forms = tagList( - teal.widgets::verbatim_popup_ui(ns("warning"), "Show Warnings"), teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") ), pre_output = args$pre_output, @@ -1219,13 +1218,6 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, ) }) - teal.widgets::verbatim_popup_srv( - id = "warning", - verbatim_content = reactive(teal.code::get_warnings(final_q())), - title = "Warning", - disabled = reactive(is.null(teal.code::get_warnings(final_q()))) - ) - teal.widgets::verbatim_popup_srv( id = "rcode", verbatim_content = reactive(teal.code::get_code(final_q())), diff --git a/R/tm_t_crosstable.R b/R/tm_t_crosstable.R index 61f236df4..8ba55ff0b 100644 --- a/R/tm_t_crosstable.R +++ b/R/tm_t_crosstable.R @@ -227,7 +227,6 @@ ui_t_crosstable <- function(id, x, y, show_percentage, show_total, pre_output, p ) ), forms = tagList( - teal.widgets::verbatim_popup_ui(ns("warning"), "Show Warnings"), teal.widgets::verbatim_popup_ui(ns("rcode"), "Show R code") ), pre_output = pre_output, @@ -409,13 +408,6 @@ srv_t_crosstable <- function(id, data, reporter, filter_panel_api, label, x, y, table_r = table_r ) - teal.widgets::verbatim_popup_srv( - id = "warning", - verbatim_content = reactive(teal.code::get_warnings(output_q())), - title = "Warning", - disabled = reactive(is.null(teal.code::get_warnings(output_q()))) - ) - teal.widgets::verbatim_popup_srv( id = "rcode", verbatim_content = reactive(teal.code::get_code(output_q())),