From 5c39930ae1973044a9afbe4e3390a117245513aa Mon Sep 17 00:00:00 2001 From: Carson Date: Thu, 7 Sep 2023 09:50:16 -0500 Subject: [PATCH 1/2] Remove use of html-fill-item-overflow-hidden class --- DESCRIPTION | 4 +++- R/htmlwidgets.R | 16 ++-------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c0b82c0..2c447dc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -21,13 +21,15 @@ URL: https://github.com/ramnathv/htmlwidgets BugReports: https://github.com/ramnathv/htmlwidgets/issues Imports: grDevices, - htmltools (>= 0.5.4), + htmltools (>= 0.5.4.9000), jsonlite (>= 0.9.16), knitr (>= 1.8), rmarkdown, yaml Suggests: testthat +Remotes: + rstudio/htmltools Enhances: shiny (>= 1.1) VignetteBuilder: diff --git a/R/htmlwidgets.R b/R/htmlwidgets.R index 2c78cec..460c5d7 100644 --- a/R/htmlwidgets.R +++ b/R/htmlwidgets.R @@ -183,14 +183,7 @@ toHTML <- function(x, standalone = FALSE, knitrOptions = NULL) { width = validateCssUnit(sizeInfo$width), height = validateCssUnit(sizeInfo$height), ), - class = paste( - name, "html-widget", - # bindFillRole() puts `overflow:auto` to items by default, - # which is a sensible generic default, but in the context of - # widgets, we can pretty easily run into non-pixel-perfect situations - # (e.g., the widget JS uses something like offsetHeight to resize itself) - if (sizeInfo$fill) "html-fill-item-overflow-hidden" - ), + class = paste(name, "html-widget"), width = sizeInfo$width, height = sizeInfo$height ) @@ -488,12 +481,7 @@ shinyWidgetOutput <- function(outputId, name, width, height, package = name, class = paste0( name, " html-widget html-widget-output", if (reportSize) " shiny-report-size", - if (reportTheme) " shiny-report-theme", - # bindFillRole() puts `overflow:auto` to items by default, - # which is a sensible generic default, but in the context of - # widgets, we can pretty easily run into non-pixel-perfect situations - # (e.g., the widget JS uses something like offsetHeight to resize itself) - if (fill) " html-fill-item-overflow-hidden" + if (reportTheme) " shiny-report-theme" ), style = css( width = validateCssUnit(width), From 91968f7220dbcc5d5988b96efd13e7b2fef8bb68 Mon Sep 17 00:00:00 2001 From: Carson Sievert Date: Mon, 6 Nov 2023 10:18:09 -0600 Subject: [PATCH 2/2] Apply suggestions from code review --- DESCRIPTION | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2c447dc..fa38075 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -21,15 +21,13 @@ URL: https://github.com/ramnathv/htmlwidgets BugReports: https://github.com/ramnathv/htmlwidgets/issues Imports: grDevices, - htmltools (>= 0.5.4.9000), + htmltools (>= 0.5.7), jsonlite (>= 0.9.16), knitr (>= 1.8), rmarkdown, yaml Suggests: testthat -Remotes: - rstudio/htmltools Enhances: shiny (>= 1.1) VignetteBuilder: