diff --git a/.Rbuildignore b/.Rbuildignore index 0bb1753af..68171b6ad 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -12,6 +12,7 @@ lib/ .prettierrc .circleci .github +.build_cache # demo folder has special meaning in R # this should hopefully make it still diff --git a/CHANGELOG.md b/CHANGELOG.md index 14a3b24d9..97a6f92dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,15 +8,17 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - [#963](https://github.com/plotly/dash-core-components/pull/963) Fixes [#885](https://github.com/plotly/dash-core-components/issues/885) - - This applies the fix from [#878](https://github.com/plotly/dash-core-components/pull/878) to the RangeSlider. - It not only fixes the bug where the tooltips were visible when slider was not, but it also reduces the lag in the + + This applies the fix from [#878](https://github.com/plotly/dash-core-components/pull/878) to the RangeSlider. + It not only fixes the bug where the tooltips were visible when slider was not, but it also reduces the lag in the tooltip when the slider handles are moved. ### Added - [#932](https://github.com/plotly/dash-core-components/pull/932). Adds a new copy to clipboard component. - [#948](https://github.com/plotly/dash-core-components/pull/948)] Adds `disabled_days` prop to `DatePickerRange` and `DatePickerSingle` components. With this prop you can specify days that should be made unselectable in the date picker, in addition to those that fall outside of the range specified by `min_date_allowed` and `max_date_allowed`. +### Changed +- [#972](https://github.com/plotly/dash-core-components/pull/972) Updated R package vignettes and `dash-info.yaml` to regenerate examples without attaching now-deprecated core component packages (`dashHtmlComponents`, `dashCoreComponents`, or `dashTable`). ## [1.16.0] - 2021-04-08 ### Added diff --git a/NAMESPACE b/NAMESPACE index 7c9707ee5..2d40383e9 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -24,5 +24,3 @@ export(dccTab) export(dccTabs) export(dccTextarea) export(dccUpload) -export(dccTimer) -export(dccGeolocation) \ No newline at end of file diff --git a/dash-info.yaml b/dash-info.yaml index 80101cc06..b0f947197 100644 --- a/dash-info.yaml +++ b/dash-info.yaml @@ -14,10 +14,8 @@ r_examples: - name: dccChecklist dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashHtmlComponents) - library(dashCoreComponents) app <- Dash$new() @@ -38,10 +36,8 @@ r_examples: - name: dccInterval dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashHtmlComponents) - library(dashCoreComponents) library(plotly) app <- Dash$new() @@ -89,10 +85,8 @@ r_examples: - name: dccSlider dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashCoreComponents) - library(dashHtmlComponents) app <- Dash$new() @@ -127,10 +121,8 @@ r_examples: - name: dccConfirmDialog dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashCoreComponents) - library(dashHtmlComponents) app <- Dash$new() @@ -164,10 +156,8 @@ r_examples: - name: dccLink dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashCoreComponents) - library(dashHtmlComponents) app <- Dash$new() @@ -196,9 +186,7 @@ r_examples: - name: dccStore dontrun: FALSE code: | - if (interactive() && require(dash)) { - library(dashCoreComponents) - library(dashHtmlComponents) + if (interactive()) { library(dash) app <- Dash$new() @@ -285,10 +273,8 @@ r_examples: - name: dccConfirmDialogProvider dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashCoreComponents) - library(dashHtmlComponents) app <- Dash$new() @@ -296,15 +282,15 @@ r_examples: dccConfirmDialogProvider( children=htmlButton( 'Click Me', - n_clicks = 0 - ), + n_clicks = 0 + ), id='danger-danger-provider', message='Danger danger! Are you sure you want to continue?', submit_n_clicks=NULL - ), + ), htmlDiv(id='output-provider', children='Click the button to submit') - ))) + ))) app$callback( output = list(id = 'output-provider', property = 'children'), @@ -314,20 +300,18 @@ r_examples: return('') } else { paste0('That was a dangerous choice! Submitted ', submit_n_clicks, ' times.') - } - } + } + } - ) + ) app$run_server() } - name: dccLoading dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashCoreComponents) - library(dashHtmlComponents) app <- Dash$new() @@ -372,10 +356,8 @@ r_examples: - name: dccTab dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashCoreComponents) - library(dashHtmlComponents) app <- Dash$new() @@ -409,9 +391,8 @@ r_examples: - name: dccDatePickerRange dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashCoreComponents) app <- Dash$new() @@ -428,10 +409,8 @@ r_examples: - name: dccLocation dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashCoreComponents) - library(dashHtmlComponents) app <- Dash$new() @@ -462,10 +441,8 @@ r_examples: - name: dccTabs dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashCoreComponents) - library(dashHtmlComponents) app <- Dash$new() @@ -499,9 +476,8 @@ r_examples: - name: dccDatePickerSingle dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashCoreComponents) app <- Dash$new() @@ -517,9 +493,8 @@ r_examples: - name: dccLogoutButton dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashCoreComponents) app <- Dash$new() @@ -532,9 +507,8 @@ r_examples: - name: dccTextarea dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashCoreComponents) app <- Dash$new() @@ -552,9 +526,8 @@ r_examples: - name: dccDropdown dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashCoreComponents) app <- Dash$new() @@ -576,10 +549,8 @@ r_examples: - name: dccMarkdown dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashHtmlComponents) - library(dashCoreComponents) app <- Dash$new() @@ -595,7 +566,6 @@ r_examples: dccMarkdown(children = " ```r library(dash) - library(dashHtmlComponents) app <- Dash$new() app$layout(htmlDiv('Dash app code wrapped within an app')) @@ -610,10 +580,8 @@ r_examples: - name: dccUpload dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashCoreComponents) - library(dashHtmlComponents) library(jsonlite) app <- Dash$new() @@ -677,9 +645,8 @@ r_examples: - name: dccGraph dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashCoreComponents) library(plotly) app <- Dash$new() @@ -725,10 +692,8 @@ r_examples: - name: dccRadioItems dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashHtmlComponents) - library(dashCoreComponents) app <- Dash$new() @@ -750,10 +715,8 @@ r_examples: - name: dccInput dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashHtmlComponents) - library(dashCoreComponents) app <- Dash$new() @@ -772,10 +735,8 @@ r_examples: - name: dccRangeSlider dontrun: FALSE code: | - if (interactive() && require(dash)) { + if (interactive()) { library(dash) - library(dashHtmlComponents) - library(dashCoreComponents) app <- Dash$new() diff --git a/vignettes/dash-core-components.Rmd b/vignettes/dash-core-components.Rmd index 810462fe5..b336551f1 100644 --- a/vignettes/dash-core-components.Rmd +++ b/vignettes/dash-core-components.Rmd @@ -134,8 +134,7 @@ __*Simple Slider Example*__ An example of a basic slider tied to a callback. ```r -library(dashCoreComponents) -library(dashHtmlComponents) +library(dash) app <- Dash$new() @@ -202,8 +201,6 @@ dccSlider( __*Non-Linear Slider and Updatemode*__ ```r -library(dashCoreComponents) -library(dashHtmlComponents) library(dash) transform_value = function(value){ @@ -245,8 +242,7 @@ __*Simple RangeSlider Example*__ An example of a basic RangeSlider tied to a callback. ```r -library(dashCoreComponents) -library(dashHtmlComponents) +library(dash) app <- Dash$new() @@ -299,7 +295,8 @@ __*Included and Styling Marks*__ By default, `included=TRUE`, meaning the rail trailing the handle will be highlighted. To have the handle act as a discrete value set `included=FALSE`. To style marks, include a style css attribute alongside the key value. ```r -library(dashCoreComponents) +library(dash) + dccRangeSlider( min=0, max=100, @@ -343,8 +340,6 @@ Create a logarithmic slider by setting `marks` to be logarithmic and adjusting t ```r library(dash) -library(dashCoreComponents) -library(dashHtmlComponents) transform_value = function(value){ return(10 ** value) @@ -384,8 +379,6 @@ app$run_server() __*Update Value on Keypress*__ ``` -library(dashCoreComponents) -library(dashHtmlComponents) library(dash) app <- Dash$new() @@ -416,8 +409,6 @@ __*Update Value on Enter/Blur*__ `dccInput` has properties `n_submit`, which updates when the enter button is pressed, and `n_blur`, which updates when the component loses focus (e.g. tab is pressed or the user clicks outside of the input field). ```r -library(dashCoreComponents) -library(dashHtmlComponents) library(dash) app <- Dash$new() @@ -449,8 +440,8 @@ app$run_server() ### Textarea Component ```r -library(dashCoreComponents) library(dash) + dccTextarea( placeholder = "Enter a value...", value = "This is a TextArea component", @@ -461,8 +452,8 @@ dccTextarea( ### Checklist Component ```r -library(dashCoreComponents) library(dash) + dccChecklist( options=list( list("label" = "New York City", "value" = "NYC"), @@ -474,7 +465,8 @@ dccChecklist( ``` ```r -library(dashCoreComponents) +library(dash) + dccChecklist( options=list( list("label" = "New York City", "value" = "NYC"), @@ -489,8 +481,8 @@ dccChecklist( ### RadioItems Component ```r -library(dashCoreComponents) library(dash) + dccRadioItems( options=list( list("label" = "New York City", "value" = "NYC"), @@ -502,8 +494,8 @@ dccRadioItems( ``` ```r -library(dashCoreComponents) library(dash) + dccRadioItems( options=list( list("label" = "New York City", "value" = "NYC"), @@ -522,8 +514,6 @@ __*Button Basic Example*__ An example of a default button without any extra properties and `n_clicks` in the callback. `n_clicks` is an integer that represents that number of times the button has been clicked. Note that the original value is `NULL`. ```r -library(dashCoreComponents) -library(dashHtmlComponents) library(dash) app <- Dash$new() @@ -555,7 +545,6 @@ __*Button with n_clicks_timestamp*__ This example utilizes the `n_clicks_timestamp` property, which returns an integer representation of time. This is useful for determining when the button was last clicked. ```r -library(dashCoreComponents) library(dash) app <- Dash$new() @@ -985,7 +974,8 @@ These examples are based on the [GitHub Markdown Guide](https://guides.github.co __*Headers*__ ```r -library(dashCoreComponents) +library(dash) + dccMarkdown(' # This is an

