Skip to content

Commit e36895c

Browse files
Update lifecycle badges (#375)
Part of insightsengineering/coredev-tasks#649 Current version 0.4.0 will be probably bumped to 0.4.1 or higher. Removing all `experimental` badges added at 0.3.1 or before. Removed `experimental` badges - added 3 years ago in here - #61 - in Load reporter added over a year ago in version 0.3.1 - #251 - in `panel_item` added over a year ago in version 0.3.0 - #247 Changed `deprecated_soft` to `depreacated_stop` - `reporter_previewer_deprecated` (added 3 years ago in #61) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent fd976f4 commit e36895c

24 files changed

+53
-98
lines changed

R/AddCardModule.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' Add card button module
22
#'
3-
#' @description `r lifecycle::badge("experimental")`
3+
#' @description
44
#'
55
#' Provides a button to add views/cards to a report.
66
#'

R/DownloadModule.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' Download report button module
22
#'
3-
#' @description `r lifecycle::badge("experimental")`
3+
#' @description
44
#'
55
#' Provides a button that triggers downloading a report.
66
#'

R/LoadReporterModule.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' Load `Reporter` button module
22
#'
3-
#' @description `r lifecycle::badge("experimental")`
3+
#' @description
44
#'
55
#' Provides a button to upload `ReporterCard`(s) to the `Reporter`.
66
#'

R/Previewer.R

Lines changed: 41 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#' Show report previewer button module
22
#'
33
#' @description `r lifecycle::badge("experimental")`
4-
#'
54
#' Provides a button that triggers showing the report preview in a modal.
65
#'
76
#' For more details see the vignette: `vignette("previewerReporter", "teal.reporter")`.
@@ -15,38 +14,6 @@
1514
#' @return `NULL`.
1615
NULL
1716

18-
#' Report previewer module
19-
#'
20-
#' @description `r lifecycle::badge("deprecated")`
21-
#'
22-
#' Module offers functionalities to visualize, manipulate,
23-
#' and interact with report cards that have been added to a report.
24-
#' It includes a previewer interface to see the cards and options to modify the report before downloading.
25-
#'
26-
#' Cards are saved by the `shiny` bookmarking mechanism.
27-
#'
28-
#' For more details see the vignette: `vignette("previewerReporter", "teal.reporter")`.
29-
#'
30-
#' This function is deprecated and will be removed in the next release.
31-
#' Please use `preview_report_button_ui()` and `preview_report_button_srv()`
32-
#' to create a preview button that opens a modal with the report preview.
33-
#'
34-
#' @details `r global_knitr_details()`
35-
#'
36-
#' @name reporter_previewer_deprecated
37-
#'
38-
#' @param id (`character(1)`) `shiny` module instance id.
39-
#' @param reporter (`Reporter`) instance.
40-
#' @param global_knitr (`list`) of `knitr` parameters (passed to `knitr::opts_chunk$set`)
41-
#' for customizing the rendering process.
42-
#' @param previewer_buttons (`character`) set of modules to include with `c("download", "load", "reset")` possible
43-
#' values and `"download"` is required.
44-
#' Default `c("download", "load", "reset")`
45-
#' @inheritParams reporter_download_inputs
46-
#'
47-
#' @return `NULL`.
48-
NULL
49-
5017
#' @rdname reporter_previewer
5118
#' @export
5219
preview_report_button_ui <- function(id, label = "Preview Report") {
@@ -111,12 +78,48 @@ preview_report_button_srv <- function(id, reporter) {
11178
})
11279
}
11380

