Skip to content

Commit

Permalink
merge with dev + update artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc-André Rivet committed Jan 14, 2020
1 parent c107e0f commit 50b9635
Show file tree
Hide file tree
Showing 91 changed files with 2,715 additions and 655 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence
* @alexcjohnson @byronz @Marc-Andre-Rivet
* @alexcjohnson @Marc-Andre-Rivet
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.build_cache/
build/
dist/
lib/
Expand All @@ -13,3 +14,4 @@ venv/
*.log
.idea/
.DS_Store
dash_core_components_base/plotly.min.js
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [1.7.0] - 2020-01-14
### Added
- [#711](https://github.com/plotly/dash-core-components/pull/711) Added support for `dcc.Link` (dccLink) and nested `dcc.Markdown` (dccMarkdown) react components inside of `dcc.Markdown`
- [#706](https://github.com/plotly/dash-core-components/pull/706)
- Added new `responsive` property that overrides the underlying Plotly.js graph responsiveness from Dash-land
- Added responsiveness on graph parent element resize (previously only worked on window.resize)
- Added new `dash-graph--pending` class to dcc.Graph, present while resizing, (re-)rendering, loading

### Changed
- [#723](https://github.com/plotly/dash-core-components/pull/723) Changed npm package content to allow source code inclusion from other projects
- [#725](https://github.com/plotly/dash-core-components/pull/725) Improve async graph performance by parallelizing resource fetching instead of fetching sequentially
- [#720](https://github.com/plotly/dash-core-components/pull/720) `highlight.js` is now bundled into the package, and no longer sets the `window.hljs` variable. Similarly to how `plotly.js` is handled, it is overridden by a user-provided version if one exists.

### Updated
- [#732](https://github.com/plotly/dash-core-components/pull/732)
- Upgraded plotly.js to [1.52.1](https://github.com/plotly/plotly.js/releases/tag/v1.52.1)
- [Feature release 1.52.0](https://github.com/plotly/plotly.js/releases/tag/v1.52.0) which contains:
- Enable loading locale bundles before plotly.js bundles [#4453](https://github.com/plotly/plotly.js/pull/4453)
- `ko` localization [#4315](https://github.com/plotly/plotly.js/pull/4315)
- Patch release [1.52.1](https://github.com/plotly/plotly.js/releases/tag/v1.52.1) containing several bug fixes.
- [#706](https://github.com/plotly/dash-core-components/pull/706)
- Upgraded plotly.js to [1.51.3](https://github.com/plotly/plotly.js/releases/tag/v1.51.3)

## [1.6.0] - 2019-11-27
### Updated
- Upgraded plotly.js to 1.51.2 [#708](https://github.com/plotly/dash-core-components/pull/708)
Expand Down
4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ Locally](README.md#testing-locally) section of README.md.
## Updating Plotly.js

1. Update the version of `plotly.js` in package.json. Always use an exact version without "^" or "~"
2. Run `npm install` followed by `npm run build`, this will ensure the latest version of Plotly.js is in `node_modules` and copy
that version over with the other build artifacts
3. Update `dash_core_components_base/__init__.py` plotly.js `relative_package_path` and `external_url`
2. Run `npm install` followed by `npm run build`, the Plotly.js artifact will be copied and bundled over as required
4. Update `CHANGELOG.md` with links to the releases and a description of the changes. The message should state (see the existing `CHANGELOG.md` for examples):
* If you're only bumping the patch level, the heading is "Fixed" and the text starts "Patched plotly.js". Otherwise the heading is "Updated" and the text starts "Upgraded plotly.js"
* The new plotly.js version number, and the PR in which this was done
Expand Down
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: dashCoreComponents
Title: Core Interactive UI Components for Dash
Version: 1.6.0
Version: 1.7.0
Description: Dash ships with supercharged components for interactive user interfaces. A core set of components, written and maintained by the Dash team, is available in the dashCoreComponents package. The source for this package is on GitHub: plotly/dash-core-components.
Depends: R (>= 3.0.2)
Imports:
Expand All @@ -11,5 +11,6 @@ BugReports: https://github.com/plotly/dash-core-components/issues
Encoding: UTF-8
LazyData: true
VignetteBuilder: knitr
KeepSource: true
Author: Chris Parmer [aut]
Maintainer: Ryan Patrick Kyle <ryan@plot.ly>
Maintainer: Chris Parmer <chris@plot.ly>
5 changes: 3 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
include dash_core_components/dash_core_components.min.js
include dash_core_components/dash_core_components.min.js.map
include dash_core_components/dash_core_components-shared.js
include dash_core_components/dash_core_components-shared.js.map
include dash_core_components/async~*.js
include dash_core_components/async~*.js.map
include dash_core_components/highlight.pack.js
include dash_core_components/metadata.json
include dash_core_components/package-info.json
include dash_core_components/plotly-*.min.js
include dash_core_components/plotly.min.js
include README.md
include LICENSE.txt
include package.json
6 changes: 3 additions & 3 deletions R/dccGraph.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# AUTO GENERATED FILE - DO NOT EDIT

dccGraph <- function(id=NULL, clickData=NULL, clickAnnotationData=NULL, hoverData=NULL, clear_on_unhover=NULL, selectedData=NULL, relayoutData=NULL, extendData=NULL, restyleData=NULL, figure=NULL, style=NULL, className=NULL, animate=NULL, animation_options=NULL, config=NULL, loading_state=NULL) {
dccGraph <- function(id=NULL, responsive=NULL, clickData=NULL, clickAnnotationData=NULL, hoverData=NULL, clear_on_unhover=NULL, selectedData=NULL, relayoutData=NULL, extendData=NULL, restyleData=NULL, figure=NULL, style=NULL, className=NULL, animate=NULL, animation_options=NULL, config=NULL, loading_state=NULL) {

props <- list(id=id, clickData=clickData, clickAnnotationData=clickAnnotationData, hoverData=hoverData, clear_on_unhover=clear_on_unhover, selectedData=selectedData, relayoutData=relayoutData, extendData=extendData, restyleData=restyleData, figure=figure, style=style, className=className, animate=animate, animation_options=animation_options, config=config, loading_state=loading_state)
props <- list(id=id, responsive=responsive, clickData=clickData, clickAnnotationData=clickAnnotationData, hoverData=hoverData, clear_on_unhover=clear_on_unhover, selectedData=selectedData, relayoutData=relayoutData, extendData=extendData, restyleData=restyleData, figure=figure, style=style, className=className, animate=animate, animation_options=animation_options, config=config, loading_state=loading_state)
if (length(props) > 0) {
props <- props[!vapply(props, is.null, logical(1))]
}
component <- list(
props = props,
type = 'Graph',
namespace = 'dash_core_components',
propNames = c('id', 'clickData', 'clickAnnotationData', 'hoverData', 'clear_on_unhover', 'selectedData', 'relayoutData', 'extendData', 'restyleData', 'figure', 'style', 'className', 'animate', 'animation_options', 'config', 'loading_state'),
propNames = c('id', 'responsive', 'clickData', 'clickAnnotationData', 'hoverData', 'clear_on_unhover', 'selectedData', 'relayoutData', 'extendData', 'restyleData', 'figure', 'style', 'className', 'animate', 'animation_options', 'config', 'loading_state'),
package = 'dashCoreComponents'
)

Expand Down
62 changes: 34 additions & 28 deletions R/internal.R
Original file line number Diff line number Diff line change
@@ -1,108 +1,114 @@
.dashCoreComponents_js_metadata <- function() {
deps_metadata <- list(`dash_core_components` = structure(list(name = "dash_core_components",
version = "1.6.0", src = list(href = NULL,
version = "1.7.0", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'async~datepicker.js',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE, async = TRUE), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "1.6.0", src = list(href = NULL,
version = "1.7.0", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'async~dropdown.js',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE, async = TRUE), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "1.6.0", src = list(href = NULL,
version = "1.7.0", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'async~graph.js',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE, async = TRUE), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "1.6.0", src = list(href = NULL,
version = "1.7.0", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'async~highlight.js',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE, async = TRUE), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "1.7.0", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'async~markdown.js',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE, async = TRUE), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "1.6.0", src = list(href = NULL,
version = "1.7.0", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'async~upload.js',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE, async = TRUE), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "1.6.0", src = list(href = NULL,
version = "1.7.0", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'async~datepicker.js.map',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE, dynamic = TRUE), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "1.6.0", src = list(href = NULL,
version = "1.7.0", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'async~dropdown.js.map',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE, dynamic = TRUE), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "1.6.0", src = list(href = NULL,
version = "1.7.0", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'async~graph.js.map',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE, dynamic = TRUE), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "1.6.0", src = list(href = NULL,
version = "1.7.0", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'async~markdown.js.map',
script = 'async~highlight.js.map',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE, dynamic = TRUE), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "1.6.0", src = list(href = NULL,
version = "1.7.0", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'async~upload.js.map',
script = 'async~markdown.js.map',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE, dynamic = TRUE), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "1.6.0", src = list(href = NULL,
version = "1.7.0", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'highlight.pack.js',
script = 'async~upload.js.map',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE), class = "html_dependency"),
all_files = FALSE, dynamic = TRUE), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "1.6.0", src = list(href = NULL,
version = "1.7.0", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'dash_core_components.min.js',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "1.6.0", src = list(href = NULL,
version = "1.7.0", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'dash_core_components.min.js.map',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE, dynamic = TRUE), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "1.6.0", src = list(href = NULL,
`dash_core_components-shared` = structure(list(name = "dash_core_components-shared",
version = "1.7.0", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'async~graph.js',
script = 'dash_core_components-shared.js',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE, async = TRUE), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "1.6.0", src = list(href = NULL,
all_files = FALSE), class = "html_dependency"),
`dash_core_components-shared` = structure(list(name = "dash_core_components-shared",
version = "1.7.0", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'async~graph.js.map',
script = 'dash_core_components-shared.js.map',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE, dynamic = TRUE), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "1.6.0", src = list(href = NULL,
version = "1.7.0", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'plotly-1.51.2.min.js',
script = 'plotly.min.js',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE, async = 'eager'), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "1.6.0", src = list(href = NULL,
version = "1.7.0", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'async~plotlyjs.js',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE, async = 'lazy'), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "1.6.0", src = list(href = NULL,
version = "1.7.0", src = list(href = NULL,
file = "deps"), meta = NULL,
script = 'async~plotlyjs.js.map',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
Expand Down
20 changes: 17 additions & 3 deletions dash_core_components/Graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ class Graph(Component):
- id (string; optional): The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.
- responsive (a value equal to: true, false, 'auto'; default 'auto'): If True, the Plotly.js plot will be fully responsive to window resize
and parent element resize event. This is achieved by overriding
`config.responsive` to True, `figure.layout.autosize` to True and unsetting
`figure.layout.height` and `figure.layout.width`.
If False, the Plotly.js plot not be responsive to window resize and
parent element resize event. This is achieved by overriding `config.responsive`
to False and `figure.layout.autosize` to False.
If 'auto' (default), the Graph will determine if the Plotly.js plot can be made fully
responsive (True) or not (False) based on the values in `config.responsive`,
`figure.layout.autosize`, `figure.layout.height`, `figure.layout.width`.
This is the legacy behavior of the Graph component.
Needs to be combined with appropriate dimension / styling through the `style` prop
to fully take effect.
- clickData (dict; optional): Data from latest click event. Read-only.
- clickAnnotationData (dict; optional): Data from latest click annotation event. Read-only.
- hoverData (dict; optional): Data from latest hover event. Read-only.
Expand Down Expand Up @@ -154,12 +168,12 @@ class Graph(Component):
- prop_name (string; optional): Holds which property is loading
- component_name (string; optional): Holds the name of the component that is loading"""
@_explicitize_args
def __init__(self, id=Component.UNDEFINED, clickData=Component.UNDEFINED, clickAnnotationData=Component.UNDEFINED, hoverData=Component.UNDEFINED, clear_on_unhover=Component.UNDEFINED, selectedData=Component.UNDEFINED, relayoutData=Component.UNDEFINED, extendData=Component.UNDEFINED, restyleData=Component.UNDEFINED, figure=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, animate=Component.UNDEFINED, animation_options=Component.UNDEFINED, config=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
self._prop_names = ['id', 'clickData', 'clickAnnotationData', 'hoverData', 'clear_on_unhover', 'selectedData', 'relayoutData', 'extendData', 'restyleData', 'figure', 'style', 'className', 'animate', 'animation_options', 'config', 'loading_state']
def __init__(self, id=Component.UNDEFINED, responsive=Component.UNDEFINED, clickData=Component.UNDEFINED, clickAnnotationData=Component.UNDEFINED, hoverData=Component.UNDEFINED, clear_on_unhover=Component.UNDEFINED, selectedData=Component.UNDEFINED, relayoutData=Component.UNDEFINED, extendData=Component.UNDEFINED, restyleData=Component.UNDEFINED, figure=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, animate=Component.UNDEFINED, animation_options=Component.UNDEFINED, config=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
self._prop_names = ['id', 'responsive', 'clickData', 'clickAnnotationData', 'hoverData', 'clear_on_unhover', 'selectedData', 'relayoutData', 'extendData', 'restyleData', 'figure', 'style', 'className', 'animate', 'animation_options', 'config', 'loading_state']
self._type = 'Graph'
self._namespace = 'dash_core_components'
self._valid_wildcard_attributes = []
self.available_properties = ['id', 'clickData', 'clickAnnotationData', 'hoverData', 'clear_on_unhover', 'selectedData', 'relayoutData', 'extendData', 'restyleData', 'figure', 'style', 'className', 'animate', 'animation_options', 'config', 'loading_state']
self.available_properties = ['id', 'responsive', 'clickData', 'clickAnnotationData', 'hoverData', 'clear_on_unhover', 'selectedData', 'relayoutData', 'extendData', 'restyleData', 'figure', 'style', 'className', 'animate', 'animation_options', 'config', 'loading_state']
self.available_wildcard_properties = []

_explicit_args = kwargs.pop('_explicit_args')
Expand Down
Loading

0 comments on commit 50b9635

Please sign in to comment.