Skip to content

Commit 9db797d

Browse files
authored
Merge branch 'main' into teal_reportable
Signed-off-by: Marcin <[email protected]>
2 parents 16c525b + 9ab175a commit 9db797d

26 files changed

+234
-367
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ default_language_version:
66
python: python3
77
repos:
88
- repo: https://github.com/lorenzwalthert/precommit
9-
rev: v0.4.3.9012
9+
rev: v0.4.3.9013
1010
hooks:
1111
- id: style-files
1212
name: Style code with `styler`

DESCRIPTION

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Type: Package
22
Package: teal.modules.general
33
Title: General Modules for 'teal' Applications
4-
Version: 0.4.1.9006
5-
Date: 2025-07-08
4+
Version: 0.5.0.9000
5+
Date: 2025-08-20
66
Authors@R: c(
77
person("Dawid", "Kaledkowski", , "[email protected]", role = c("aut", "cre")),
88
person("Pawel", "Rucki", , "[email protected]", role = "aut"),
@@ -26,9 +26,9 @@ Depends:
2626
ggmosaic (>= 0.3.0),
2727
ggplot2 (>= 3.4.0),
2828
R (>= 4.1),
29-
shiny (>= 1.6.0),
30-
teal (>= 0.16.0.9008),
31-
teal.transform (>= 0.6.0.9002)
29+
shiny (>= 1.8.1),
30+
teal (>= 1.0.0),
31+
teal.transform (>= 0.7.0)
3232
Imports:
3333
bslib (>= 0.8.0),
3434
checkmate (>= 2.1.0),
@@ -58,19 +58,19 @@ Imports:
5858
sparkline (>= 2.0),
5959
stats,
6060
stringr (>= 1.4.1),
61-
teal.code (>= 0.6.1),
62-
teal.data (>= 0.7.0),
63-
teal.logger (>= 0.3.2.9001),
64-
teal.reporter (>= 0.4.0.9004),
65-
teal.widgets (>= 0.4.3.9005),
61+
teal.code (>= 0.7.0),
62+
teal.data (>= 0.8.0),
63+
teal.logger (>= 0.4.0),
64+
teal.reporter (>= 0.5.0),
65+
teal.widgets (>= 0.5.0),
6666
tern (>= 0.9.7),
6767
tibble (>= 2.0.0),
6868
tidyr (>= 0.8.3),
6969
tools,
7070
utils
7171
Suggests:
7272
knitr (>= 1.42),
73-
logger (>= 0.2.0),
73+
logger (>= 0.4.0),
7474
nestcolor (>= 0.1.0),
7575
pkgload,
7676
rlang (>= 1.0.0),
@@ -84,17 +84,14 @@ VignetteBuilder:
8484
knitr,
8585
rmarkdown
8686
Remotes:
87-
insightsengineering/teal.logger@main,
8887
insightsengineering/teal.reporter@teal_reportable,
89-
insightsengineering/teal.transform@main,
90-
insightsengineering/teal.widgets@main,
9188
insightsengineering/teal@teal_reportable,
9289
Config/Needs/verdepcheck: haleyjeppson/ggmosaic, tidyverse/ggplot2,
9390
rstudio/shiny, insightsengineering/teal,
94-
insightsengineering/teal.slice, insightsengineering/teal.transform,
95-
mllg/checkmate, tidyverse/dplyr, rstudio/DT, tidyverse/forcats,
96-
r-lib/lifecycle, r-lib/scales, daattali/shinyjs, shinyTree/shinyTree,
97-
rstudio/shinyvalidate, dreamRs/shinyWidgets, tidyverse/stringr,
91+
insightsengineering/teal.transform, mllg/checkmate, tidyverse/dplyr,
92+
rstudio/DT, tidyverse/forcats, r-lib/lifecycle, r-lib/scales,
93+
daattali/shinyjs, shinyTree/shinyTree, rstudio/shinyvalidate,
94+
dreamRs/shinyWidgets, tidyverse/stringr,
9895
insightsengineering/teal.code, insightsengineering/teal.data,
9996
insightsengineering/teal.logger, insightsengineering/teal.reporter,
10097
insightsengineering/teal.widgets, insightsengineering/tern,

NEWS.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,28 @@
1-
# teal.modules.general 0.4.1.9006
1+
# teal.modules.general 0.5.0.9000
22

3-
# teal.modules.general 0.4.1
3+
# teal.modules.general 0.5.0
4+
5+
### Breaking changes
6+
7+
- Removed the `table` object decoration in `tm_missing_data` and `tm_outliers` (#899).
8+
- Removed the `summary_table` and `test_table` object decoration in `tm_g_distribution` (#897).
49

510
### Bug fixes
6-
* Fixes output is not updated when filter is added for the modules: `tm_a_pca`, `tm_a_regression`, `tm_g_scatterplot`, `tm_g_association`, `tm_g_bivariate`, `tm_g_distribution`, `tm_g_response`, `tm_t_crosstable` (#870)
11+
12+
- Fixed "Add to Report" functionality in `tm_outliers`, `tm_missing_data` and `tm_g_distribution` modules (#899 and #897).
13+
- Fixes a bug in `tm_outliers` that fails when data has no join keys (#650).
714

815
### Enhancements
9-
* Added `remove_zero_columns` to `tm_t_crosstable` to add an option to remove empty columns (#890)
16+
17+
- Improved the layout and appearance of the app using `bslib` components.
18+
- Fixed deprecation warning for `tern::stack_grobs` in `tm_g_association` (#903).
19+
- Allow search feature in `tm_file_viewer` (#152).
20+
- Added `remove_zero_columns` to `tm_t_crosstable` to add an option to remove empty columns (#890)
21+
22+
# teal.modules.general 0.4.1
23+
24+
### Bug fixes
25+
* Fixes output is not updated when filter is added for the modules: `tm_a_pca`, `tm_a_regression`, `tm_g_scatterplot`, `tm_g_association`, `tm_g_bivariate`, `tm_g_distribution`, `tm_g_response`, `tm_t_crosstable` (#870)
1026

1127
# teal.modules.general 0.4.0
1228

R/tm_a_pca.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ ui_a_pca <- function(id, ...) {
231231
}
232232

233233
tagList(
234-
include_css_files("custom"),
235234
teal.widgets::standard_layout(
236235
output = teal.widgets::white_small_well(
237236
uiOutput(ns("all_plots"))

R/tm_a_regression.R

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -836,18 +836,15 @@ srv_a_regression <- function(id,
836836
color = "red",
837837
linetype = "dashed"
838838
) +
839-
ggplot2::geom_text(
840-
ggplot2::aes(
841-
x = 0,
842-
y = mean(data$.cooksd, na.rm = TRUE),
843-
label = paste("mu", "=", round(mean(data$.cooksd, na.rm = TRUE), 4)),
844-
vjust = -1,
845-
hjust = 0,
846-
color = "red",
847-
angle = 90
848-
),
849-
parse = TRUE,
850-
show.legend = FALSE
839+
ggplot2::annotate(
840+
geom = "text",
841+
x = 0,
842+
y = mean(data$.cooksd, na.rm = TRUE),
843+
label = paste("mu", "=", round(mean(data$.cooksd, na.rm = TRUE), 4)),
844+
vjust = -1,
845+
hjust = 0,
846+
color = "red",
847+
angle = 90
851848
) +
852849
outlier_label,
853850
env = list(plot = plot, outlier = input$outlier, outlier_label = outlier_label())
@@ -1039,7 +1036,6 @@ srv_a_regression <- function(id,
10391036
verbatim_content = source_code_r,
10401037
title = "R code for the regression plot",
10411038
)
1042-
10431039
decorated_output_q
10441040
})
10451041
}

R/tm_data_table.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ tm_data_table <- function(label = "Data Table",
112112
})
113113
}
114114
if (!missing(datasets_selected)) {
115-
lifecycle::deprecate_soft(
115+
lifecycle::deprecate_stop(
116116
when = "0.4.0",
117117
what = "tm_data_table(datasets_selected)",
118118
with = "tm_data_table(datanames)",
@@ -158,7 +158,6 @@ ui_page_data_table <- function(id, pre_output = NULL, post_output = NULL) {
158158
ns <- NS(id)
159159

160160
tagList(
161-
include_css_files("custom"),
162161
teal.widgets::standard_layout(
163162
output = teal.widgets::white_small_well(
164163
bslib::page_fluid(

R/tm_file_viewer.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,20 @@ ui_viewer <- function(id, ...) {
103103
ns <- NS(id)
104104

105105
tagList(
106-
include_css_files("custom"),
107106
teal.widgets::standard_layout(
108107
output = tags$div(
109108
uiOutput(ns("output"))
110109
),
111110
encoding = tags$div(
112-
class = "file_viewer_encoding",
111+
style = "overflow-y: hidden; overflow-x: auto;",
113112
tags$label("Encodings", class = "text-primary"),
114113
shinyTree::shinyTree(
115114
ns("tree"),
116115
dragAndDrop = FALSE,
117116
sort = FALSE,
118117
theme = "proton",
119-
multiple = FALSE
118+
multiple = FALSE,
119+
search = TRUE
120120
)
121121
)
122122
)
@@ -172,7 +172,7 @@ srv_viewer <- function(id, input_path) {
172172
tags$img(src = con_type$selected_path, alt = "file does not exist")
173173
} else if (file_extension == "pdf") {
174174
tags$embed(
175-
class = "embed_pdf",
175+
style = "height: 600px; width: 100%;",
176176
src = con_type$selected_path
177177
)
178178
} else if (!isFALSE(con_type$output_text[1])) {

R/tm_front_page.R

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ tm_front_page <- function(label = "Front page",
8383
checkmate::assert_multi_class(additional_tags, classes = c("shiny.tag.list", "html"))
8484
checkmate::assert_character(footnotes, min.len = 0, any.missing = FALSE)
8585
if (!missing(show_metadata)) {
86-
lifecycle::deprecate_soft(
86+
lifecycle::deprecate_stop(
8787
when = "0.4.0",
8888
what = "tm_front_page(show_metadata)",
8989
with = "tm_front_page(datanames)",
@@ -119,33 +119,32 @@ ui_front_page <- function(id, ...) {
119119
ns <- NS(id)
120120

121121
tagList(
122-
include_css_files("custom"),
123122
tags$div(
124123
id = "front_page_content",
125-
class = "ml-8",
124+
style = "margin-left: 2rem;",
126125
tags$div(
127126
id = "front_page_headers",
128127
get_header_tags(args$header_text)
129128
),
130129
tags$div(
131130
id = "front_page_tables",
132-
class = "ml-4",
131+
style = "margin-left: 2rem;",
133132
get_table_tags(args$tables, ns)
134133
),
135134
tags$div(
136135
id = "front_page_custom_html",
137-
class = "my-4",
136+
style = "margin-left: 2rem;",
138137
args$additional_tags
139138
),
140139
if (length(args$datanames) > 0L) {
141140
tags$div(
142141
id = "front_page_metabutton",
143-
class = "m-4",
142+
style = "margin: 1rem;",
144143
actionButton(ns("metadata_button"), "Show metadata")
145144
)
146145
},
147146
tags$footer(
148-
class = ".small",
147+
class = "small",
149148
get_footer_tags(args$footnotes)
150149
)
151150
)
@@ -228,7 +227,7 @@ get_table_tags <- function(tables, ns) {
228227
tableOutput(ns(paste0("table_", idx)))
229228
)
230229
}))
231-
return(table_tags)
230+
table_tags
232231
}
233232

234233
get_footer_tags <- function(footnotes) {
@@ -255,11 +254,11 @@ convert_metadata_to_dataframe <- function(raw_metadata, datanames) {
255254
if (is.null(metadata)) {
256255
return(data.frame(Dataset = character(0), Name = character(0), Value = character(0)))
257256
}
258-
return(data.frame(
257+
data.frame(
259258
Dataset = dataname,
260259
Name = names(metadata),
261260
Value = unname(unlist(lapply(metadata, as.character)))
262-
))
261+
)
263262
}, raw_metadata, datanames, SIMPLIFY = FALSE)
264263
do.call(rbind, output)
265264
}

R/tm_g_association.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,6 @@ srv_tm_g_association <- function(id,
552552
verbatim_content = source_code_r,
553553
title = "Association Plot"
554554
)
555-
556555
decorated_output_grob_q
557556
})
558557
}

R/tm_g_bivariate.R

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -755,9 +755,6 @@ srv_g_bivariate <- function(id,
755755
verbatim_content = source_code_r,
756756
title = "Bivariate Plot"
757757
)
758-
759-
760-
761758
decorated_output_q_facets
762759
})
763760
}

0 commit comments

Comments
 (0)