81+
82+
# deprecated ------------------------------------------------------------------------------------------------------
83+
84+
85+
#' Report previewer module
86+
#'
87+
#' @description `r lifecycle::badge("deprecated")`
88+
#'
89+
#' Module offers functionalities to visualize, manipulate,
90+
#' and interact with report cards that have been added to a report.
91+
#' It includes a previewer interface to see the cards and options to modify the report before downloading.
92+
#'
93+
#' Cards are saved by the `shiny` bookmarking mechanism.
94+
#'
95+
#' For more details see the vignette: `vignette("previewerReporter", "teal.reporter")`.
96+
#'
97+
#' This function is deprecated and will be removed in the next release.
98+
#' Please use `preview_report_button_ui()` and `preview_report_button_srv()`
99+
#' to create a preview button that opens a modal with the report preview.
100+
#'
101+
#' @details `r global_knitr_details()`
102+
#'
103+
#' @name reporter_previewer_deprecated
104+
#'
105+
#' @param id (`character(1)`) `shiny` module instance id.
106+
#' @param reporter (`Reporter`) instance.
107+
#' @param global_knitr (`list`) of `knitr` parameters (passed to `knitr::opts_chunk$set`)
108+
#' for customizing the rendering process.
109+
#' @param previewer_buttons (`character`) set of modules to include with `c("download", "load", "reset")` possible
110+
#' values and `"download"` is required.
111+
#' Default `c("download", "load", "reset")`
112+
#' @inheritParams reporter_download_inputs
113+
#'
114+
#' @return `NULL`.
115+
NULL
116+
114117
#' @rdname reporter_previewer_deprecated
115118
#' @export
116119
reporter_previewer_ui <- function(id) {
117120
ns <- shiny::NS(id)
118121
lifecycle::deprecate_soft(
119-
when = "",
122+
when = "0.4.1",
120123
what = "reporter_previewer_ui()",
121124
details = paste(
122125
"Calling `reporter_previewer_ui()` is deprecated and will be removed in the next release.\n",
@@ -152,7 +155,7 @@ reporter_previewer_srv <- function(id,
152155
rmd_yaml_args = getOption("teal.reporter.rmd_yaml_args"),
153156
previewer_buttons = c("download", "load", "reset")) {
154157
lifecycle::deprecate_soft(
155-
when = "",
158+
when = "0.4.1",
156159
what = "reporter_previewer_srv()",
157160
details = paste(
158161
"Calling `reporter_previewer_srv()` is deprecated and will be removed in the next release.\n",
@@ -200,6 +203,9 @@ reporter_previewer_srv <- function(id,
200203
})
201204
}
202205

206+
207+
# reporter_previewer_content --------------------------------------------------------------------------------------
208+
203209
#' @keywords internal
204210
reporter_previewer_content_ui <- function(id) {
205211
shiny::uiOutput(shiny::NS(id, "pcards"))
@@ -322,29 +328,3 @@ block_to_html <- function(b) {
322328
stop("Unknown block class")
323329
}
324330
}
325-
326-
#' @noRd
327-
#' @keywords internal
328-
previewer_collapse_item <- function(idx, card_name, card_blocks) {
329-
htmltools::tagAppendChildren(
330-
tag = bslib::accordion_panel(
331-
title = paste0("Card ", idx, ": ", card_name),
332-
shiny::tags$div(
333-
id = paste0("card", idx),
334-
lapply(
335-
card_blocks,
336-
function(b) {
337-
block_to_html(b)
338-
}
339-
)
340-
)
341-
),
342-
.cssSelector = ".accordion-header",
343-
shiny::actionButton(
344-
inputId = paste0("card_remove_id_", idx),
345-
label = "Remove card",
346-
class = "card_remove_id",
347-
`data-cardid` = idx
348-
)
349-
)
350-
}

R/ReportCard.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#' @title `ReportCard`: An `R6` class for building report elements
22
#' @docType class
33
#'
4-
#' @description `r lifecycle::badge("experimental")`
4+
#' @description
55
#'
66
#' This `R6` class that supports creating a report card containing text, plot, table and
77
#' metadata blocks that can be appended and rendered to form a report output from a `shiny` app.

R/Reporter.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' @title `Reporter`: An `R6` class for managing report cards
22
#' @docType class
3-
#' @description `r lifecycle::badge("experimental")`
3+
#' @description
44
#'
55
#' This `R6` class is designed to store and manage report cards,
66
#' facilitating the creation, manipulation, and serialization of report-related data.

R/ResetModule.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' Reset report button module
22
#'
3-
#' @description `r lifecycle::badge("experimental")`
3+
#' @description
44
#'
55
#' Provides a button that triggers resetting the report content.
66
#'

R/SimpleReporter.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' Simple reporter module
22
#'
3-
#' @description `r lifecycle::badge("experimental")`
3+
#' @description
44
#'
55
#' Module provides compact UI and server functions for managing a report in a `shiny` app.
66
#' This module combines functionalities for [adding cards to a report][add_card_button],

R/teal.reporter.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
#' @importFrom checkmate assert_string
99
#' @importFrom grid grid.newpage
10-
#' @importFrom lifecycle badge
1110
#' @importFrom R6 R6Class
1211
#' @importFrom rmarkdown render
1312
#' @importFrom yaml as.yaml

R/utils.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#' Panel group widget
22
#'
3-
#' `r lifecycle::badge("experimental")`
43
#'
54
#' @param title (`character`) title of panel
65
#' @param ... content of panel

0 commit comments

Comments
 (0)