tag @@ -996,7 +986,8 @@ dccMarkdown(' ``` ```r -library(dashCoreComponents) +library(dash) + dccMarkdown(' *This text will be italic* @@ -1018,7 +1009,8 @@ __*Lists*__ *Unordered* ```r -library(dashCoreComponents) +library(dash) + dccMarkdown(' * Item 1 * Item 2 @@ -1030,7 +1022,8 @@ dccMarkdown(' __*Block Quotes*__ ```r -library(dashCoreComponents) +library(dash) + dccMarkdown(' > > Block quotes are used to highlight text. @@ -1041,7 +1034,8 @@ dccMarkdown(' __*Links*__ ```r -library(dashCoreComponents) +library(dash) + dccMarkdown(' [Dash User Guide](https://dash.plotly.com/)') ``` @@ -1051,7 +1045,8 @@ __*Inline Code*__ Any block of text surrounded by ` ` will rendered as inline-code. ```r -library(dashCoreComponents) +library(dash) + dccMarkdown(' Inline code snippet = `TRUE` ') ``` @@ -1619,7 +1614,8 @@ app$run_server() ConfirmDialog is used to display the browser's native 'confirm' modal, with an optional message and two buttons ('OK' and 'Cancel'). ```r -library(dashCoreComponents) +library(dash) + confirm <- dccConfirmDialog( id = "confirm", message = "Danger danger! Are you sure you want to continue?" @@ -1629,8 +1625,6 @@ confirm <- dccConfirmDialog( This ConfirmDialog can be used in conjunction with buttons when the user is performing an action that should require an extra step of verification. ```r -library(dashCoreComponents) -library(dashHtmlComponents) library(dash) app = Dash$new() @@ -1694,7 +1688,8 @@ The store component can be used to keep data in the visitor's browser. The data * `session`: keep the data until the browser/tab closes. *For local/session, the data is serialized as json when stored.* ```r -library(dashCoreComponents) +library(dash) + store <- dccStore(id = "my-store", data = list("my-data" = "data")) ``` @@ -1703,8 +1698,6 @@ store <- dccStore(id = "my-store", data = list("my-data" = "data")) Here’s a simple example that wraps the outputs for a couple of `Input` components in the `Loading` component. As you can see, you can define the type of spinner you would like to show (refer to the reference table below for all possible types of spinners). You can modify other attributes as well, such as `fullscreen=TRUE` if you would like the spinner to be displayed fullscreen. Notice that, the Loading component traverses all of it's children to find a loading state, as demonstrated in the second callback, so that even nested children will get picked up. ``` -library(dashCoreComponents) -library(dashHtmlComponents) library(dash) app = Dash$new() diff --git a/vignettes/dash-core-components.html b/vignettes/dash-core-components.html index 67fa38e8f..638291e35 100644 --- a/vignettes/dash-core-components.html +++ b/vignettes/dash-core-components.html @@ -1,14 +1,14 @@ - + - + - + @@ -18,41 +18,69 @@