Skip to content

Commit

Permalink
fix(r): new utils, deprecated msg, typo
Browse files Browse the repository at this point in the history
  • Loading branch information
nteetor committed Mar 14, 2020
1 parent 8f89f6e commit e1ed698
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ export(width)
import(rlang)
importFrom(htmltools,HTML)
importFrom(htmltools,attachDependencies)
importFrom(htmltools,div)
importFrom(htmltools,findDependencies)
importFrom(htmltools,htmlDependency)
importFrom(htmltools,resolveDependencies)
Expand Down
6 changes: 3 additions & 3 deletions R/button.R
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,11 @@ updateLinkInput <- function(id, label = NULL, value = NULL,
buttonGroupInput <- function(..., id, choices = NULL, values = choices,
labels = deprecated(),
direction = "horizontal") {
if (is_present(labels)) {
if (!is_missing(labels)) {
deprecate_soft(
"0.2.0",
"buttonGroupInput(labels = )",
"buttonGroupInput(choices = )"
"yonder::buttonGroupInput(labels = )",
"yonder::buttonGroupInput(choices = )"
)

choices <- labels
Expand Down
2 changes: 1 addition & 1 deletion R/design-scroll.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#'
#' @param direction One of `"horizontal"` or `"vertical"` specifying which
#' direction to scroll overflowing content, defaults to `"vertical"`, in which
#' case the content may croll up and down.
#' case the content may scroll up and down.
#'
#' @family design utilities
#' @export
Expand Down
9 changes: 4 additions & 5 deletions R/utils.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# necessary for `createRenderFunction()`
globalVariables("func")

reduce <- function(x, f, init) {
Reduce(f, x, init)
}

drop_nulls <- function(x) {
if (length(x) == 0) {
x
Expand All @@ -9,11 +13,6 @@ drop_nulls <- function(x) {
}
}

# Included until rlang exports `is_present()`
is_present <- function(arg) {
!is_missing(maybe_missing(arg))
}

str_conjoin <- function(x, con = "or") {
if (length(x) == 1) {
return(as.character(x))
Expand Down
2 changes: 1 addition & 1 deletion R/yonder.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#' @importFrom htmltools HTML htmlDependency attachDependencies
#' suppressDependencies resolveDependencies findDependencies tags
#' suppressDependencies resolveDependencies findDependencies tags div
#' tagAppendAttributes tagAppendChildren surroundSingletons takeSingletons
#' @importFrom shiny observe getDefaultReactiveDomain installExprFunction
#' createRenderFunction createWebDependency
Expand Down

0 comments on commit e1ed698

Please sign in to comment.