Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 78cc839

Browse files
committed
Merge branch 'master' into ide
2 parents e839e21 + f9b2e93 commit 78cc839

32 files changed

+4533
-2325
lines changed

.babelrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"extends": "./node_modules/dash-components-archetype/config/babel/babelrc"
2+
"extends": "./node_modules/dash-components-archetype/config/babel/babelrc",
3+
"plugins": [
4+
"styled-jsx/babel"
5+
]
36
}

CHANGELOG.md

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,74 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5-
## [0.24.0] - UNRELEASED
5+
## [0.27.0]
66
### Changed
77
- `dash_core_components/__init__.py` now imports from python class files rather than generating classes at runtime,
88
adding support for IDE autocomplete ect.
99

10-
## [0.23.0] - UNRELEASED
10+
## [0.26.0]
11+
### Added
12+
- New Tabs and Tab components! [#213](https://github.com/plotly/dash-core-components/pull/213#pullrequestreview-135893345)
13+
14+
## [0.25.1]
15+
### Fixed
16+
- `__init__` version formatting for unpkg.
17+
18+
## [0.25.0]
19+
### Added
20+
- `ConfirmDialog` and `ConfirmDialogProvider` components [#211](https://github.com/plotly/dash-core-components/pull/211)
21+
22+
## [0.24.1]
23+
### Fixed
24+
- Improved DatePickerRange, fixing issues [#209](https://github.com/plotly/dash-core-components/issues/209) and [#152](https://github.com/plotly/dash-core-components/issues/152)
25+
- Link component now is a proper <a> tag so you can right click on it, and will scroll back to top. Fixes [#99](https://github.com/plotly/dash-core-components/issues/99), implemented in [#215](https://github.com/plotly/dash-core-components/pull/215)
26+
- Added `max_interval` prop to `Interval` component, fixing issue [#222](https://github.com/plotly/dash-core-components/issues/222)
27+
28+
29+
## [0.24.0]
1130
### Added
1231
- Upgraded Plotly.js, the underlying library behind the
13-
`dash_core_components.Graph` component, to [version 1.38.0](https://github.com/plotly/plotly.js/releases/tag/v1.38.0).
14-
See https://github.com/plotly/plotly.js/releases/tag/v1.38.0 for the official notes.
32+
`dash_core_components.Graph` component, to [version 1.39.1](https://github.com/plotly/plotly.js/releases/tag/v1.39.1).
33+
See https://github.com/plotly/plotly.js/releases/tag/v1.39.1 for the official notes.
1534

1635
Many of these features were funded directly by companies that rely on this library.
1736
If your organization or company would like to sponsor particular features or
1837
bug fixes in these open source libraries, please reach out: http://plot.ly/products/consulting-and-oem
1938

39+
As part of plotly.js release:
40+
- Add support for on-graph text in scattergl traces [#2737](https://github.com/plotly/plotly.js/pull/2737), [#2783](https://github.com/plotly/plotly.js/pull/2783)
41+
- Add gridshape attribute to polar subplots with values 'circular' (the default) and 'linear' (to draw polygon grids) [#2739](https://github.com/plotly/plotly.js/pull/2739)
42+
- Add support for colorbar linked to marker.color values for splom,
43+
scatterpolar and scatterpolargl traces [#2681](https://github.com/plotly/plotly.js/pull/2681)
44+
- Revamp icon settings in custom mode bar buttons, allowing users to specify their own dimensions and SVG transforms [#2762](https://github.com/plotly/plotly.js/pull/2762)
45+
- Add plotlyServerURL config option [#2760](https://github.com/plotly/plotly.js/pull/2760)
46+
- Added no-WebGL warnings for graphs with scattergl, scatterpolargl, splom and parcoords traces [#2697](https://github.com/plotly/plotly.js/pull/2697)
47+
48+
### Fixed
49+
As part of plotly.js release:
50+
- Fix Plotly.react's handling of changing auto-margins [#2681](https://github.com/plotly/plotly.js/pull/2681)
51+
- Make plotting/updating WebGL-based traces fail gracefully when WebGL isn't
52+
supported [#2697](https://github.com/plotly/plotly.js/pull/2697)
53+
- Fix mapbox layout layer updates [#2734](https://github.com/plotly/plotly.js/pull/2734)
54+
- Fix mapbox event inconsistencies [#2766](https://github.com/plotly/plotly.js/pull/2766)
55+
- Correctly emit plotly_relayout at end of scroll on mapbox subplots [#2709](https://github.com/plotly/plotly.js/pull/2709)
56+
- Fix scatter3d scalar hovertext handling [#2698](https://github.com/plotly/plotly.js/pull/2698)
57+
- Fix line decimation for segments crossing the viewport [#2705](https://github.com/plotly/plotly.js/pull/2705)
58+
- Fix surface trace contours when first level has length zero [#2712](https://github.com/plotly/plotly.js/pull/2712)
59+
- Fix contour(x|y|z).highlight partial settings [#2712](https://github.com/plotly/plotly.js/pull/2712)
60+
- Fix old date timezone precision in Chrome 67+ [#2747](https://github.com/plotly/plotly.js/pull/2747)
61+
- Fix x-only zoom moves when xaxis.fixedrange: true[#2776](https://github.com/plotly/plotly.js/pull/2776)
62+
- Fix colorbar edits for parcoords and histogram traces [#2681](https://github.com/plotly/plotly.js/pull/2681)
63+
- Fix bandwidth for single-value violins [#2775](https://github.com/plotly/plotly.js/pull/2775)
64+
- Make Plots.resize work when layout attribute is gone from graph div [#2710](https://github.com/plotly/plotly.js/pull/2710)
65+
- Fix colorscale attribute descriptions [#2658](https://github.com/plotly/plotly.js/pull/2658)
66+
67+
## [0.23.0]
68+
### Added
69+
- Upgraded Plotly.js, the underlying library behind the
70+
`dash_core_components.Graph` component, to [version 1.38.0](https://github.com/plotly/plotly.js/releases/tag/v1.38.0).
71+
See https://github.com/plotly/plotly.js/releases/tag/v1.38.0 for the official notes.
72+
2073
- Add 3D `cone` traces to visualize vector fields [#2641](https://github.com/plotly/plotly.js/pull/2641), [#2647](https://github.com/plotly/plotly.js/pull/2647)
2174
- Add ability to interactively change length and rotate line shapes [#2594](https://github.com/plotly/plotly.js/pull/2594)
2275
- Add `toImageButtonOptions` config object to override to-image mode bar button options [#2607](https://github.com/plotly/plotly.js/pull/2607)

CONTRIBUTING.md

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
1+
# Contributing to dash-core-components
2+
3+
## Getting Started
4+
5+
Refer to the [readme](README.md) for installation and development instructions.
6+
7+
## Contributions
8+
9+
[Dash Core Components][] consist of pluggable components for creating interactive user interfaces. For generic HTML5 elements, see [Dash HTML Components][]. Contributions are welcome! This repository's open [issues][] are a good place to start. Another way to contribute is to [write your own components][] using the [Dash Components Archetype][].
10+
11+
## Coding Style
12+
13+
Please lint any additions to react components with `npm run lint`. Rules defined in [.eslintrc](.eslintrc) are inherited from [`dash-components-archetype`](https://github.com/plotly/dash-components-archetype)'s [eslintrc-react.json][]
14+
15+
## Pull Request Guidelines
16+
17+
Use the [GitHub flow][] when proposing contributions to this repository (i.e. create a feature branch and submit a PR against the master branch).
18+
119
## Running the Tests
220

321
In order to run the tests, you first need to have built the JavaScript
422
`dash_core_components` library. You will need to build the library again if
523
you've pulled from upstream otherwise you may be running with an out of date
6-
`bundle.js`. See the instructions for building `bundle.js` in the "Testing
7-
Locally" section of README.md.
24+
`bundle.js`. See the instructions for building `bundle.js` in the [Testing
25+
Locally](README.md#testing-locally) section of README.md.
826

927
You also need to set the environment variable `TOX_PYTHON_27` and with the
1028
location of the Python 2 installations you want tox to use for creating the
@@ -30,3 +48,48 @@ If you encounter errors about Multi-server + Multi-processing when running under
3048
```
3149
DASH_TEST_CHROMEPATH=/bin/google-chrome-beta DASH_TEST_PROCESSES=1 python -m unittest -v test.test_integration.Tests.test_inputs
3250
```
51+
52+
## Publishing New Components/Features
53+
54+
For now, multiple steps are necessary for publishing to NPM and PyPi,
55+
respectively. TODO:
56+
[#5](https://github.com/plotly/dash-components-archetype/issues/5) will roll up publishing steps into one workflow.
57+
58+
1. Create a pull request and tag the Plotly team (`@plotly/dash`) as well as an appropriate reviewer (frequent [contributors][] are a safe bet).
59+
2. After a review has been done and your changes have been approved, create a prerelease and comment in the PR. Version numbers should follow [semantic versioning][]. To create a prerelease:
60+
* Add `rc1` to `version.py` (`./dash_core_components/version.py`) e.g. `0.13.0rc1`
61+
* Add `-rc1` to `package.json` e.g. `0.13.0-rc1`
62+
* Update the `unpkg` link in `./dash_core_components/__init__.py`, replacing `__version__` with your release candidate (e.g. `"0.13.0-rc1"`)
63+
* Run `npm run publish-all`.
64+
- If needed, ask @chriddyp to get NPM / PyPi package publishing access.
65+
- If the `publish-all` script fails on the `twine` command, try running
66+
```sh
67+
twine upload dist/dash_core_components-X.X.X.tar.gz # where xx.x.x is the version number
68+
```
69+
3. Comment in the PR with the prerelease version
70+
4. Update the top-level comment to include info about how to install, a summary of the changes, and a simple example. For a good example, see the [Confirmation Modal component][].
71+
* This makes it easier for a community member to come in and try it out. As more folks review, it's harder to find the installation instructions deep in the PR
72+
* Keep this top-level comment updated with installation instructions (e.g. the `pip install` command)
73+
5. Make a post in the [Dash Community Forum][]
74+
* Title it `":mega: Announcement! New <Your Feature> - Feedback Welcome"`
75+
* In the description, link to the PR and any relevant issue(s)
76+
* Pin the topic so that it appears at the top of the forum for two weeks
77+
* For a good example, see the [Confirmation Modal announcement][]
78+
79+
## Financial Contributions
80+
81+
If your company wishes to sponsor development of open source dash components, please [get in touch][].
82+
83+
[Dash Core Components]: https://dash.plot.ly/dash-core-components
84+
[Dash HTML Components]: https://github.com/plotly/dash-html-components
85+
[write your own components]: https://dash.plot.ly/plugins
86+
[Dash Components Archetype]: https://github.com/plotly/dash-components-archetype
87+
[issues]: https://github.com/plotly/dash-core-components/issues
88+
[GitHub flow]: https://guides.github.com/introduction/flow/
89+
[eslintrc-react.json]: https://github.com/plotly/dash-components-archetype/blob/master/config/eslint/eslintrc-react.json
90+
[contributors]: https://github.com/plotly/dash-core-components/graphs/contributors
91+
[semantic versioning]: https://semver.org/
92+
[Dash Community Forum]: https://community.plot.ly/c/dash
93+
[Confirmation Modal component]: https://github.com/plotly/dash-core-components/pull/211#issue-195280462
94+
[Confirmation Modal announcement]: https://community.plot.ly/t/announcing-dash-confirmation-modal-feedback-welcome/11627
95+
[get in touch]: https://plot.ly/products/consulting-and-oem

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ include dash_core_components/bundle.js.map
33
include dash_core_components/metadata.json
44
include dash_core_components/[email protected]
55
include dash_core_components/[email protected]
6-
include dash_core_components/plotly-1.38.0.min.js
6+
include dash_core_components/plotly-1.39.1.min.js
77
include dash_core_components/[email protected]
88
include dash_core_components/[email protected]
99
include dash_core_components/[email protected]

README.md

Lines changed: 7 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -59,42 +59,18 @@ You have to maintain the list of components in `demo/Demo.react.js`.
5959

6060
### Code quality and tests
6161

62-
#### To run lint and unit tests:
62+
### To run integration tests (test_integration.py)
63+
We run our integration tests on CircleCI with help from Tox. There’s a tox.ini file which holds the configuration, refer to [tox's documentation](http://tox.readthedocs.io/en/latest/index.html) for help. You may need to set environment variables in your terminal, like `TOX_PYTHON_27` to my version of python that I wanted tox to use. So running:
6364

6465
```sh
65-
$ npm test
66+
export TOX_PYTHON_27=python2
6667
```
6768

68-
#### To run unit tests and watch for changes:
69+
set the `TOX_PYTHON_27` env variable to point to `python2`, which is Python 2.7 running on my machine.
70+
You could also look in `tox.ini` and see which tests it runs, and run those commands yourself:
6971

7072
```sh
71-
$ npm run test-watch
72-
```
73-
74-
#### To debug unit tests in a browser (Chrome):
75-
76-
```sh
77-
$ npm run test-debug
78-
```
79-
80-
1. Wait until Chrome launches.
81-
2. Click the "DEBUG" button in the top right corner.
82-
3. Open up Chrome Devtools (`Cmd+opt+i`).
83-
4. Click the "Sources" tab.
84-
5. Find source files
85-
- Navigate to `webpack:// -> . -> spec/components` to find your test source files.
86-
- Navigate to `webpack:// -> [your/repo/path]] -> dash-core-components -> src` to find your component source files.
87-
6. Now you can set breakpoints and reload the page to hit them.
88-
7. The test output is available in the "Console" tab, or in any tab by pressing "Esc".
89-
90-
#### To run a specific test
91-
92-
In your test, append `.only` to a `describe` or `it` statement:
93-
94-
```javascript
95-
describe.only('Foo component', () => {
96-
// ...
97-
});
73+
python -m unittest test.test_integration
9874
```
9975

10076
### Testing your components in Dash
@@ -135,34 +111,7 @@ $ npm run uninstall-local
135111

136112
## Publishing
137113

138-
For now, multiple steps are necessary for publishing to NPM and PyPi,
139-
respectively. TODO:
140-
[#5](https://github.com/plotly/dash-components-archetype/issues/5) will roll up
141-
publishing steps into one workflow.
142-
143-
Ask @chriddyp to get NPM / PyPi package publishing access.
144-
145-
1. Preparing to publish to NPM
146-
147-
# Bump the package version
148-
$ npm version major|minor|patch
149-
150-
# Push branch and tags to repo
151-
$ git push --follow-tags
152-
153-
2. Preparing to publish to PyPi
154-
155-
# Bump the PyPi package to the same version
156-
$ vi setup.py
157-
158-
# Commit to github
159-
$ git add setup.py
160-
$ git commit -m "Bump pypi package version to vx.x.x"
161-
162-
3. Publish to npm and PyPi
163-
164-
$ npm run publish-all
165-
114+
See the [Publishing New Components/Features](CONTRIBUTING.md#publishing-new-componentsfeatures) section of the Contributing guide for step-by-step instructions on publishing new components.
166115

167116
## Builder / Archetype
168117

circle.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ machine:
88

99
dependencies:
1010
override:
11+
- pip install setuptools --upgrade
12+
- pip install virtualenv
1113
- pip install tox dash==0.23.1
1214
- npm install -g eslint
1315
- npm install --ignore-scripts
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# AUTO GENERATED FILE - DO NOT EDIT
2+
3+
from dash.development.base_component import Component, _explicitize_args
4+
5+
6+
class ConfirmDialog(Component):
7+
"""A ConfirmDialog component.
8+
ConfirmDialog is used to display the browser's native "confirm" modal,
9+
with an optional message and two buttons ("OK" and "Cancel").
10+
This ConfirmDialog can be used in conjunction with buttons when the user
11+
is performing an action that should require an extra step of verification.
12+
13+
Keyword arguments:
14+
- id (string; optional)
15+
- message (string; optional): Message to show in the popup.
16+
- submit_n_clicks (number; optional): Number of times the submit button was clicked
17+
- submit_n_clicks_timestamp (number; optional): Last time the submit button was clicked.
18+
- cancel_n_clicks (number; optional): Number of times the popup was canceled.
19+
- cancel_n_clicks_timestamp (number; optional): Last time the cancel button was clicked.
20+
- displayed (boolean; optional): Set to true to send the ConfirmDialog.
21+
22+
Available events: """
23+
@_explicitize_args
24+
def __init__(self, id=Component.UNDEFINED, message=Component.UNDEFINED, submit_n_clicks=Component.UNDEFINED, submit_n_clicks_timestamp=Component.UNDEFINED, cancel_n_clicks=Component.UNDEFINED, cancel_n_clicks_timestamp=Component.UNDEFINED, displayed=Component.UNDEFINED, **kwargs):
25+
self._prop_names = ['id', 'message', 'submit_n_clicks', 'submit_n_clicks_timestamp', 'cancel_n_clicks', 'cancel_n_clicks_timestamp', 'displayed']
26+
self._type = 'ConfirmDialog'
27+
self._namespace = 'dash_core_components'
28+
self._valid_wildcard_attributes = []
29+
self.available_events = []
30+
self.available_properties = ['id', 'message', 'submit_n_clicks', 'submit_n_clicks_timestamp', 'cancel_n_clicks', 'cancel_n_clicks_timestamp', 'displayed']
31+
self.available_wildcard_properties = []
32+
33+
_explicit_args = kwargs.pop('_explicit_args')
34+
_locals = locals()
35+
_locals.update(kwargs) # For wildcard attrs
36+
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
37+
38+
for k in []:
39+
if k not in args:
40+
raise TypeError(
41+
'Required argument `' + k + '` was not specified.')
42+
super(ConfirmDialog, self).__init__(**args)
43+
44+
def __repr__(self):
45+
if(any(getattr(self, c, None) is not None
46+
for c in self._prop_names
47+
if c is not self._prop_names[0])
48+
or any(getattr(self, c, None) is not None
49+
for c in self.__dict__.keys()
50+
if any(c.startswith(wc_attr)
51+
for wc_attr in self._valid_wildcard_attributes))):
52+
props_string = ', '.join([c+'='+repr(getattr(self, c, None))
53+
for c in self._prop_names
54+
if getattr(self, c, None) is not None])
55+
wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
56+
for c in self.__dict__.keys()
57+
if any([c.startswith(wc_attr)
58+
for wc_attr in
59+
self._valid_wildcard_attributes])])
60+
return ('ConfirmDialog(' + props_string +
61+
(', ' + wilds_string if wilds_string != '' else '') + ')')
62+
else:
63+
return (
64+
'ConfirmDialog(' +
65+
repr(getattr(self, self._prop_names[0], None)) + ')')

0 commit comments

Comments
 (0)