Skip to content

Commit 82d5518

Browse files
committed
remove 'custom.css' argument
1 parent 1992871 commit 82d5518

File tree

8 files changed

+5
-23
lines changed

8 files changed

+5
-23
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: shinycssloaders
22
Title: Add Loading Animations to a 'shiny' Output While It's Recalculating
3-
Version: 1.1.0.9003
3+
Version: 1.1.0.9004
44
Authors@R: c(
55
person("Dean","Attali",email="[email protected]",role=c("aut","cre"),
66
comment = c("Maintainer/developer of shinycssloaders since 2019", ORCID="0000-0002-5645-3493")),

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Unreleased version
22

3+
- **BREAKING CHANGE** Remove `custom.css` argument that has almost no usage. If you still want to achieve a similar behaviour, use `type=0`
34
- Add `delay` argument to show the spinner after a short delay (#95)
45
- Add `inline` argument to allow displaying spinner inline (#25)
56
- Add `width` argument that can be used in rare cases where the spinner has no inherent width (#85)

R/buildSpinner.R

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ buildSpinner <- function(
55
color,
66
size,
77
color.background,
8-
custom.css,
98
proxy.height,
109
id,
1110
image,
@@ -29,16 +28,12 @@ buildSpinner <- function(
2928
if (grepl("rgb", color, fixed = TRUE)) {
3029
stop("shinycssloaders: `color` should be given in hex format (#XXXXXX).")
3130
}
32-
if (is.character(custom.css)) {
33-
stop("shinycssloaders: It looks like you provided a string to `custom.css`, but it needs to be either `TRUE` or `FALSE`. ",
34-
"The actual CSS needs to added to the app's UI.")
35-
}
3631

3732
if (is.null(id)) {
3833
id <- paste0("spinner-", digest::digest(ui_element))
3934
}
4035

41-
css_rules_tag <- get_spinner_css_tag(type, color, size, color.background, custom.css, id,
36+
css_rules_tag <- get_spinner_css_tag(type, color, size, color.background, id,
4237
image, caption, width, output_spinner)
4338

4439
if (!is.null(caption)) {

R/pageSpinner.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ showPageSpinner <- function(
6868
color = getOption("page.spinner.color", default = "#0275D8"),
6969
size = getOption("page.spinner.size", default = 1),
7070
color.background = getOption("page.spinner.color.background"),
71-
custom.css = getOption("page.spinner.custom.css", default = FALSE),
7271
id = getOption("page.spinner.id"),
7372
image = getOption("page.spinner.image"),
7473
image.width = getOption("page.spinner.image.width"),
@@ -88,7 +87,6 @@ showPageSpinner <- function(
8887
color = color,
8988
size = size,
9089
color.background = color.background,
91-
custom.css = custom.css,
9290
id = id,
9391
image = image,
9492
image.width = image.width,

R/utils.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ get_proxy_element <- function(ui_element, proxy.height, hide.ui) {
6565
}
6666
}
6767

68-
get_spinner_css_tag <- function(type, color, size, color.background, custom.css, id, image, caption, width, output_spinner) {
68+
get_spinner_css_tag <- function(type, color, size, color.background, id, image, caption, width, output_spinner) {
6969
base_css <- ""
70-
add_default_style <- (is.null(image) && !custom.css && type != 0)
70+
add_default_style <- (is.null(image) && type != 0)
7171
if (add_default_style) {
7272
if (type %in% c(2, 3) && is.null(color.background)) {
7373
stop("shinycssloaders: For spinner types 2 & 3 you need to specify `color.background`.")

R/withSpinner.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
#' Ignored if `image` is used.
1717
#' @param color.background For certain spinners (type 2-3), you will need to specify the background color of the spinner.
1818
#' Ignored if `image` is used.
19-
#' @param custom.css Set to `TRUE` if you have your own custom CSS that you defined and you don't want the automatic CSS applied to the spinner.
20-
#' Ignored if `image` is used.
2119
#' @param proxy.height If the output UI doesn't specify the output height, you can set a proxy height. For example, `textOutput()` usually needs this parameter. It defaults to "400px"
2220
#' for outputs with undefined height. Ignored if `hide.ui` is set to `FALSE`.
2321
#' @param id The HTML ID to use for the spinner. If you don't provide one, it will be generated automatically.
@@ -64,7 +62,6 @@ withSpinner <- function(
6462
color = getOption("spinner.color", default = "#0275D8"),
6563
size = getOption("spinner.size", default = 1),
6664
color.background = getOption("spinner.color.background"),
67-
custom.css = getOption("spinner.custom.css", default = FALSE),
6865
proxy.height = getOption("spinner.proxy.height"),
6966
id = NULL,
7067
image = getOption("spinner.image"),
@@ -88,7 +85,6 @@ withSpinner <- function(
8885
color = color,
8986
size = size,
9087
color.background = color.background,
91-
custom.css = custom.css,
9288
proxy.height = proxy.height,
9389
id = id,
9490
image = image,

man/showHidePage.Rd

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/withSpinner.Rd

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)