Skip to content

Commit cb855a7

Browse files
authored
Use the the new add button for adding a card (#898)
Part of insightsengineering/coredev-tasks#650
1 parent 8ac5224 commit cb855a7

13 files changed

+48
-28
lines changed

DESCRIPTION

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Imports:
6161
teal.code (>= 0.6.1),
6262
teal.data (>= 0.7.0),
6363
teal.logger (>= 0.4.0),
64-
teal.reporter (>= 0.4.0.9004),
64+
teal.reporter (>= 0.4.0.9005),
6565
teal.widgets (>= 0.4.3.9005),
6666
tern (>= 0.9.7),
6767
tibble (>= 2.0.0),
@@ -89,8 +89,7 @@ Remotes:
8989
insightsengineering/teal.widgets@main,
9090
insightsengineering/teal@main
9191
Config/Needs/verdepcheck: haleyjeppson/ggmosaic, tidyverse/ggplot2,
92-
rstudio/shiny, insightsengineering/teal,
93-
insightsengineering/teal.slice, insightsengineering/teal.transform,
92+
rstudio/shiny, insightsengineering/teal, insightsengineering/teal.transform,
9493
mllg/checkmate, tidyverse/dplyr, rstudio/DT, tidyverse/forcats,
9594
r-lib/lifecycle, r-lib/scales, daattali/shinyjs, shinyTree/shinyTree,
9695
rstudio/shinyvalidate, dreamRs/shinyWidgets, tidyverse/stringr,

R/tm_a_pca.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,8 @@ ui_a_pca <- function(id, ...) {
236236
),
237237
encoding = tags$div(
238238
### Reporter
239-
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
239+
teal.reporter::add_card_button_ui(ns("add_reporter"), label = "Add Report Card"),
240+
tags$br(), tags$br(),
240241
###
241242
tags$label("Encodings", class = "text-primary"),
242243
teal.transform::datanames_input(args["dat"]),
@@ -1155,7 +1156,7 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl
11551156
card$append_src(source_code_r())
11561157
card
11571158
}
1158-
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
1159+
teal.reporter::add_card_button_srv("add_reporter", reporter = reporter, card_fun = card_fun)
11591160
}
11601161
###
11611162
})

R/tm_a_regression.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ ui_a_regression <- function(id, ...) {
286286
)),
287287
encoding = tags$div(
288288
### Reporter
289-
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
289+
teal.reporter::add_card_button_ui(ns("add_reporter"), label = "Add Report Card"),
290+
tags$br(), tags$br(),
290291
###
291292
tags$label("Encodings", class = "text-primary"), tags$br(),
292293
teal.transform::datanames_input(args[c("response", "regressor")]),
@@ -1050,7 +1051,7 @@ srv_a_regression <- function(id,
10501051
card$append_src(source_code_r())
10511052
card
10521053
}
1053-
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
1054+
teal.reporter::add_card_button_srv("add_reporter", reporter = reporter, card_fun = card_fun)
10541055
}
10551056
###
10561057
})

R/tm_g_association.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ ui_tm_g_association <- function(id, ...) {
233233
),
234234
encoding = tags$div(
235235
### Reporter
236-
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
236+
teal.reporter::add_card_button_ui(ns("add_reporter"), label = "Add Report Card"),
237+
tags$br(), tags$br(),
237238
###
238239
tags$label("Encodings", class = "text-primary"),
239240
teal.transform::datanames_input(args[c("ref", "vars")]),
@@ -572,7 +573,7 @@ srv_tm_g_association <- function(id,
572573
card$append_src(source_code_r())
573574
card
574575
}
575-
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
576+
teal.reporter::add_card_button_srv("add_reporter", reporter = reporter, card_fun = card_fun)
576577
}
577578
###
578579
})

R/tm_g_bivariate.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,8 @@ ui_g_bivariate <- function(id, ...) {
340340
),
341341
encoding = tags$div(
342342
### Reporter
343-
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
343+
teal.reporter::add_card_button_ui(ns("add_reporter"), label = "Add Report Card"),
344+
tags$br(), tags$br(),
344345
###
345346
tags$label("Encodings", class = "text-primary"),
346347
teal.transform::datanames_input(args[c("x", "y", "row_facet", "col_facet", "color", "fill", "size")]),
@@ -771,7 +772,7 @@ srv_g_bivariate <- function(id,
771772
card$append_src(source_code_r())
772773
card
773774
}
774-
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
775+
teal.reporter::add_card_button_srv("add_reporter", reporter = reporter, card_fun = card_fun)
775776
}
776777
###
777778
})

