From a928fad164852af99628b5421170d02c8cf3ea0a Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Thu, 2 Nov 2023 13:54:00 -0400 Subject: [PATCH] Revert "Change entry-point for dependencies to be bs_theme_dependencies() instead of page() constructors" This reverts commit 147462a9f4e5629cfe161c5ec015390f97dde1a2 from #810 --- R/bs-dependencies.R | 1 - R/page.R | 19 ++++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/R/bs-dependencies.R b/R/bs-dependencies.R index 9d224eb03..044b4e803 100644 --- a/R/bs-dependencies.R +++ b/R/bs-dependencies.R @@ -146,7 +146,6 @@ bs_theme_dependencies <- function( meta = list(viewport = "width=device-width, initial-scale=1, shrink-to-fit=no") ) ), - if (version >= 5) component_dependencies(), htmlDependencies(out_file) )) } diff --git a/R/page.R b/R/page.R index f57d61baa..083659813 100644 --- a/R/page.R +++ b/R/page.R @@ -25,7 +25,8 @@ page <- function(..., title = NULL, theme = bs_theme(), lang = NULL) { tags$body(...), title = title, theme = theme, - lang = lang + lang = lang, + component_dependencies() ), theme = theme ) @@ -37,7 +38,13 @@ page <- function(..., title = NULL, theme = bs_theme(), lang = NULL) { #' @export page_fluid <- function(..., title = NULL, theme = bs_theme(), lang = NULL) { as_page( - shiny::fluidPage(..., title = title, theme = theme, lang = lang), + shiny::fluidPage( + ..., + title = title, + theme = theme, + lang = lang, + component_dependencies() + ), theme = theme ) } @@ -49,7 +56,13 @@ page_fluid <- function(..., title = NULL, theme = bs_theme(), lang = NULL) { #' @export page_fixed <- function(..., title = NULL, theme = bs_theme(), lang = NULL) { as_page( - shiny::fixedPage(..., title = title, theme = theme, lang = lang), + shiny::fixedPage( + ..., + title = title, + theme = theme, + lang = lang, + component_dependencies() + ), theme = theme ) }