diff --git a/DESCRIPTION b/DESCRIPTION index fe256dd..903ce18 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: shinyjs Title: Easily Improve the User Experience of Your Shiny Apps in Seconds -Version: 2.1.0.9005 +Version: 2.1.0.9006 Authors@R: person("Dean", "Attali", email = "daattali@gmail.com", role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index 2a5dee8..0dde566 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ # Unreleased version - **BREAKING CHANGE** The `useShinyjs()` function no longer accepts any parameters. The `rmd` and `html` arguments are not needed (they are now detected automatically). The `debug` argument is now set using R options: `options("shinyjs.debug" = TRUE)`. +- **DEPRECATION NOTICE** The `runExample()` function is no longer required since {shiny} version 1.8.1 (March 2024). You can now use `shiny::runExample("demo", package = "shinyjs")` instead of `shinyjs::runExample("demo")`. - Fix bug: `hidden()` and `disabled()` now work with tags that have a `htmlDependency()` (#252) - Fix bug: `hidden()` and `disabled()` now return a `tagList()` instead of a `list()` when appropriate - Fix bug: `disable()` now works with file inputs (#249) diff --git a/R/runExample.R b/R/runExample.R index cce2f03..4e64bff 100644 --- a/R/runExample.R +++ b/R/runExample.R @@ -1,11 +1,15 @@ -#' Run shinyjs examples +#' Run shinyjs examples \[DEPRECATED\] #' #' Launch a \code{shinyjs} example Shiny app that shows how to #' easily use \code{shinyjs} in an app.\cr\cr #' Run without any arguments to see a list of available example apps. #' The "demo" example is also #' \href{https://daattali.com/shiny/shinyjs-demo/}{available online} -#' to experiment with. +#' to experiment with.\cr\cr +#' **Deprecation Notice:** This function is no longer required since Shiny version +#' 1.8.1 (March 2024). This function will be removed in a future release of \{shinyjs\}. +#' You can use `shiny::runExample("demo", package = "shinyjs")` instead of +#' `shinyjs::runExample("demo")`. #' #' @param example The app to launch #' @examples @@ -19,11 +23,13 @@ #' } #' @export runExample <- function(example) { + message("WARNING: `shinyjs::runExample()` is deprecated. Please upgrade to {shiny} version 1.8.1 ", + "and use `shiny::runExample(package = \"shinyjs\")` instead.\n") validExamples <- paste0( 'Valid examples are: "', - paste(list.files(system.file("examples", package = "shinyjs")), + paste(list.files(system.file("examples-shiny", package = "shinyjs")), collapse = '", "'), '"') @@ -34,7 +40,7 @@ runExample <- function(example) { return(invisible(NULL)) } - appDir <- system.file("examples", example, + appDir <- system.file("examples-shiny", example, package = "shinyjs") if (appDir == "") { errMsg(sprintf("could not find example app `%s`\n%s", diff --git a/inst/examples/basic/app.R b/inst/examples-shiny/basic/app.R similarity index 100% rename from inst/examples/basic/app.R rename to inst/examples-shiny/basic/app.R diff --git a/inst/examples/basic/helper-text.R b/inst/examples-shiny/basic/helper-text.R similarity index 100% rename from inst/examples/basic/helper-text.R rename to inst/examples-shiny/basic/helper-text.R diff --git a/inst/examples/demo/helpers.R b/inst/examples-shiny/demo/helpers.R similarity index 100% rename from inst/examples/demo/helpers.R rename to inst/examples-shiny/demo/helpers.R diff --git a/inst/examples/demo/server.R b/inst/examples-shiny/demo/server.R similarity index 100% rename from inst/examples/demo/server.R rename to inst/examples-shiny/demo/server.R diff --git a/inst/examples/demo/ui.R b/inst/examples-shiny/demo/ui.R similarity index 100% rename from inst/examples/demo/ui.R rename to inst/examples-shiny/demo/ui.R diff --git a/inst/examples/demo/www/github-green-right.png b/inst/examples-shiny/demo/www/github-green-right.png similarity index 100% rename from inst/examples/demo/www/github-green-right.png rename to inst/examples-shiny/demo/www/github-green-right.png diff --git a/inst/examples/demo/www/header.png b/inst/examples-shiny/demo/www/header.png similarity index 100% rename from inst/examples/demo/www/header.png rename to inst/examples-shiny/demo/www/header.png diff --git a/inst/examples/demo/www/style.css b/inst/examples-shiny/demo/www/style.css similarity index 100% rename from inst/examples/demo/www/style.css rename to inst/examples-shiny/demo/www/style.css diff --git a/inst/examples/sandbox/helpers.R b/inst/examples-shiny/sandbox/helpers.R similarity index 100% rename from inst/examples/sandbox/helpers.R rename to inst/examples-shiny/sandbox/helpers.R diff --git a/inst/examples/sandbox/server.R b/inst/examples-shiny/sandbox/server.R similarity index 100% rename from inst/examples/sandbox/server.R rename to inst/examples-shiny/sandbox/server.R diff --git a/inst/examples/sandbox/ui.R b/inst/examples-shiny/sandbox/ui.R similarity index 100% rename from inst/examples/sandbox/ui.R rename to inst/examples-shiny/sandbox/ui.R diff --git a/inst/examples/sandbox/www/github-green-right.png b/inst/examples-shiny/sandbox/www/github-green-right.png similarity index 100% rename from inst/examples/sandbox/www/github-green-right.png rename to inst/examples-shiny/sandbox/www/github-green-right.png diff --git a/inst/examples/sandbox/www/header.png b/inst/examples-shiny/sandbox/www/header.png similarity index 100% rename from inst/examples/sandbox/www/header.png rename to inst/examples-shiny/sandbox/www/header.png diff --git a/inst/examples/sandbox/www/style.css b/inst/examples-shiny/sandbox/www/style.css similarity index 100% rename from inst/examples/sandbox/www/style.css rename to inst/examples-shiny/sandbox/www/style.css diff --git a/man/runExample.Rd b/man/runExample.Rd index ddbec34..fbabe01 100644 --- a/man/runExample.Rd +++ b/man/runExample.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/runExample.R \name{runExample} \alias{runExample} -\title{Run shinyjs examples} +\title{Run shinyjs examples [DEPRECATED]} \usage{ runExample(example) } @@ -15,7 +15,11 @@ easily use \code{shinyjs} in an app.\cr\cr Run without any arguments to see a list of available example apps. The "demo" example is also \href{https://daattali.com/shiny/shinyjs-demo/}{available online} -to experiment with. +to experiment with.\cr\cr +\strong{Deprecation Notice:} This function is no longer required since Shiny version +1.8.1 (March 2024). This function will be removed in a future release of \{shinyjs\}. +You can use \code{shiny::runExample("demo", package = "shinyjs")} instead of +\code{shinyjs::runExample("demo")}. } \examples{ ## Only run this example in interactive R sessions