R/tm_g_distribution.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ ui_distribution <- function(id, ...) {
259259
),
260260
encoding = tags$div(
261261
### Reporter
262-
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
262+
teal.reporter::add_card_button_ui(ns("add_reporter"), label = "Add Report Card"),
263+
tags$br(), tags$br(),
263264
###
264265
tags$label("Encodings", class = "text-primary"),
265266
teal.transform::datanames_input(args[c("dist_var", "strata_var")]),
@@ -1425,7 +1426,7 @@ srv_distribution <- function(id,
14251426
card$append_src(source_code_r())
14261427
card
14271428
}
1428-
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
1429+
teal.reporter::add_card_button_srv("add_reporter", reporter = reporter, card_fun = card_fun)
14291430
}
14301431
###
14311432
})

R/tm_g_response.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ ui_g_response <- function(id, ...) {
264264
),
265265
encoding = tags$div(
266266
### Reporter
267-
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
267+
teal.reporter::add_card_button_ui(ns("add_reporter"), label = "Add Report Card"),
268+
tags$br(), tags$br(),
268269
###
269270
tags$label("Encodings", class = "text-primary"),
270271
teal.transform::datanames_input(args[c("response", "x", "row_facet", "col_facet")]),
@@ -619,7 +620,7 @@ srv_g_response <- function(id,
619620
card$append_src(source_code_r())
620621
card
621622
}
622-
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
623+
teal.reporter::add_card_button_srv("add_reporter", reporter = reporter, card_fun = card_fun)
623624
}
624625
###
625626
})

R/tm_g_scatterplot.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,8 @@ ui_g_scatterplot <- function(id, ...) {
372372
),
373373
encoding = tags$div(
374374
### Reporter
375-
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
375+
teal.reporter::add_card_button_ui(ns("add_reporter"), label = "Add Report Card"),
376+
tags$br(), tags$br(),
376377
###
377378
tags$label("Encodings", class = "text-primary"),
378379
teal.transform::datanames_input(args[c("x", "y", "color_by", "size_by", "row_facet", "col_facet")]),
@@ -1092,7 +1093,7 @@ srv_g_scatterplot <- function(id,
10921093
card$append_src(source_code_r())
10931094
card
10941095
}
1095-
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
1096+
teal.reporter::add_card_button_srv("add_reporter", reporter = reporter, card_fun = card_fun)
10961097
}
10971098
###
10981099
})

R/tm_g_scatterplotmatrix.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ ui_g_scatterplotmatrix <- function(id, ...) {
252252
),
253253
encoding = tags$div(
254254
### Reporter
255-
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
255+
teal.reporter::add_card_button_ui(ns("add_reporter"), label = "Add Report Card"),
256+
tags$br(), tags$br(),
256257
###
257258
tags$label("Encodings", class = "text-primary"),
258259
teal.transform::datanames_input(args$variables),
@@ -526,7 +527,7 @@ srv_g_scatterplotmatrix <- function(id,
526527
card$append_src(source_code_r())
527528
card
528529
}
529-
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
530+
teal.reporter::add_card_button_srv("add_reporter", reporter = reporter, card_fun = card_fun)
530531
}
531532
###
532533
})

R/tm_missing_data.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,8 @@ encoding_missing_data <- function(id, summary_per_patient = FALSE, ggtheme, data
361361

362362
tagList(
363363
### Reporter
364-
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
364+
teal.reporter::add_card_button_ui(ns("add_reporter"), label = "Add Report Card"),
365+
tags$br(), tags$br(),
365366
###
366367
tags$label("Encodings", class = "text-primary"),
367368
helpText(
@@ -1414,7 +1415,7 @@ srv_missing_data <- function(id,
14141415
card$append_src(source_code_r())
14151416
card
14161417
}
1417-
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
1418+
teal.reporter::add_card_button_srv("add_reporter", reporter = reporter, card_fun = card_fun)
14181419
}
14191420
###
14201421
})

0 commit comments

Comments
 (0)