Skip to content

Commit c94e059

Browse files
authored
Merge pull request #2138 from plotly/master-2.6.0
Master 2.6.0
2 parents 8c26eeb + 37aeb3a commit c94e059

File tree

118 files changed

+7431
-6162
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+7431
-6162
lines changed

.pylintrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ disable=fixme,
6868
superfluous-parens,
6969
bad-continuation,
7070
line-too-long,
71-
bad-option-value,
72-
unspecified-encoding
71+
bad-option-value
7372

7473

7574
# Enable the message, report, category or checker with the given id(s). You can

.pylintrc39

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ disable=invalid-name,
159159
line-too-long,
160160
super-with-arguments,
161161
raise-missing-from,
162-
bad-option-value,
163-
unspecified-encoding
162+
bad-option-value
164163

165164
# Enable the message, report, category or checker with the given id(s). You can
166165
# either give multiple identifier separated by comma (,) or put this option

@plotly/dash-generator-test-component-typescript/generator.test.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ describe('Test Typescript component metadata generation', () => {
6161
describe.each([
6262
'TypeScriptComponent',
6363
'TypeScriptClassComponent',
64-
'MemoTypeScriptComponent'
64+
'MemoTypeScriptComponent',
65+
'FCComponent',
6566
])('Test prop type names', componentName => {
6667
const getPropTypeName = (name, data) =>
6768
R.path(propPath(componentName, name).concat('type', 'name'), data);
@@ -256,10 +257,16 @@ describe('Test Typescript component metadata generation', () => {
256257
test('Standard js component is parsed', () => {
257258
expect(R.path(['StandardComponent'], metadata)).toBeDefined();
258259
});
260+
test('Mixed component prop-type & typescript', () => {
261+
expect(R.path(['MixedComponent', 'props', 'prop', 'type', 'name'], metadata)).toBe('arrayOf')
262+
})
259263
});
260-
describe('Test namespace props', () => {
264+
describe('Test special cases', () => {
261265
test('Component with picked boolean prop', () => {
262266
expect(R.path(['WrappedHTML', "props", "autoFocus", "type", "name"], metadata)).toBe("bool");
263-
})
264-
})
267+
});
268+
test('Empty Component', () => {
269+
expect(R.path(['EmptyComponent', 'props'], metadata)).toBeDefined();
270+
});
271+
});
265272
});
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import React from 'react';
2+
3+
const EmptyComponent = () => <div>Empty</div>;
4+
5+
export default EmptyComponent;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from 'react';
2+
import { TypescriptComponentProps } from '../props';
3+
4+
const FCComponent: React.FC<TypescriptComponentProps> = (props) => (
5+
<div>{props.children}</div>
6+
);
7+
8+
export default FCComponent;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import PropTypes from 'prop-types';
2+
import React from 'react';
3+
4+
type Props = {
5+
id?: string;
6+
prop: string[];
7+
}
8+
9+
const MixedComponent: React.FC<Props> = (props) => {
10+
return (
11+
<div id={props.id}>{props.children}</div>
12+
)
13+
}
14+
15+
MixedComponent.propTypes = {
16+
prop: PropTypes.arrayOf(PropTypes.string).isRequired
17+
}
18+
19+
export default MixedComponent;

@plotly/dash-generator-test-component-typescript/src/index.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@ import TypeScriptClassComponent from './components/TypeScriptClassComponent';
33
import MemoTypeScriptComponent from './components/MemoTypeScriptComponent';
44
import StandardComponent from './components/StandardComponent.react';
55
import WrappedHTML from './components/WrappedHTML';
6+
import FCComponent from './components/FCComponent';
7+
import EmptyComponent from './components/EmptyComponent';
8+
import MixedComponent from './components/MixedComponent';
69

710
export {
8-
TypeScriptComponent,
9-
TypeScriptClassComponent,
10-
MemoTypeScriptComponent,
11-
StandardComponent,
12-
WrappedHTML,
11+
TypeScriptComponent,
12+
TypeScriptClassComponent,
13+
MemoTypeScriptComponent,
14+
StandardComponent,
15+
WrappedHTML,
16+
FCComponent,
17+
EmptyComponent,
18+
MixedComponent,
1319
};

