Skip to content

Commit 8d17466

Browse files
authored
Merge pull request #74 from plotly/0.0.4-issue65
Remove dependencies_* methods in Dash class
2 parents 964e06b + 35f0161 commit 8d17466

4 files changed

Lines changed: 10 additions & 53 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: dashR
22
Title: An interface to the Dash ecosystem for authoring reactive web applications
3-
Version: 0.0.6
3+
Version: 0.0.7
44
Authors@R: c(person("Ryan", "Kyle", role = c("aut", "cre", "trl"), email = "ryan@plot.ly"), person("Chris", "Parmer", role = c("aut"), email = "chris@plot.ly"), person("Carson", "Sievert", role = c("aut")), person(family = "Plotly", role = "cph"))
55
Description: An interface to the Dash ecosystem for authoring reactive web applications.
66
Depends:

R/dash.R

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
#' \describe{
5656
#' \item{`layout(...)`}{
5757
#' Set the layout (i.e., user interface). The layout should be either a
58-
#' collection of dash components (e.g., [coreSlider], [htmlDiv], etc) or
58+
#' collection of DashR components (e.g., [dccSlider], [htmlDiv], etc) or
5959
#' a function which returns a collection of components.
6060
#' }
6161
#' \item{`layout_get(render = TRUE)`}{
@@ -69,15 +69,6 @@
6969
#' provide [input] (and/or [state]) object(s) (which should reference
7070
#' layout components) as argument value(s) to `func`.
7171
#' }
72-
#' \item{`dependencies_set(dependencies = NULL, add = TRUE)`}{
73-
#' Adds additional HTML dependencies to your dash application (beyond the 'internal' dependencies).
74-
#' The `dependencies` argument accepts [htmltools::htmlDependency] or
75-
#' [htmltools::htmlDependencies]. The `section` argument determines whether
76-
#' your dependencies are placed inside `<head>` or `<footer>`.
77-
#' }
78-
#' \item{`dependencies_get(all = FALSE)`}{
79-
#' Retrieve (just user-defined or all) HTML dependencies.
80-
#' }
8172
#' \item{`run_server(host = NULL, port = NULL, block = TRUE, showcase = FALSE, ...)`}{
8273
#' Launch the application. If provided, `host`/`port` set
8374
#' the `host`/`port` fields of the underlying [fiery::Fire] web
@@ -420,37 +411,6 @@ Dash <- R6::R6Class(
420411
invisible(private$layout_render())
421412
},
422413

423-
# ------------------------------------------------------------------------
424-
# HTML dependency management
425-
# ------------------------------------------------------------------------
426-
dependencies_get = function() {
427-
c(private$dependencies_user, private$dependencies)
428-
},
429-
dependencies_get_internal = function() {
430-
private$dependencies_internal
431-
},
432-
dependencies_set = function(dependencies = list(), add = TRUE) {
433-
434-
if (!length(dependencies)) return()
435-
436-
# do a sensible thing if just a single dependency is provided
437-
if (inherits(dependencies, "html_dependency")) {
438-
dependencies <- list(dependencies)
439-
}
440-
441-
# ensure we have a list of htmltools::htmlDependency
442-
is_dep <- vapply(dependencies, inherits, logical(1), "html_dependency")
443-
if (any(!is_dep)) {
444-
stop("`dependencies` must be a *list* of htmltools::htmlDependency objects", call. = FALSE)
445-
}
446-
447-
if (add) {
448-
dependencies <- c(private$dependencies_user, dependencies)
449-
}
450-
451-
private$dependencies_user <- dependencies
452-
},
453-
454414
react_version_set = function(version) {
455415
versions <- private$react_versions()
456416
idx <- versions %in% version

man/Dash.Rd

Lines changed: 1 addition & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/dashR-package.Rd

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)