Skip to content

Commit d419517

Browse files
committed
Remove references to dash namespace within package
1 parent 7c76953 commit d419517

9 files changed

Lines changed: 48 additions & 48 deletions

File tree

R/dependencies.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ setWildcardId <- function(id) {
1212

1313
#' Input/Output/State definitions
1414
#'
15-
#' Use in conjunction with the `callback()` method from the [dash::Dash] class
15+
#' Use in conjunction with the `callback()` method from the [Dash] class
1616
#' to define the update logic in your application.
1717
#'
1818
#' The `dashNoUpdate()` function permits application developers to prevent a

R/simple_table.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#' if (interactive()) {
88
#' app <- dash_app() %>%
99
#' set_layout(
10-
#' dash::dccChecklist(
10+
#' dccChecklist(
1111
#' id = "table_params",
1212
#' labelStyle = list(display = "block"),
1313
#' options = list(

R/utils.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,7 @@ is_dash_app <- function(x) {
15471547

15481548
assert_dash <- function(x) {
15491549
if (!is_dash_app(x)) {
1550-
stop("You must provide a Dash app object (created with `dash::Dash$new()` or `dash::dash_app()`)", call. = FALSE)
1550+
stop("You must provide a Dash app object (created with `Dash$new()` or `dash_app()`)", call. = FALSE)
15511551
}
15521552
invisible(TRUE)
15531553
}
@@ -1559,9 +1559,9 @@ componentify <- function(x) {
15591559
stop("dash: layout cannot include Shiny tags (you might have loaded the {shiny} package after loading {dash})", call. = FALSE)
15601560
} else if (is.list(x)) {
15611561
x <- remove_empty(x)
1562-
dash::htmlDiv(children = lapply(x, componentify))
1562+
htmlDiv(children = lapply(x, componentify))
15631563
} else if (length(x) == 1) {
1564-
dash::htmlSpan(children = x)
1564+
htmlSpan(children = x)
15651565
} else if (is.null(x)) {
15661566
return(NULL)
15671567
} else {

R/wrappers.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#' Create a Dash application
44
#'
5-
#' This is a convenience function that returns a [`dash::Dash`] R6 object.
5+
#' This is a convenience function that returns a [`Dash`] R6 object.
66
#' For advanced usage, you can use the object as an R6 object directly instead
77
#' of the functions provided by the `{dash}` package.
88
#'
@@ -60,7 +60,7 @@ dash_app <- function(title = NULL,
6060
assets_ignore <- ""
6161
}
6262

63-
app <- dash::Dash$new(
63+
app <- Dash$new(
6464
assets_folder = assets_folder,
6565
assets_url_path = assets_url_path,
6666
assets_ignore = assets_ignore,

man/simple_table.Rd

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

tests/manual/callbacks-simple.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ library(dash)
22

33
dash_app() %>%
44
set_layout(
5-
dash::dccInput(id = "text", "sample"),
5+
dccInput(id = "text", "sample"),
66
div("CAPS: ", span(id = "out1")),
77
div("small: ", span(id = "out2"))
88
) %>%

tests/testthat/test-layout.R

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ test_that("Layout errors", {
4141
test_that("Layout basics", {
4242
expect_identical(
4343
set_get_layout_new(div("one"), h2("two")),
44-
set_get_layout_old(dash::htmlDiv(list(
45-
dash::htmlDiv("one"), dash::htmlH2("two")
44+
set_get_layout_old(htmlDiv(list(
45+
htmlDiv("one"), htmlH2("two")
4646
)))
4747
)
4848
expect_identical(set_get_layout_new("one", "two"), set_get_layout_new(list("one", "two")))
4949
expect_identical(
5050
set_get_layout_new(function() div("one", "two")),
51-
set_get_layout_old(function() dash::htmlDiv(list("one", "two")))
51+
set_get_layout_old(function() htmlDiv(list("one", "two")))
5252
)
5353
})
5454

@@ -75,15 +75,15 @@ test_that("No need to place everything in containers and lists", {
7575
expect_error(set_get_layout_old("test"))
7676
expect_identical(
7777
set_get_layout_new(div("one", "two")),
78-
set_get_layout_old(dash::htmlDiv(list("one", "two")))
78+
set_get_layout_old(htmlDiv(list("one", "two")))
7979
)
80-
expect_identical(set_get_layout_new("test"), set_get_layout_old(dash::htmlSpan("test")))
80+
expect_identical(set_get_layout_new("test"), set_get_layout_old(htmlSpan("test")))
8181
expect_identical(
8282
set_get_layout_new("one", 5, TRUE),
83-
set_get_layout_old(dash::htmlDiv(list(
84-
dash::htmlSpan("one"),
85-
dash::htmlSpan(5),
86-
dash::htmlSpan(TRUE)
83+
set_get_layout_old(htmlDiv(list(
84+
htmlSpan("one"),
85+
htmlSpan(5),
86+
htmlSpan(TRUE)
8787
)))
8888
)
8989
})
@@ -101,7 +101,7 @@ test_that("Function as layout works", {
101101
app2 <- Dash$new()
102102
set.seed(1000)
103103
runif(1)
104-
app2$layout(dash::htmlDiv(runif(1)))
104+
app2$layout(htmlDiv(runif(1)))
105105
app2_layout <- app2$layout_get()
106106
expect_identical(app1_layout1, app2_layout)
107107

@@ -114,7 +114,7 @@ test_that("Function as layout works", {
114114
expect_false(identical(app1_fx_layout1, app1_fx_layout2))
115115
app2_fx <- Dash$new()
116116
set.seed(1000)
117-
app2_fx$layout(function() dash::htmlDiv(runif(1)))
117+
app2_fx$layout(function() htmlDiv(runif(1)))
118118
app2_fx_layout1 <- app2_fx$layout_get()
119119
app2_fx_layout2 <- app2_fx$layout_get()
120120
expect_identical(app1_fx_layout1, app2_fx_layout1)
@@ -124,19 +124,19 @@ test_that("Function as layout works", {
124124
test_that("Sample apps layout are identical with the compact syntax", {
125125
expect_identical(
126126
set_get_layout_old(
127-
dash::htmlDiv(list(
128-
dash::htmlDiv('Dash To-Do List'),
129-
dash::dccInput(id = 'new-item'),
130-
dash::htmlButton("Add", id = "add"),
131-
dash::htmlButton("Clear Done", id = "clear-done"),
132-
dash::htmlDiv(id = "list-container"),
133-
dash::htmlDiv(id = "totals")
127+
htmlDiv(list(
128+
htmlDiv('Dash To-Do List'),
129+
dccInput(id = 'new-item'),
130+
htmlButton("Add", id = "add"),
131+
htmlButton("Clear Done", id = "clear-done"),
132+
htmlDiv(id = "list-container"),
133+
htmlDiv(id = "totals")
134134
))
135135
),
136136

137137
set_get_layout_new(
138138
div('Dash To-Do List'),
139-
dash::dccInput(id = 'new-item'),
139+
dccInput(id = 'new-item'),
140140
button("Add", id = "add"),
141141
button("Clear Done", id = "clear-done"),
142142
div(id = "list-container"),
@@ -146,11 +146,11 @@ test_that("Sample apps layout are identical with the compact syntax", {
146146

147147
expect_identical(
148148
set_get_layout_old(
149-
dash::htmlDiv(
149+
htmlDiv(
150150
list(
151-
dash::htmlH1('Hello Dash'),
152-
dash::htmlDiv(children = "Dash: A web application framework for R."),
153-
dash::dccGraph(
151+
htmlH1('Hello Dash'),
152+
htmlDiv(children = "Dash: A web application framework for R."),
153+
dccGraph(
154154
figure=list(
155155
data=list(
156156
list(
@@ -176,7 +176,7 @@ test_that("Sample apps layout are identical with the compact syntax", {
176176
set_get_layout_new(
177177
h1('Hello Dash'),
178178
div("Dash: A web application framework for R."),
179-
dash::dccGraph(
179+
dccGraph(
180180
figure=list(
181181
data=list(
182182
list(

tests/testthat/test-tags.R

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
context("tags")
22

33
test_that("Tag basics", {
4-
expect_identical(div("a", "b"), dash::htmlDiv(list("a", "b")))
5-
expect_identical(div("a", "b", 5), dash::htmlDiv(list("a", "b", 5)))
6-
expect_identical(div("a", "b", 5, id = "test"), dash::htmlDiv(list("a", "b", 5), id = "test"))
4+
expect_identical(div("a", "b"), htmlDiv(list("a", "b")))
5+
expect_identical(div("a", "b", 5), htmlDiv(list("a", "b", 5)))
6+
expect_identical(div("a", "b", 5, id = "test"), htmlDiv(list("a", "b", 5), id = "test"))
77
expect_identical(
88
span("a", 5, id = "test", "b", className = "foo"),
9-
dash::htmlSpan(list("a", 5, "b"), id = "test", className = "foo")
9+
htmlSpan(list("a", 5, "b"), id = "test", className = "foo")
1010
)
1111
expect_identical(
12-
div(span("test"), dash::dccInput("input")),
13-
dash::htmlDiv(list(dash::htmlSpan("test"), dash::dccInput("input")))
12+
div(span("test"), dccInput("input")),
13+
htmlDiv(list(htmlSpan("test"), dccInput("input")))
1414
)
1515
})
1616

1717
test_that("No children", {
18-
expect_identical(div(), dash::htmlDiv())
19-
expect_identical(div(list()), dash::htmlDiv(children = list()))
18+
expect_identical(div(), htmlDiv())
19+
expect_identical(div(list()), htmlDiv(children = list()))
2020
expect_false(identical(div(), div(list())))
21-
expect_identical(div(id = "test"), dash::htmlDiv(id = "test"))
21+
expect_identical(div(id = "test"), htmlDiv(id = "test"))
2222
})
2323

2424
test_that("Illegal attributes", {
@@ -28,9 +28,9 @@ test_that("Illegal attributes", {
2828
})
2929

3030
test_that("Single child is not a list", {
31-
expect_identical(div("a"), dash::htmlDiv("a"))
31+
expect_identical(div("a"), htmlDiv("a"))
3232
expect_false(identical(div("a"), div(list("a"))))
33-
expect_identical(div(list("a", "b")), dash::htmlDiv(list("a", "b")))
33+
expect_identical(div(list("a", "b")), htmlDiv(list("a", "b")))
3434
})
3535

3636
test_that("Boolean and NULL attributes", {

tests/testthat/test-utils.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ test_that("componentify basics", {
2929
div("foo")
3030
)
3131
expect_identical(
32-
componentify(dash::dccInput("foo", "bar")),
33-
dash::dccInput("foo", "bar")
32+
componentify(dccInput("foo", "bar")),
33+
dccInput("foo", "bar")
3434
)
3535
})
3636

@@ -59,10 +59,10 @@ test_that("componentify list", {
5959
div(span("foo"), span("bar"))
6060
)
6161
expect_identical(
62-
componentify(list("foo", dash::dccInput("foo", "bar"), 10, div("bar"))),
62+
componentify(list("foo", dccInput("foo", "bar"), 10, div("bar"))),
6363
div(
6464
span("foo"),
65-
dash::dccInput("foo", "bar"),
65+
dccInput("foo", "bar"),
6666
span(10),
6767
div("bar")
6868
)

0 commit comments

Comments
 (0)