CHANGELOG.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,46 @@
22
All notable changes to `dash` will be documented in this file.
33
This project adheres to [Semantic Versioning](https://semver.org/).
44

5+
## [2.6.0] - 2022-07-14
6+
7+
### Added
8+
- [#2109](https://github.com/plotly/dash/pull/2109) Add `maxHeight` to Dropdown options menu.
9+
- [#2039](https://github.com/plotly/dash/pull/2039) Long callback changes:
10+
- Add `background=False` to `dash.callback` to use instead of `app.long_callback`.
11+
- Add previous `app.long_callback` arguments to `dash.callback` (`interval`, `running`, `cancel`, `progress`, `progress_default`, `cache_args_to_ignore`, `manager`)
12+
- [#2110](https://github.com/plotly/dash/pull/2110) Add `search` prop to `dcc.Dropdown` options, allowing to search the dropdown options with something other than the label or value.
13+
14+
### Fixed
15+
- [#2126](https://github.com/plotly/dash/pull/2126) Fix bug where it was not possible to redirect from root when using pages.
16+
- [#2114](https://github.com/plotly/dash/pull/2114) Fix bug [#1978](https://github.com/plotly/dash/issues/1978) where text could not be copied from cells in tables with `cell_selectable=False`.
17+
- [#2102](https://github.com/plotly/dash/pull/2102) Fix bug as reported in [dash-labs #113](https://github.com/plotly/dash-labs/issues/113) where files starting with `.` were not excluded when building `dash.page_registry`.
18+
- [#2100](https://github.com/plotly/dash/pull/2100) Fixes bug where module name in for a custom `not_found_404` page is incorrect in the `dash.page_registry` when not using the `pages` folder.
19+
- [#2098](https://github.com/plotly/dash/pull/2098) Accept HTTP code 400 as well as 401 for JWT expiry
20+
- [#2097](https://github.com/plotly/dash/pull/2097) Fix bug [#2095](https://github.com/plotly/dash/issues/2095) with TypeScript compiler and `React.FC` empty valueDeclaration error & support empty props components.
21+
- [#2104](https://github.com/plotly/dash/pull/2104) Fix bug [#2099](https://github.com/plotly/dash/issues/2099) with Dropdown clearing search value when a value is selected.
22+
- [#2039](https://github.com/plotly/dash/pull/2039) Fix bugs in long callbacks:
23+
- Fix [#1769](https://github.com/plotly/dash/issues/1769) and [#1852](https://github.com/plotly/dash/issues/1852) short interval makes job run in loop.
24+
- Fix [#1974](https://github.com/plotly/dash/issues/1974) returning `no_update` or raising `PreventUpdate` not supported with celery.
25+
- Fix use of the callback context in celery long callbacks.
26+
- Fix support of pattern matching for long callbacks.
27+
- [#2110](https://github.com/plotly/dash/pull/2110) Fix `dcc.Dropdown` search with component as prop for option label.
28+
- [#2131](https://github.com/plotly/dash/pull/2131) Add encoding to file open calls. Fix bug [#2127](https://github.com/plotly/dash/issues/2127).
29+
30+
## Changed
31+
32+
- [#2116](https://github.com/plotly/dash/pull/2116) Rename long callbacks to background callbacks
33+
- Deprecated `dash.long_callback.managers.CeleryLongCallbackManager`, use `dash.CeleryManager` instead.
34+
- Deprecated `dash.long_callback.managers.DiskcacheLongCallbackManager`, use `dash.DiskcacheManager` instead.
35+
- Deprecated dash constructor argument `long_callback_manager` in favor of `background_callback_manager`.
36+
37+
### Updated
38+
- [#2134](https://github.com/plotly/dash/pull/2134) Upgrade Plotly.js to v2.13.1 (from v2.12.1) including [feature release 2.13.0](https://github.com/plotly/plotly.js/releases/tag/v2.13.0) and [patch release 2.13.1](https://github.com/plotly/plotly.js/releases/tag/v2.13.1)
39+
- Add persistent selections via layout attributes `selections`, `newselection`, and `activeselection`, along with an updated UI allowing you to modify a selection you created.
40+
- Add unselected line styling to `parcoords` traces.
41+
- Add more quartile algorithms to `violin` traces.
42+
- More flexible axis `automargin` behavior.
43+
- And several other enhancements and bug fixes.
44+
545
## [2.5.1] - 2022-06-13
646

747
### Fixed
@@ -29,8 +69,8 @@ This feature can be disabled by providing an empty viewport meta tag. e.g. `app
2969

3070
### Fixed
3171

32-
- [#2043](https://github.com/plotly/dash/pull/2043) Fix bug
33-
[#2003](https://github.com/plotly/dash/issues/2003) in which
72+
- [#2043](https://github.com/plotly/dash/pull/2043) Fix bug
73+
[#2003](https://github.com/plotly/dash/issues/2003) in which
3474
`dangerously_allow_html=True` + `mathjax=True` works in some cases, and in some cases not.
3575
- [#2065](https://github.com/plotly/dash/pull/2065) Fix bug [#2064](https://github.com/plotly/dash/issues/2064) rendering of `dcc.Dropdown` with a value but no options.
3676
- [#2047](https://github.com/plotly/dash/pull/2047) Fix bug [#1979](https://github.com/plotly/dash/issues/1979) in which `DASH_DEBUG` as environment variable gets ignored.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"presets": [
3+
["@babel/preset-env", { "exclude": ["proposal-dynamic-import"] }],
4+
"@babel/preset-react"
5+
],
6+
}

0 commit comments

Comments
 (0)