From 34e939a82c132ad1bb2fee47649e1a7950f2b724 Mon Sep 17 00:00:00 2001 From: Lex Date: Sat, 16 Dec 2023 21:58:11 +1000 Subject: [PATCH] Update changelog --- CHANGELOG.md | 590 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 441 insertions(+), 149 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f987977a8c..151ca3f0a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,17 @@ # Change Log for Dash + All notable changes to `dash` will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/). ## [UNRELEASED] ### Added -- [#2695](https://github.com/plotly/dash/pull/2695) Adds `triggered_id` to `dash_clientside.callback_context`. Fixes [#2692](https://github.com/plotly/dash/issues/2692) + +- [#2695](https://github.com/plotly/dash/pull/2695) Adds `triggered_id` to `dash_clientside.callback_context`. Fixes [#2692](https://github.com/plotly/dash/issues/2692) + +## Changed + +- [#2652](https://github.com/plotly/dash/pull/2652) dcc.Clipboard supports htm_content and triggers a copy to clipboard when n_clicks are changed ## [2.14.2] - 2023-11-27 @@ -40,6 +46,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). **WARNING: dynamic callback creation can be dangerous, use at you own risk. It is not intended for use in a production app, multi-user or multiprocess use as it only works for a single user.** ## [2.13.0] 2023-08-28 + ## Changed - [#2610](https://github.com/plotly/dash/pull/2610) Load plotly.js bundle/version from plotly.py @@ -139,6 +146,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## Updated - [#2533](https://github.com/plotly/dash/pull/2533) and [#2538](https://github.com/plotly/dash/pull/2538) Update Plotly.js to v2.23.2 from v2.20.0. + - Feature release [2.23.0](https://github.com/plotly/plotly.js/releases/tag/v2.23.0) adds legend/colorbar xref/yref. - Feature release [2.22.0](https://github.com/plotly/plotly.js/releases/tag/v2.22.0) adds `legend` references to traces. - Feature release [2.21.0](https://github.com/plotly/plotly.js/releases/tag/v2.21.0) adds `label.texttemplate` to parametric shapes. @@ -171,6 +179,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## [2.9.0] - 2023-03-16 ## Breaking + - [#2450](https://github.com/plotly/dash/pull/2450) Set label style `display: block` if `inline` is false in RadioItems & Checklist components. To keep previous behavior, set `inline=True`. This is already how it was described and worked in our documentation and other places with CSS stylesheets that set the default orientation of RadioItems and Checklist options to vertical (including Dash Design Kit), but for unstyled pages it is a breaking change. ## Added @@ -183,7 +192,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). - Make imported pages act more like regular Python modules - [#2068](https://github.com/plotly/dash/pull/2068) Added `refresh="callback-nav"` in `dcc.Location`. This allows for navigation without refreshing the page when url is updated in a callback. - [#2417](https://github.com/plotly/dash/pull/2417) Add wait_timeout property to customize the behavior of the default wait timeout used for by wait_for_page, fix [#1595](https://github.com/plotly/dash/issues/1595) -- [#2417](https://github.com/plotly/dash/pull/2417) Add the element target text for wait_for_text* error message, fix [#945](https://github.com/plotly/dash/issues/945) +- [#2417](https://github.com/plotly/dash/pull/2417) Add the element target text for wait_for_text\* error message, fix [#945](https://github.com/plotly/dash/issues/945) - [#2425](https://github.com/plotly/dash/pull/2425) Add `add_log_handler=True` to Dash init, if you don't want a log stream handler at all. - [#2260](https://github.com/plotly/dash/pull/2260) Experimental support for React 18. The default is still React v16.14.0, but to use React 18 you can either set the environment variable `REACT_VERSION=18.2.0` before running your app, or inside the app call `dash._dash_renderer._set_react_version("18.2.0")`. THIS FEATURE IS EXPERIMENTAL. It has not been tested with component suites outside the Dash core, and we may add or remove available React versions in any future release. - [#2414](https://github.com/plotly/dash/pull/2414) Add `dash.Patch`for partial update Output props without transferring the previous value in a State. @@ -292,7 +301,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). - [#2237](https://github.com/plotly/dash/pull/2237) Ensure calls to `plotly.js` from `dcc.Graph` are properly sequenced even if React initiates multiple render cycles in quick succession. - [#2218](https://github.com/plotly/dash/pull/2218) Fix bug [#1348](https://github.com/plotly/dash/issues/1348) Validate children prop (required or not). - [#2223](https://github.com/plotly/dash/pull/2223) Exclude hidden folders when building `dash.page_registry`. -- [#2182](https://github.com/plotly/dash/pull/2182) Fix [#2172](https://github.com/plotly/dash/issues/2172) Make it so that when using pages, if `suppress_callback_exceptions=True` the `validation_layout` is not set. +- [#2182](https://github.com/plotly/dash/pull/2182) Fix [#2172](https://github.com/plotly/dash/issues/2172) Make it so that when using pages, if `suppress_callback_exceptions=True` the `validation_layout` is not set. - [#2152](https://github.com/plotly/dash/pull/2152) Fix bug [#2128](https://github.com/plotly/dash/issues/2128) preventing rendering of multiple components inside a dictionary. - [#2187](https://github.com/plotly/dash/pull/2187) Fix confusing error message when trying to use pytest fixtures but `dash[testing]` is not installed. - [#2202](https://github.com/plotly/dash/pull/2202) Fix bug [#2185](https://github.com/plotly/dash/issues/2185) when you copy text with multiple quotes into a table @@ -304,7 +313,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). - [#2175](https://github.com/plotly/dash/pull/2175) Fix [#2173](https://github.com/plotly/dash/issues/2173) callback output of ndarray and no_update check. - [#2146](https://github.com/plotly/dash/pull/2146) Remove leftover debug console.log statement. -- [#2168](https://github.com/plotly/dash/pull/2168) Reverts [#2126](https://github.com/plotly/dash/pull/2126) (supporting redirect from root when using pages) until the new bugs introduced by that PR are fixed. +- [#2168](https://github.com/plotly/dash/pull/2168) Reverts [#2126](https://github.com/plotly/dash/pull/2126) (supporting redirect from root when using pages) until the new bugs introduced by that PR are fixed. ### Updated @@ -317,6 +326,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## [2.6.0] - 2022-07-14 ### Added + - [#2109](https://github.com/plotly/dash/pull/2109) Add `maxHeight` to Dropdown options menu. - [#2039](https://github.com/plotly/dash/pull/2039) Long callback changes: - Add `background=False` to `dash.callback` to use instead of `app.long_callback`. @@ -324,6 +334,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). - [#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. ### Fixed + - [#2126](https://github.com/plotly/dash/pull/2126) Fix bug where it was not possible to redirect from root when using pages. - [#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`. - [#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`. @@ -347,6 +358,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). - Deprecated dash constructor argument `long_callback_manager` in favor of `background_callback_manager`. ### Updated + - [#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) - Add persistent selections via layout attributes `selections`, `newselection`, and `activeselection`, along with an updated UI allowing you to modify a selection you created. - Add unselected line styling to `parcoords` traces. @@ -360,8 +372,8 @@ This project adheres to [Semantic Versioning](https://semver.org/). - [#2087](https://github.com/plotly/dash/pull/2087) Fix bug [#2086](https://github.com/plotly/dash/issues/2086) in which using id as a key within a component's id breaks the new callback context's `args_grouping` function. - [#2084](https://github.com/plotly/dash/pull/2084) In dash 2.5.0, a default viewport meta tag was added as recommended for mobile-optimized sites by [mdn](https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag) -This feature can be disabled by providing an empty viewport meta tag. e.g. `app = Dash(meta_tags=[{"name": "viewport"}])` -- [#2090](https://github.com/plotly/dash/pull/2090), [#2092](https://github.com/plotly/dash/pull/2092). Fixed bug where the `path` to the `pages_folder` was incorrect on Windows. + This feature can be disabled by providing an empty viewport meta tag. e.g. `app = Dash(meta_tags=[{"name": "viewport"}])` +- [#2090](https://github.com/plotly/dash/pull/2090), [#2092](https://github.com/plotly/dash/pull/2092). Fixed bug where the `path` to the `pages_folder` was incorrect on Windows. ### Removed @@ -371,7 +383,7 @@ This feature can be disabled by providing an empty viewport meta tag. e.g. `app ### Added -- [#1947](https://github.com/plotly/dash/pull/1947) Added `pages` - a better way to build multi-page apps. For more information see the [forum post.](https://community.plotly.com/t/introducing-dash-pages-a-dash-2-x-feature-preview/57775) +- [#1947](https://github.com/plotly/dash/pull/1947) Added `pages` - a better way to build multi-page apps. For more information see the [forum post.](https://community.plotly.com/t/introducing-dash-pages-a-dash-2-x-feature-preview/57775) - [#1965](https://github.com/plotly/dash/pull/1965) Add component as props. - [#2049](https://github.com/plotly/dash/pull/2049) Added `wait_for_class_to_equal` and `wait_for_contains_class` methods to `dash.testing` @@ -382,8 +394,8 @@ This feature can be disabled by providing an empty viewport meta tag. e.g. `app ### Fixed - [#2043](https://github.com/plotly/dash/pull/2043) Fix bug -[#2003](https://github.com/plotly/dash/issues/2003) in which -`dangerously_allow_html=True` + `mathjax=True` works in some cases, and in some cases not. + [#2003](https://github.com/plotly/dash/issues/2003) in which + `dangerously_allow_html=True` + `mathjax=True` works in some cases, and in some cases not. - [#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. - [#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. - [#2070](https://github.com/plotly/dash/pull/2070) Fix bug [#2066](https://github.com/plotly/dash/issues/2066) nested types triggering maximum call stack error when building typescript components. @@ -397,7 +409,9 @@ This feature can be disabled by providing an empty viewport meta tag. e.g. `app ## [2.4.0] - 2022-05-11 ### Added + - [#1952](https://github.com/plotly/dash/pull/1952) Improved callback_context + - Closes [#1818](https://github.com/plotly/dash/issues/1818) Closes [#1054](https://github.com/plotly/dash/issues/1054) - adds `dash.ctx`, a more concise name for `dash.callback_context` - adds `ctx.triggered_prop_ids`, a dictionary of the component ids and props that triggered the callback. @@ -439,6 +453,7 @@ This feature can be disabled by providing an empty viewport meta tag. e.g. `app - [#2027](https://github.com/plotly/dash/pull/1751) Improve the error message when a user doesn't wrap children in a list ### Updated + - [#2016](https://github.com/plotly/dash/pull/2016), [#2032](https://github.com/plotly/dash/pull/2032), and [#2042](https://github.com/plotly/dash/pull/2042) Widespread dependency upgrades - Upgrade Plotly.js to v2.12.1 (from v2.11.0). - Feature release [2.12.0](https://github.com/plotly/plotly.js/releases/tag/v2.12.0) adds minor ticks and gridlines, as well as dashed gridlines. @@ -447,7 +462,6 @@ This feature can be disabled by providing an empty viewport meta tag. e.g. `app - Upgrade `black` to v22.3.0 for Python 3.7+ - if you use `dash[ci]` and you call `black`, this may alter your code formatting slightly, including more consistently breaking Python 2 compatibility. - Many other mainly JS dependency upgrades to the internals of Dash renderer and components. These may patch bugs or improve performance. - ## [2.3.1] - 2022-03-29 ### Fixed @@ -458,6 +472,7 @@ This feature can be disabled by providing an empty viewport meta tag. e.g. `app ## [2.3.0] - 2022-03-13 ### Added + - [#1949](https://github.com/plotly/dash/pull/1915) Add built-in MathJax support to both `dcc.Markdown` and `dcc.Graph`. A new boolean prop `mathjax` was added to these two components, defaulting to `False`. Set `mathjax=True` to enable math rendering. This work uses MathJax v3, although `dcc.Graph` and Plotly.js can also be used with MathJax v2. - In `dcc.Markdown` this has two flavors: inline math is any content between single dollar signs, for example `"$E=mc^2$"`, and "display" math (on its own line, potentially multi-line) is delimited by double dollar signs. - In `dcc.Graph`, most text fields (graph and axis titles, trace names, scatter and bar text) can use math, and it's enabled with single dollar sign delimiters. A limitation here is that currently a given piece of text can only be one or the other: if math is found, everything outside the delimiters is ignored. See https://plotly.com/python/LaTeX/ for details. @@ -465,6 +480,7 @@ This feature can be disabled by providing an empty viewport meta tag. e.g. `app - Big thanks to [Equinor](https://www.equinor.com/) for sponsoring this development, including the related work in Plotly.js! ### Updated + - [#1949](https://github.com/plotly/dash/pull/1915) Upgrade Plotly.js to v2.11.0 (from v2.9.0) - [Feature release 2.10.0](https://github.com/plotly/plotly.js/releases/tag/v2.10.0): - Support for MathJax v3 @@ -473,8 +489,8 @@ This feature can be disabled by providing an empty viewport meta tag. e.g. `app - Every trace type can now be rendered in a stricter CSP environment, specifically avoiding `unsafe-eval`. Please note: the `regl`-based traces (`scattergl`, `scatterpolargl`, `parcoords`, and `splom`) are only strict in the `strict` bundle, which is NOT served by default in Dash. To use this bundle with Dash, you must either download it and put it in your `assets/` folder, or include it as an `external_script` from the CDN: https://cdn.plot.ly/plotly-strict-2.11.0.min.js. All other trace types are strict in the normal bundle. - Patch release [2.10.1](https://github.com/plotly/plotly.js/releases/tag/v2.10.1) containing a bugfix for `mesh3d` traces. - ### Fixed + - [#1915](https://github.com/plotly/dash/pull/1915) Fix bug [#1474](https://github.com/plotly/dash/issues/1474) when both dcc.Graph and go.Figure have animation, and when the second animation in Figure is executed, the Frames from the first animation are played instead of the second one. - [#1953](https://github.com/plotly/dash/pull/1953) Fix bug [#1783](https://github.com/plotly/dash/issues/1783) in which a failed hot reloader blocks the UI with alerts. @@ -484,21 +500,25 @@ This feature can be disabled by providing an empty viewport meta tag. e.g. `app ## [2.2.0] - 2022-02-18 ### Added + - [#1923](https://github.com/plotly/dash/pull/1923): - `dash.get_relative_path` - `dash.strip_relative_path` - `dash.get_asset_url` - This is similar to `dash.callback` where you don't need the `app` object. It makes it possible to use these - functions in the `pages` folder of a multi-page app without running into the circular `app` imports issue. + This is similar to `dash.callback` where you don't need the `app` object. It makes it possible to use these + functions in the `pages` folder of a multi-page app without running into the circular `app` imports issue. ### Updated + - [#1911](https://github.com/plotly/dash/pull/1911) Upgrade Plotly.js to v2.9.0 (from v2.8.3). + - Adds `ticklabelstep` to axes to reduce tick labels while still showing all ticks. - Displays the plotly.js version when hovering on the modebar. This helps debugging situations where there might be multiple sources of plotly.js, for example `/assets` vs the versions built into `dcc` or `ddk`. - [#1930](https://github.com/plotly/dash/pull/1930) Upgrade JavaScript dependencies across renderer and all components. ### Fixed + - [#1932](https://github.com/plotly/dash/pull/1932) Fixes several bugs: - Restores compatibility with IE11 [#1925](https://github.com/plotly/dash/issues/1925) - Restores `style_header` text alignment in Dash Table [#1914](https://github.com/plotly/dash/issues/1914) @@ -507,8 +527,10 @@ This feature can be disabled by providing an empty viewport meta tag. e.g. `app ## [2.1.0] - 2022-01-22 ### Changed + - [#1876](https://github.com/plotly/dash/pull/1876) Delays finalizing `Dash.config` attributes not used in the constructor until `init_app()`. - [#1869](https://github.com/plotly/dash/pull/1869), [#1873](https://github.com/plotly/dash/pull/1873) Upgrade Plotly.js to v2.8.3. This includes: + - [Feature release 2.5.0](https://github.com/plotly/plotly.js/releases/tag/v2.5.0): - 3D traces are now compatible with `no-unsafe-eval` CSP rules. - [Feature release 2.6.0](https://github.com/plotly/plotly.js/releases/tag/v2.6.0): @@ -524,164 +546,170 @@ This feature can be disabled by providing an empty viewport meta tag. e.g. `app - This PR also upgrades various other dependencies of dash renderer and component suites. - [#1745](https://github.com/plotly/dash/pull/1745): - Improve our `extras_require`: there are now five options here, each with a well-defined role: - - `dash[dev]`: for developing and building dash components. - - `dash[testing]`: for using the `pytest` plugins in the `dash.testing` module - - `dash[diskcache]`: required if you use `DiskcacheLongCallbackManager` - - `dash[celery]`: required if you use `CeleryLongCallbackManager` - - `dash[ci]`: mainly for internal use, these are additional requirements for the Dash CI tests, exposed for other component libraries to use a matching configuration. + Improve our `extras_require`: there are now five options here, each with a well-defined role: + - `dash[dev]`: for developing and building dash components. + - `dash[testing]`: for using the `pytest` plugins in the `dash.testing` module + - `dash[diskcache]`: required if you use `DiskcacheLongCallbackManager` + - `dash[celery]`: required if you use `CeleryLongCallbackManager` + - `dash[ci]`: mainly for internal use, these are additional requirements for the Dash CI tests, exposed for other component libraries to use a matching configuration. ### Added + - [#1883](https://github.com/plotly/dash/pull/1883) in DataTable added `page_current` to `persisted_props` as requested in [#1860](https://github.com/plotly/dash/issues/1860) +- [#1763](https://github.com/plotly/dash/pull/1763): + ## Dash and Dash Renderer -- [#1763](https://github.com/plotly/dash/pull/1763): - ## Dash and Dash Renderer + - `Input`, `State`, and `Output` now accept components instead of ID strings and Dash `callback` will auto-generate the component's ID under-the-hood if not supplied. This allows usage like: - - `Input`, `State`, and `Output` now accept components instead of ID strings and Dash `callback` will auto-generate the component's ID under-the-hood if not supplied. This allows usage like: + ```python + my_input = dcc.Input() + my_output = html.Div() + app.layout = html.Div([my_input, my_output]) - ```python - my_input = dcc.Input() - my_output = html.Div() - app.layout = html.Div([my_input, my_output]) + @dash.callback(Output(my_output, 'children'), Input(my_input, 'value')) + def update(value): + return f'You have entered {value}' + ``` - @dash.callback(Output(my_output, 'children'), Input(my_input, 'value')) - def update(value): - return f'You have entered {value}' - ``` + Or, if using Python >=3.8 you can use the `:=` walrus operator: - Or, if using Python >=3.8 you can use the `:=` walrus operator: - ```python - app.layout = html.Div([ - my_input := dcc.Input(), - my_output := html.Div() - ]) + ```python + app.layout = html.Div([ + my_input := dcc.Input(), + my_output := html.Div() + ]) - @dash.callback(Output(my_output, 'children'), Input(my_input, 'value')) - def update(value): - return f'You have entered {value}' - ``` + @dash.callback(Output(my_output, 'children'), Input(my_input, 'value')) + def update(value): + return f'You have entered {value}' + ``` [#1894](https://github.com/plotly/dash/pull/1894) restricted this feature so auto-generated IDs are not allowed if the app uses `dash_snapshots` (a Dash Enterprise package) or if the component uses `persistence`, as this can create confusing errors. Callback definitions can still reference components in these cases, but those components must have explicit IDs. - ## Dash Core Components + ## Dash Core Components - ### Rearranged Keyword Arguments & Flexible Types - **`Dropdown`, `RadioItem`, and `Checklist`** - - Rearranged Keyword Arguments - `options` & `value` are now the first two keywords which means they can be supplied as positional arguments without the keyword. Supplying the keywords (`options=` and `value=`) is still supported. - - Flexible Types - `options` can be supplied in two new forms: - 1. An array of `string|number|bool` where `label` and `value` are equal to the items in the list. - 2. A dictionary where the keys and values set as `value` and `label` respectively. + ### Rearranged Keyword Arguments & Flexible Types - Before: + **`Dropdown`, `RadioItem`, and `Checklist`** - ```python - dcc.Dropdown( - options=[ - {'label': 'New York', 'value': 'New York'}, - {'label': 'Montreal', 'value': 'Montreal'}, - ], - value='New York' - ) - ``` + - Rearranged Keyword Arguments - `options` & `value` are now the first two keywords which means they can be supplied as positional arguments without the keyword. Supplying the keywords (`options=` and `value=`) is still supported. + - Flexible Types - `options` can be supplied in two new forms: + 1. An array of `string|number|bool` where `label` and `value` are equal to the items in the list. + 2. A dictionary where the keys and values set as `value` and `label` respectively. - or + Before: - ```python - dcc.Dropdown( - options=[ - {'label': 'New York', 'value': 'NYC'}, - {'label': 'Montreal', 'value': 'MTL'}, - ], - value='New York' - ) - ``` + ```python + dcc.Dropdown( + options=[ + {'label': 'New York', 'value': 'New York'}, + {'label': 'Montreal', 'value': 'Montreal'}, + ], + value='New York' + ) + ``` - After: + or - ```python - dcc.Dropdown(['New York', 'Montreal'], 'New York') - ``` + ```python + dcc.Dropdown( + options=[ + {'label': 'New York', 'value': 'NYC'}, + {'label': 'Montreal', 'value': 'MTL'}, + ], + value='New York' + ) + ``` - Or + After: - ```python - dcc.Dropdown({'NYC': 'New York', 'MTL': 'Montreal'}, 'New York') - ``` + ```python + dcc.Dropdown(['New York', 'Montreal'], 'New York') + ``` - **`RangeSlider` & `Slider`** - - Rearranged Keyword Arugments - `min`, `max`, and `step` are now the first three keyword arguments which means they can be supplied as positional arguments without the keyword. - - Flexible Types - - `step` will be calculated implicitly if not given. - - `marks` will be auto generated if not given. It will use `min` and `max` and will respect `step` if supplied. Auto generated marks labels are SI unit formatted. Around 5 human-readable marks will be created. - - To remove the Slider's marks, set `marks=None`. + Or - Before: + ```python + dcc.Dropdown({'NYC': 'New York', 'MTL': 'Montreal'}, 'New York') + ``` - ```python - dcc.Slider(marks={1: 2, 2: 2, 3: 3}) - ``` + **`RangeSlider` & `Slider`** - After: + - Rearranged Keyword Arugments - `min`, `max`, and `step` are now the first three keyword arguments which means they can be supplied as positional arguments without the keyword. + - Flexible Types + - `step` will be calculated implicitly if not given. + - `marks` will be auto generated if not given. It will use `min` and `max` and will respect `step` if supplied. Auto generated marks labels are SI unit formatted. Around 5 human-readable marks will be created. + - To remove the Slider's marks, set `marks=None`. - ```python - dcc.Slider(min=1, max=3, step=1) - ``` + Before: - Or equivalently: + ```python + dcc.Slider(marks={1: 2, 2: 2, 3: 3}) + ``` - ```python - dcc.Slider(1, 3, 1) - ``` + After: - Step can also be omitted and the `Slider` will attempt to create a nice, human readable step with SI units and around 5 marks: + ```python + dcc.Slider(min=1, max=3, step=1) + ``` - ```python - dcc.Slider(0, 100) - ``` + Or equivalently: - The SI units and ranges supported in `marks` are: - * `µ` - micro, 10⁻⁶ - * `m` - milli, 10⁻³ - * `​` (none) - 10⁰ - * `k` - kilo, 10³ - * `M` - mega, 10⁶ - * `G` - giga, 10⁹ - * `T` - tera, 10¹² - * `P` - peta, 10¹⁵ - * `E` - exa, 10¹⁸ + ```python + dcc.Slider(1, 3, 1) + ``` - _Ranges below 10µ are not supported by the Slider. This is a bug: https://github.com/plotly/dash/issues/1766_ + Step can also be omitted and the `Slider` will attempt to create a nice, human readable step with SI units and around 5 marks: - **`DataTable`** + ```python + dcc.Slider(0, 100) + ``` - - Rearranged Keyword Arguments - `data` and `columns` the first twokeyword arguments which means they can be supplied as positional arguments without the keyword. - - Inferred Properties - If `columns` isn't supplied then it is extracted from the the first row in `data` + The SI units and ranges supported in `marks` are: - Before: + - `µ` - micro, 10⁻⁶ + - `m` - milli, 10⁻³ + - `​` (none) - 10⁰ + - `k` - kilo, 10³ + - `M` - mega, 10⁶ + - `G` - giga, 10⁹ + - `T` - tera, 10¹² + - `P` - peta, 10¹⁵ + - `E` - exa, 10¹⁸ - ```python - dash_table.DataTable(data=df.to_dict('records'), columns=[{'name': i, 'id': i} for i in df.columns]) - ``` + _Ranges below 10µ are not supported by the Slider. This is a bug: https://github.com/plotly/dash/issues/1766_ - After: + **`DataTable`** - ```python - dash_table.DataTable(data=df.to_dict('records')) - ``` + - Rearranged Keyword Arguments - `data` and `columns` the first twokeyword arguments which means they can be supplied as positional arguments without the keyword. + - Inferred Properties - If `columns` isn't supplied then it is extracted from the the first row in `data` - ### New Component Properties + Before: - **`Checklist` & `RadioItems`** + ```python + dash_table.DataTable(data=df.to_dict('records'), columns=[{'name': i, 'id': i} for i in df.columns]) + ``` - - A new property `inline` appends `display: inline-block` to `labelStyle`. + After: - ```python - dcc.Checklist(inline=True) - ``` + ```python + dash_table.DataTable(data=df.to_dict('records')) + ``` + + ### New Component Properties + + **`Checklist` & `RadioItems`** + + - A new property `inline` appends `display: inline-block` to `labelStyle`. + + ```python + dcc.Checklist(inline=True) + ``` ### Fixed + - [#1879](https://github.com/plotly/dash/pull/1879) Delete redundancy in pattern-matching callback implementation, specifically when `ALL` and `MATCH` wildcards are used together. This patch was submitted by an anonymous Dash Enterprise customer. Many thanks! - [#1858](https://github.com/plotly/dash/pull/1858) Support `mini-css-extract-plugin` Webpack plugin with `@plotly/webpack-dash-dynamic-import` node package - used by components to support dash async chunks. Updated dependencies of other `@plotly` node packages. @@ -691,8 +719,9 @@ This feature can be disabled by providing an empty viewport meta tag. e.g. `app - [#1822](https://github.com/plotly/dash/pull/1822) Remove Radium from renderer dependencies, as part of investigating React 17 support. - [#1779](https://github.com/plotly/dash/pull/1779): - - Clean up our handling of serialization problems, including fixing `orjson` for Python 3.6 - - Added the ability for `dash.testing` `percy_snapshot` methods to choose widths to generate. + + - Clean up our handling of serialization problems, including fixing `orjson` for Python 3.6 + - Added the ability for `dash.testing` `percy_snapshot` methods to choose widths to generate. - [#1778](https://github.com/plotly/dash/pull/1778) DataTable: Fix React warnings stating that each child in a list should have a unique "key" prop @@ -704,25 +733,29 @@ This feature can be disabled by providing an empty viewport meta tag. e.g. `app ## Dash and Dash Renderer ### Added + - [#1702](https://github.com/plotly/dash/pull/1702) Added a new `@app.long_callback` decorator to support callback functions that take a long time to run. See the PR and documentation for more information. -- [#1514](https://github.com/plotly/dash/pull/1514) Perform json encoding using the active plotly JSON engine. This will default to the faster orjson encoder if the `orjson` package is installed. +- [#1514](https://github.com/plotly/dash/pull/1514) Perform json encoding using the active plotly JSON engine. This will default to the faster orjson encoder if the `orjson` package is installed. - [#1736](https://github.com/plotly/dash/pull/1736) Add support for `request_refresh_jwt` hook and retry requests that used expired JWT tokens. ### Changed + - [#1679](https://github.com/plotly/dash/pull/1679) Restructure `dash`, `dash-core-components`, `dash-html-components`, and `dash-table` into a singular monorepo and move component packages into `dash`. This change makes the component modules available for import within the `dash` namespace, and simplifies the import pattern for a Dash app. From a development standpoint, all future changes to component modules will be made within the `components` directory, and relevant packages updated with the `dash-update-components` CLI command. - [#1707](https://github.com/plotly/dash/pull/1707) Change the default value of the `compress` argument to the `dash.Dash` constructor to `False`. This change reduces CPU usage, and was made in recognition of the fact that many deployment platforms (e.g. Dash Enterprise) already apply their own compression. If deploying to an environment that does not already provide compression, the Dash 1 behavior may be restored by adding `compress=True` to the `dash.Dash` constructor. - [#1734](https://github.com/plotly/dash/pull/1734) Added `npm run build` script to simplify build process involving `dash-renderer` and subcomponent libraries within `dash`. ### Fixed -- [#1857](https://github.com/plotly/dash/pull/1857) Fixed a regression with `dcc.Slider` and `dcc.RangeSlider` where steps were not being set to marks if None was passed as the prop argument. Added a check to set the min and max based on the range of marks if they are not explicitly defined (for more info, see [#1843](https://github.com/plotly/dash/issues/1843) and [#1851](https://github.com/plotly/dash/issues/1843)). +- [#1857](https://github.com/plotly/dash/pull/1857) Fixed a regression with `dcc.Slider` and `dcc.RangeSlider` where steps were not being set to marks if None was passed as the prop argument. Added a check to set the min and max based on the range of marks if they are not explicitly defined (for more info, see [#1843](https://github.com/plotly/dash/issues/1843) and [#1851](https://github.com/plotly/dash/issues/1843)). ## Dash Core Components + ### Added - [#1729](https://github.com/plotly/dash/pull/1729) Include F#, C#, and MATLAB in markdown code highlighting, for the upcoming .NET and MATLAB flavors of dash. - [#1735](https://github.com/plotly/dash/pull/1735) Upgrade Plotly.js to v2.4.2. This includes: + - [Feature release 2.3.0](https://github.com/plotly/plotly.js/releases/tag/v2.3.0): - More number formatting options due to `d3-format` upgrade. - Many new `geo` projections. @@ -735,11 +768,13 @@ This feature can be disabled by providing an empty viewport meta tag. e.g. `app - [#1735](https://github.com/plotly/dash/pull/1735) New `dcc.Tooltip` component. This is particularly useful for rich hover information on `dcc.Graph` charts, using the `bbox` information included in the event data in plotly.js v2.4.0 ## Dash Table + ### Added - [#1729](https://github.com/plotly/dash/pull/1729) Include F#, C#, and MATLAB in markdown code highlighting, for the upcoming .NET and MATLAB flavors of dash. ## Dash HTML Components + ### Removed - [#1734](https://github.com/plotly/dash/pull/1734) Removed the following obsolete `html` elements - ``, ``, ``, ``, ``, ``. These are obsolete and had been previously removed from the reference table. @@ -747,19 +782,24 @@ This feature can be disabled by providing an empty viewport meta tag. e.g. `app ## [1.21.0] - 2021-07-09 ## Dash and Dash Renderer + ### Added + - [#1675](https://github.com/plotly/dash/pull/1675) Add new `Dash` constructor argument `extra_hot_reload_paths`. This allows you to re-initialize the Python code of the app when non-Python files change, if you know that these files impact the app. ### Changed + - [#1675](https://github.com/plotly/dash/pull/1675) Remove the constraint that `requests_pathname_prefix` ends with `routes_pathname_prefix`. When you are serving your app behind a reverse proxy that rewrites URLs that constraint needs to be violated. - [#1611](https://github.com/plotly/dash/pull/1611) and [#1685](https://github.com/plotly/dash/pull/1685) Package dash-renderer artifacts and dependencies with Dash, and source renderer resources from within Dash. - [#1567](https://github.com/plotly/dash/pull/1567) Julia component generator puts components into `src/jl` - fixes an issue on case-insensitive filesystems when the component name and module name match (modulo case) and no prefix is used. Also reduces JS/Julia clutter in the overloaded `src` directory. ### Fixed + - [#1664](https://github.com/plotly/dash/pull/1664) Fix [#1649](https://github.com/plotly/dash/issues/1649), makes the devtools readable with a dark theme. - [#1640](https://github.com/plotly/dash/pull/1640) Fix [#1475](https://github.com/plotly/dash/issues/1475), missing `timing_information` after certain modifications to Flask behavior ## Dash Core Components + ### Fixed - [#963](https://github.com/plotly/dash-core-components/pull/963) Fixes [#885](https://github.com/plotly/dash-core-components/issues/885) @@ -769,6 +809,7 @@ This feature can be disabled by providing an empty viewport meta tag. e.g. `app tooltip when the slider handles are moved. ### Updated + - [#939](https://github.com/plotly/dash-core-components/pull/939) Upgrade Plotly.js to v2.2.1. Note that this is a major version upgrade to Plotly.js, however we are not treating this as a breaking change for DCC as the majority of breaking changes in Plotly.js do not affect the Dash API. The one exception is that several trace types that have long been deprecated are removed entirely. - [Major release 2.0.0](https://github.com/plotly/plotly.js/releases/tag/v2.0.0): - Stop exporting d3 as `Plotly.d3`, and remove many other deep pieces of the public API. This does not affect the `dcc.Graph` component, but if you make use of `Plotly` from the global scope in some other way you may be affected. @@ -790,50 +831,62 @@ This feature can be disabled by providing an empty viewport meta tag. e.g. `app - [Patch release 2.2.1](https://github.com/plotly/plotly.js/releases/tag/v2.2.1) containing a security fix. ### 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`). ## Dash HTML Components + ### Changed + - [#194](https://github.com/plotly/dash-html-components/pull/194) Updated dependencies and build process - [#190](https://github.com/plotly/dash-core-components/pull/190) Updated R package vignettes and `dash-info.yaml` to regenerate examples without attaching now-deprecated core component packages (`dashHtmlComponents`, `dashCoreComponents`, or `dashTable`). ## Dash Table + ### Fixed + - [#907](https://github.com/plotly/dash-table/pull/907) - Fix a bug where pagination did not work or was not visible. [#834](https://github.com/plotly/dash-table/issues/834) - Fix a bug where if you are on a page that no longer exists after the data is updated, no data is displayed. [#892](https://github.com/plotly/dash-table/issues/892) - ### Added + - [#916](https://github.com/plotly/dash-table/pull/916) + - Added `html` option to `markdown_options` prop. This enables the use of html tags in markdown text. - [#545](https://github.com/plotly/dash-table/issues/545) - - Case insensitive filtering - - New props: `filter_options` - to control case of all filters, `columns.filter_options` - to control filter case for each column - - New operators: `i=`, `ieq`, `i>=`, `ige`, `i>`, `igt`, `i<=`, `ile`, `i<`, `ilt`, `i!=`, `ine`, `icontains` - for case-insensitive filtering, `s=`, `seq`, `s>=`, `sge`, `s>`, `sgt`, `s<=`, `sle`, `s<`, `slt`, `s!=`, `sne`, `scontains` - to force case-sensitive filtering on case-insensitive columns + - Case insensitive filtering + - New props: `filter_options` - to control case of all filters, `columns.filter_options` - to control filter case for each column + - New operators: `i=`, `ieq`, `i>=`, `ige`, `i>`, `igt`, `i<=`, `ile`, `i<`, `ilt`, `i!=`, `ine`, `icontains` - for case-insensitive filtering, `s=`, `seq`, `s>=`, `sge`, `s>`, `sgt`, `s<=`, `sle`, `s<`, `slt`, `s!=`, `sne`, `scontains` - to force case-sensitive filtering on case-insensitive columns ### Changed + - [#918](https://github.com/plotly/dash-core-components/pull/918) Updated all dependencies. In particular the `highlight.js` upgrade changes code highlighting in markdown: we have long used their "github" style, this has been updated to more closely match current github styles. - [#901](https://github.com/plotly/dash-core-components/pull/901) Updated R package `dash-info.yaml` to regenerate example without attaching now-deprecated core component packages (`dashHtmlComponents`, `dashCoreComponents`, or `dashTable`). - ## [1.20.0] - 2021-04-08 ## Dash and Dash Renderer + ### Changed + - [#1531](https://github.com/plotly/dash/pull/1531) Update the format of the docstrings to make them easier to read in the reference pages of Dash Docs and in the console. This also addresses [#1205](https://github.com/plotly/dash/issues/1205) - [#1553](https://github.com/plotly/dash/pull/1553) Increase the z-index of the Dash error menu from 1001 to 1100 in order to make sure it appears above Bootstrap components. ### Fixed + - [#1546](https://github.com/plotly/dash/pull/1546) Validate callback request `outputs` vs `output` to avoid a perceived security issue. ## Dash Core Components + ### Added + - [#863](https://github.com/plotly/dash-core-components/pull/863) Adds a new `Download` component. Along with this several utility functions are added to help construct the appropriate data format: - `dcc.send_file` - send a file from disk - `dcc.send_data_frame` - send a `DataFrame`, using one of its writer methods @@ -841,36 +894,46 @@ This feature can be disabled by providing an empty viewport meta tag. e.g. `app - `dcc.send_string` - send a string or the result of a string writer ### Changed + - [#923](https://github.com/plotly/dash-core-components/pull/923) Set `autoComplete` to off in `dcc.Dropdown`. This fixes [#808](https://github.com/plotly/dash-core-components/issues/808) ### Fixed + - [#930](https://github.com/plotly/dash-core-components/pull/930) Fixed a bug [#867](https://github.com/plotly/dash-core-components/issues/867) with `DatePickerRange` that would sometimes shift the allowed dates by one day. - [#934](https://github.com/plotly/dash-core-components/pull/934) Fixed a bug in `EnhancedTab` component that ignored `disabled_className` property ## Dash HTML Components + ### Fixed + - [#179](https://github.com/plotly/dash-html-components/pull/179) - Fixes [#77](https://github.com/plotly/dash-html-components/issues/77) Added `allow` and `referrerPolicy` properties to `html.Iframe` - [#178](https://github.com/plotly/dash-html-components/pull/178) - Fix [#161](https://github.com/plotly/dash-html-components/issues/161) `data` property, and fix [#129](https://github.com/plotly/dash-html-components/issues/129) obsolete, deprecated, and discouraged elements. No elements were removed, but comments were added to the documentation about these elements detailing their limitations. ## Dash Table + ### Changed + - [#862](https://github.com/plotly/dash-table/pull/862) - update docstrings per https://github.com/plotly/dash/issues/1205 - [#878](https://github.com/plotly/dash-table/pull/878) - update build process to use Webpack 5 and other latest dependencies ## [1.19.0] - 2021-01-19 ## Dash and Dash Renderer + ### Added + - [#1508](https://github.com/plotly/dash/pull/1508) Fix [#1403](https://github.com/plotly/dash/issues/1403): Adds an x button -to close the error messages box. + to close the error messages box. - [#1525](https://github.com/plotly/dash/pull/1525) Adds support for callbacks which have overlapping inputs and outputs. Combined with `dash.callback_context` this addresses many use cases which require circular callbacks. ### Changed + - [#1503](https://github.com/plotly/dash/pull/1506) Fix [#1466](https://github.com/plotly/dash/issues/1466): loosen `dash[testing]` requirements for easier integration in external projects. This PR also bumps many `dash[dev]` requirements. ### Fixed + - [#1530](https://github.com/plotly/dash/pull/1530) Dedent error messages more carefully. - [#1527](https://github.com/plotly/dash/issues/1527) 🐛 `get_asset_url` now pulls from an external source if `assets_external_path` is set. - updated `_add_assets_resource` to build asset urls the same way as `get_asset_url`. @@ -878,25 +941,33 @@ to close the error messages box. - [#1493](https://github.com/plotly/dash/pull/1493) Fix [#1143](https://github.com/plotly/dash/issues/1143), a bug where having a file with one of several common names (test.py, code.py, org.py, etc) that imports a dash component package would make `import dash` fail with a cryptic error message asking whether you have a file named "dash.py" ## Dash Core Components + ### Fixed + - [#905](https://github.com/plotly/dash-core-components/pull/905) Make sure the `figure` prop of `dcc.Graph` receives updates from user interactions in the graph, by using the same `layout` object as provided in the prop rather than cloning it. Fixes [#879](https://github.com/plotly/dash-core-components/issues/879). - [#903](https://github.com/plotly/dash-core-components/pull/903) Part of fixing dash import bug https://github.com/plotly/dash/issues/1143 ### Updated + - [#911](https://github.com/plotly/dash-core-components/pull/911), [#906](https://github.com/plotly/dash-core-components/pull/906) - Upgraded Plotly.js to [1.58.4](https://github.com/plotly/plotly.js/releases/tag/v1.58.4) - Patch Release [1.58.4](https://github.com/plotly/plotly.js/releases/tag/v1.58.4) - Patch Release [1.58.3](https://github.com/plotly/plotly.js/releases/tag/v1.58.3) ### Added + - [#888](https://github.com/plotly/dash-core-components/pull/888) Adds a `drag_value` prop to `dcc.Slider`to be able to fire callbacks from dragging and releasing the slider. ## Dash HTML Components + ### Fixed + - [#169](https://github.com/plotly/dash-html-components/pull/169) - part of fixing dash import bug https://github.com/plotly/dash/issues/1143 ## Dash Table + ### Fixed + - [#854](https://github.com/plotly/dash-table/pull/854) - part of fixing dash import bug https://github.com/plotly/dash/issues/1143 ## [1.18.1] - 2020-12-09 @@ -904,141 +975,185 @@ to close the error messages box. ## [1.18.0] - 2020-12-07 ## [1.17.0] - 2020-10-29 + ### Changed + - [#1442](https://github.com/plotly/dash/pull/1442) Update from React 16.13.0 to 16.14.0 + ### Fixed + - [#1434](https://github.com/plotly/dash/pull/1434) Fix [#1432](https://github.com/plotly/dash/issues/1432) for Julia to import non-core component packages without possible errors. ### Changed + - [#1448](https://github.com/plotly/dash/pull/1448) Provide a hint in the callback error when the user forgot to make `app.callback(...)` a decorator. ## [1.16.3] - 2020-10-07 + ### Fixed + - [#1426](https://github.com/plotly/dash/pull/1426) Fix a regression caused by `flask-compress==1.6.0` causing performance degradation on server requests ## [1.16.2] - 2020-09-25 + ### Fixed + - [#1415](https://github.com/plotly/dash/pull/1415) Fix a regression with some layouts callbacks involving dcc.Tabs, not yet loaded dash_table.DataTable and dcc.Graph to not be called - [#1416](https://github.com/plotly/dash/pull/1416) Make callback graph more robust for complex apps and some specific props (`width` in particular) that previously caused errors. ## [1.16.1] - 2020-09-16 + ### Changed + - [#1376](https://github.com/plotly/dash/pull/1376) Extends the `getTransform` logic in the renderer to handle `persistenceTransforms` for both nested and non-nested persisted props. This was used to to fix [dcc#700](https://github.com/plotly/dash-core-components/issues/700) in conjunction with [dcc#854](https://github.com/plotly/dash-core-components/pull/854) by using persistenceTransforms to strip the time part of the datetime so that datepickers can persist when defined in callbacks. ### Fixed + - [#1408](https://github.com/plotly/dash/pull/1408) Fixes a bug where the callback graph layout would reset whenever a callback fired, losing user-initiated layout changes ([#1402](https://github.com/plotly/dash/issues/1402)) or creating a new force layout ([#1401](https://github.com/plotly/dash/issues/1401)) ## [1.16.0] - 2020-09-03 + ### Added + - [#1371](https://github.com/plotly/dash/pull/1371) You can now get [CSP `script-src` hashes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src) of all added inline scripts by calling `app.csp_hashes()` (both Dash internal inline scripts, and those added with `app.clientside_callback`) . ### Changed + - [#1385](https://github.com/plotly/dash/pull/1385) Closes [#1350](https://github.com/plotly/dash/issues/1350) and fixes a previously undefined callback behavior when multiple elements are stacked on top of one another and their `n_clicks` props are used as inputs of the same callback. The callback will now trigger once with all the triggered `n_clicks` props changes. - [#1179](https://github.com/plotly/dash/pull/1179) New and improved callback graph in the debug menu. Now based on Cytoscape for much more interactivity, plus callback profiling including number of calls, fine-grained time information, bytes sent and received, and more. You can even add custom timing information on the server with `callback_context.record_timing(name, seconds)` ### Fixed + - [#1384](https://github.com/plotly/dash/pull/1384) Fixed a bug introduced by [#1180](https://github.com/plotly/dash/pull/1180) breaking use of `prevent_initial_call` as a positional arg in callback definitions ## [1.15.0] - 2020-08-25 + ### Added + - [#1355](https://github.com/plotly/dash/pull/1355) Removed redundant log message and consolidated logger initialization. You can now control the log level - for example suppress informational messages from Dash with `app.logger.setLevel(logging.WARNING)`. - [#1253](https://github.com/plotly/dash/pull/1253), [#1377](https://github.com/plotly/dash/pull/1377) Added experimental `--jl-prefix` option to `dash-generate-components`, optionally generates Julia version of components and corresponding Julia package ### Changed + - [#1180](https://github.com/plotly/dash/pull/1180) and [#1375](https://github.com/plotly/dash/pull/1375) `Input`, `Output`, and `State` in callback definitions don't need to be in lists. You still need to provide `Output` items first, then `Input` items, then `State`, and the list form is still supported. In particular, if you want to return a single output item wrapped in a length-1 list, you should still wrap the `Output` in a list. This can be useful for procedurally-generated callbacks. - [#1368](https://github.com/plotly/dash/pull/1368) Updated pytest to v6.0.1. To avoid deprecation warnings, this also updated pytest-sugar to 0.9.4 and pytest-mock to 3.2.0. The pytest-mock update only effects python >= 3.0. Pytest-mock remains pinned at 2.0.0 for python == 2.7. ## [1.14.0] - 2020-07-27 + ### Added + - [#1343](https://github.com/plotly/dash/pull/1343) Add `title` parameter to set the -document title. This is the recommended alternative to setting app.title or overriding -the index HTML. + document title. This is the recommended alternative to setting app.title or overriding + the index HTML. - [#1315](https://github.com/plotly/dash/pull/1315) Add `update_title` parameter to set or disable the "Updating...." document title during updates. Closes [#856](https://github.com/plotly/dash/issues/856) and [#732](https://github.com/plotly/dash/issues/732) ## [1.13.4] - 2020-06-25 + ### Fixed + - [#1310](https://github.com/plotly/dash/pull/1310) Fix a regression since 1.13.0 preventing more than one loading state from being shown at a time. ## [1.13.3] - 2020-06-19 ## [1.13.2] - 2020-06-18 + ### Fixed + - [#1305](https://github.com/plotly/dash/issues/1305) - - Fix regression that causes crash when `FLASK_ENV` is modified during app execution - - Fix regression that caused tests using `_wait_for_callbacks` to fail + - Fix regression that causes crash when `FLASK_ENV` is modified during app execution + - Fix regression that caused tests using `_wait_for_callbacks` to fail ## [1.13.1] - 2020-06-17 ## [1.13.0] - 2020-06-17 + ### Added + - [#1289](https://github.com/plotly/dash/pull/1289) Supports `DASH_PROXY` env var to tell `app.run_server` to report the correct URL to view your app, when it's being proxied. Throws an error if the proxy is incompatible with the host and port you've given the server. - [#1240](https://github.com/plotly/dash/pull/1240) Adds `callback_context` to clientside callbacks (e.g. `dash_clientside.callback_context.triggered`). Supports `triggered`, `inputs`, `inputs_list`, `states`, and `states_list`, all of which closely resemble their serverside cousins. ### Changed + - [#1237](https://github.com/plotly/dash/pull/1237) Closes [#920](https://github.com/plotly/dash/issues/920): Converts hot reload fetch failures into a server status indicator showing whether the latest fetch succeeded or failed. Callback fetch failures still appear as errors but have a clearer message. - [#1254](https://github.com/plotly/dash/pull/1254) Modifies the callback chain implementation and improves performance for apps with a lot of components ### Fixed + - [#1255](https://github.com/plotly/dash/pull/1255) Hard hot reload targets only the current window, not the top - so if your app is in an iframe you will only reload the app - [#1249](https://github.com/plotly/dash/pull/1249) Fixes [#919](https://github.com/plotly/dash/issues/919) so `dash.testing` is compatible with more `pytest` plugins, particularly `pytest-flake8` and `pytest-black`. - [#1248](https://github.com/plotly/dash/pull/1248) Fixes [#1245](https://github.com/plotly/dash/issues/1245), so you can use prop persistence with components that have dict IDs, ie for pattern-matching callbacks. - [#1185](https://github.com/plotly/dash/pull/1185) Sort asset directories, same as we sort files inside those directories. This way if you need your assets loaded in a certain order, you can add prefixes to subdirectory names and enforce that order. -- [#1288](https://github.com/plotly/dash/pull/1288) Closes [#1285](https://github.com/plotly/dash/issues/1285): Debug=True should work in the __main__ module. +- [#1288](https://github.com/plotly/dash/pull/1288) Closes [#1285](https://github.com/plotly/dash/issues/1285): Debug=True should work in the **main** module. ## [1.12.0] - 2020-05-05 + ### Added + - [#1228](https://github.com/plotly/dash/pull/1228) Adds control over firing callbacks on page (or layout chunk) load. Individual callbacks can have their initial calls disabled in their definition `@app.callback(..., prevent_initial_call=True)` and similar for `app.clientside_callback`. The app-wide default can also be changed with `app=Dash(prevent_initial_callbacks=True)`, then individual callbacks may disable this behavior. - [#1201](https://github.com/plotly/dash/pull/1201) New attribute `app.validation_layout` allows you to create a multi-page app without `suppress_callback_exceptions=True` or layout function tricks. Set this to a component layout containing the superset of all IDs on all pages in your app. - [#1078](https://github.com/plotly/dash/pull/1078) Permit usage of arbitrary file extensions for assets within component libraries ### Fixed + - [#1224](https://github.com/plotly/dash/pull/1224) Fixes [#1223](https://github.com/plotly/dash/issues/1223), a very specific situation in which initial callbacks will not fire. - [#1220](https://github.com/plotly/dash/pull/1220) Fixes [#1216](https://github.com/plotly/dash/issues/1216), a set of related issues about pattern-matching callbacks with `ALL` wildcards in their `Output` which would fail if no components matched the pattern. - [#1212](https://github.com/plotly/dash/pull/1212) Fixes [#1200](https://github.com/plotly/dash/issues/1200) - prior to Dash 1.11, if none of the inputs to a callback were on the page, it was not an error. This was, and is now again, treated as though the callback raised PreventUpdate. The one exception to this is with pattern-matching callbacks, when every Input uses a multi-value wildcard (ALL or ALLSMALLER), and every Output is on the page. In that case the callback fires as usual. - [#1201](https://github.com/plotly/dash/pull/1201) Fixes [#1193](https://github.com/plotly/dash/issues/1193) - prior to Dash 1.11, you could use `flask.has_request_context() == False` inside an `app.layout` function to provide a special layout containing all IDs for validation purposes in a multi-page app. Dash 1.11 broke this when we moved most of this validation into the renderer. This change makes it work again. ## [1.11.0] - 2020-04-10 + ### Added + - [#1103](https://github.com/plotly/dash/pull/1103) Pattern-matching IDs and callbacks. Component IDs can be dictionaries, and callbacks can reference patterns of components, using three different wildcards: `ALL`, `MATCH`, and `ALLSMALLER`, available from `dash.dependencies`. This lets you create components on demand, and have callbacks respond to any and all of them. To help with this, `dash.callback_context` gets three new entries: `outputs_list`, `inputs_list`, and `states_list`, which contain all the ids, properties, and except for the outputs, the property values from all matched components. - [#1103](https://github.com/plotly/dash/pull/1103) `dash.testing` option `--pause`: after opening the dash app in a test, will invoke `pdb` for live debugging of both Javascript and Python. Use with a single test case like `pytest -k cbwc001 --pause`. ### Changed + - [#1103](https://github.com/plotly/dash/pull/1103) Multiple changes to the callback pipeline: - `dash.callback_context.triggered` now does NOT reflect any initial values, and DOES reflect EVERY value which has been changed either by activity in the app or as a result of a previous callback. That means that the initial call of a callback with no prerequisite callbacks will list nothing as triggering. For backward compatibility, we continue to provide a length-1 list for `triggered`, but its `id` and `property` are blank strings, and `bool(triggered)` is `False`. - A user interaction which returns the same property value as was previously present will not trigger the component to re-render, nor trigger callbacks using that property as an input. - Callback validation is now mostly done in the browser, rather than in Python. A few things - mostly type validation, like ensuring IDs are strings or dicts and properties are strings - are still done in Python, but most others, like ensuring outputs are unique, inputs and outputs don't overlap, and (if desired) that IDs are present in the layout, are done in the browser. This means you can define callbacks BEFORE the layout and still validate IDs to the layout; and while developing an app, most errors in callback definitions will not halt the app. ### Fixed + - [#1103](https://github.com/plotly/dash/pull/1103) Fixed multiple bugs with chained callbacks either not triggering, inconsistently triggering, or triggering multiple times. This includes: [#635](https://github.com/plotly/dash/issues/635), [#832](https://github.com/plotly/dash/issues/832), [#1053](https://github.com/plotly/dash/issues/1053), [#1071](https://github.com/plotly/dash/issues/1071), and [#1084](https://github.com/plotly/dash/issues/1084). Also fixed [#1105](https://github.com/plotly/dash/issues/1105): async components that aren't rendered by the page (for example in a background Tab) would block the app from executing callbacks. ## [1.10.0] - 2020-04-01 + ### Added + - [#1134](https://github.com/plotly/dash/pull/1134) Allow `dash.run_server()` host and port parameters to be set with environment variables HOST & PORT, respectively ### Changed + - [#1145](https://github.com/plotly/dash/pull/1145) Update from React 16.8.6 to 16.13.0 ### Fixed + - [#1142](https://github.com/plotly/dash/pull/1142) [Persistence](https://dash.plot.ly/persistence): Also persist 0, empty string etc ## [1.9.1] - 2020-02-27 + ### Added + - [#1133](https://github.com/plotly/dash/pull/1133) Allow the `compress` config variable to be set with an environment variable with DASH_COMPRESS=FALSE ## [1.9.0] - 2020-02-04 + ### Fixed + - [#1080](https://github.com/plotly/dash/pull/1080) Handle case where dash fails to load when used inside an iframe with a sandbox attribute that only has allow-scripts ## [1.8.0] - 2020-01-14 + ### Added + - [#1073](https://github.com/plotly/dash/pull/1073) Two new functions to simplify usage handling URLs and pathnames: `app.get_relative_path` & `app.trim_relative_path`. -These functions are particularly useful for apps deployed on Dash Enterprise where the apps served under a URL prefix (the app name) which is unlike apps served on localhost:8050. - - `app.get_relative_path` returns a path with the config setting `requests_pathname_prefix` prefixed. Use `app.get_relative_path` anywhere you would provide a relative pathname, like `dcc.Link(href=app.relative_path('/page-2'))` or even as an alternative to `app.get_asset_url` with e.g. `html.Img(src=app.get_relative_path('/assets/logo.png'))`. - - `app.trim_relative_path` a path with `requests_pathname_prefix` and leading & trailing - slashes stripped from it. Use this function in callbacks that deal with `dcc.Location` `pathname` - routing. - Example usage: - ```python + These functions are particularly useful for apps deployed on Dash Enterprise where the apps served under a URL prefix (the app name) which is unlike apps served on localhost:8050. - `app.get_relative_path` returns a path with the config setting `requests_pathname_prefix` prefixed. Use `app.get_relative_path` anywhere you would provide a relative pathname, like `dcc.Link(href=app.relative_path('/page-2'))` or even as an alternative to `app.get_asset_url` with e.g. `html.Img(src=app.get_relative_path('/assets/logo.png'))`. - `app.trim_relative_path` a path with `requests_pathname_prefix` and leading & trailing + slashes stripped from it. Use this function in callbacks that deal with `dcc.Location` `pathname` + routing. + Example usage: + `python app.layout = html.Div([ dcc.Location(id='url'), html.Div(id='content') @@ -1056,30 +1171,38 @@ These functions are particularly useful for apps deployed on Dash Enterprise whe return chapters.page_1 if page_name == "page-2": return chapters.page_2 - ``` + ` ### Changed + - [#1035](https://github.com/plotly/dash/pull/1035) Simplify our build process. - [#1074](https://github.com/plotly/dash/pull/1074) Error messages when providing an incorrect property to a component have been improved: they now specify the component type, library, version, and ID (if available). ### Fixed + - [#1037](https://github.com/plotly/dash/pull/1037) Fix no_update test to allow copies, such as those stored and retrieved from a cache. ## [1.7.0] - 2019-11-27 + ### Added + - [#967](https://github.com/plotly/dash/pull/967) Add support for defining -clientside JavaScript callbacks via inline strings. + clientside JavaScript callbacks via inline strings. - [#1020](https://github.com/plotly/dash/pull/1020) Allow `visit_and_snapshot` API in `dash.testing.browser` to stay on the page so you can run other checks. ### Changed + - [#1026](https://github.com/plotly/dash/pull/1026) Better error message when you forget to wrap multiple `children` in an array, and they get passed to other props. ### Fixed + - [#1018](https://github.com/plotly/dash/pull/1006) Fix the `dash.testing` **stop** API with process application runner in Python2. Use `kill()` instead of `communicate()` to avoid hanging. - [#1027](https://github.com/plotly/dash/pull/1027) Fix bug with renderer callback lock never resolving with non-rendered async component using the asyncDecorator ## [1.6.1] - 2019-11-14 + ### Fixed + - [#1006](https://github.com/plotly/dash/pull/1006) Fix IE11 / ES5 compatibility and validation issues - [#1006](https://github.com/plotly/dash/pull/1006) Fix bug with renderer wrapper component TreeContainer to prevent useless re-renders - [#1001](https://github.com/plotly/dash/pull/1001) @@ -1087,17 +1210,23 @@ clientside JavaScript callbacks via inline strings. - make the `percy_snapshot()` API more robust, and the timeout of `wait_for_callbacks` (if set to True) will not fail the snapshot execution, but logged as potential error. ## [1.6.0] - 2019-11-04 + ### Fixed + - [#999](https://github.com/plotly/dash/pull/999) Fix fingerprint for component suites with `metadata` in version. - [#983](https://github.com/plotly/dash/pull/983) Fix the assets loading issues when dashR application runner is handling with an app defined by string chunk. ## [1.5.1] - 2019-10-29 + ### Fixed + - [#987](https://github.com/plotly/dash/pull/987) Fix cache string handling for component suites with nested folders in their packages. - [#986](https://github.com/plotly/dash/pull/986) Fix a bug with evaluation of `_force_eager_loading` when application is loaded with gunicorn ## [1.5.0] - 2019-10-29 + ### Added + - [#964](https://github.com/plotly/dash/pull/964) Adds support for preventing updates in clientside functions. - Reject all updates with `throw window.dash_clientside.PreventUpdate;` - Reject a single output by returning `window.dash_clientside.no_update` @@ -1105,14 +1234,19 @@ clientside JavaScript callbacks via inline strings. - [#973](https://github.com/plotly/dash/pull/973) Adds support for resource caching and adds a fallback caching mechanism through etag ### Fixed + - [#974](https://github.com/plotly/dash/pull/974) Fix and improve a percy snapshot behavior issue we found in dash-docs testing. It adds a flag `wait_for_callbacks` to ensure that, in the context of a dash app testing, the percy snapshot action will happen only after all callbacks get fired. ## [1.4.1] - 2019-10-17 + ### Fixed + - [#969](https://github.com/plotly/dash/pull/969) Fix warnings emitted by react devtools coming from our own devtools components. ## [1.4.0] - 2019-10-08 + ### Added + - [#948](https://github.com/plotly/dash/pull/948) Support setting working directory for R apps run using the `dashr` fixture, primarily useful for tests with assets. `dashr.start_server` supports a `cwd` argument to set an explicit working directory, and has smarter defaults when it's omitted: if `app` is a path to an R script, uses the directory of that path; if `app` is a string, uses the directory the test file itself is in. - [#944](https://github.com/plotly/dash/pull/944) - Relevant `dash.testing` methods can now be called with either an element or a CSS selector: `select_dcc_dropdown`, `multiple_click`, `clear_input`, `zoom_in_graph_by_ratio`, `click_at_coord_fractions`. @@ -1121,14 +1255,19 @@ clientside JavaScript callbacks via inline strings. - [#938](https://github.com/plotly/dash/issues/938) Add debugging traces to dash backend about serving component suites, to verify the installed packages whenever in doubt. ### Fixed + - [#944](https://github.com/plotly/dash/pull/944) Fix a bug with persistence being toggled on/off on an existing component. ## [1.3.1] - 2019-09-19 + ### Changed + - Bump dash-core-components version from 1.2.0 to [1.2.1](https://github.com/plotly/dash-core-components/blob/master/CHANGELOG.md#120---2019-09-19) ## [1.3.0] - 2019-09-17 + ### Added + - [#923](https://github.com/plotly/dash/pull/923) Add one configuration `--percy-assets` in `pytest` to specify extra application assets path if needed. - [#918](https://github.com/plotly/dash/pull/918) Add `wait_for_element_by_id` and `visit_and_snapshot` APIs in browser, add `raw_command` option (with higher priority than the default waitress one) and optional `start_timeout` argument to handle large applications within the process runner. @@ -1136,49 +1275,65 @@ clientside JavaScript callbacks via inline strings. - [#903](https://github.com/plotly/dash/pull/903) Persistence: enable props edited by the user to persist across recreating the component or reloading the page. Components need to define three new props: `persistence`, `persisted_props`, and `persistence_type` as described in the lead comment of `src/persistence.js`. App developers then enable this behavior by, in the simplest case, setting `persistence: true` on the component. First use case is table, see [dash-table#566](https://github.com/plotly/dash-table/pull/566) ### Changed + - Bump dash-table version from 4.2.0 to [4.3.0](https://github.com/plotly/dash-table/blob/master/CHANGELOG.md#430---2019-09-17) - Bump dash-core-components version from 1.1.2 to [1.2.0](https://github.com/plotly/dash-core-components/blob/master/CHANGELOG.md#120---2019-09-17) - Bump dash-renderer version from 1.0.1 to [1.1.0](https://github.com/plotly/dash/blob/master/dash-renderer/CHANGELOG.md#110---2019-09-17) ### Fixed + - [#915](https://github.com/plotly/dash/issues/915) Fix `dash-generate-components` on Windows. - [#829](https://github.com/plotly/dash/issues/829) Fix the `--remote` pytest argument which was not effective in the code, adding a new argument `--remote-url` to support the selenium grid usage in the cloud. - [#910](https://github.com/plotly/dash/pull/910) Reduce the dash-renderer packages size on **PyPI** about 55% by removing the source maps. To do more advanced debugging, the source maps needs to be generated from source code with `npm run build:local` and pip install in editable mode, i.e. `pip install -e .` ## [1.2.0] - 2019-08-27 + ### Added + - [#860](https://github.com/plotly/dash/pull/860) Add a new arg `dev_tools_prune_errors` to `app.run_server` and `app.enable_dev_tools`. Default `True`, tracebacks only include user code and below. Set it `False` for the previous behavior showing all the Dash and Flask parts of the stack. ### Changed + - Bump dash-table version from 4.1.0 to [4.2.0](https://github.com/plotly/dash-table/blob/master/CHANGELOG.md#420---2019-08-27) - Bump dash-core-components version from 1.1.1 to [1.1.2](https://github.com/plotly/dash-core-components/blob/master/CHANGELOG.md#112---2019-08-27) - Bump dash-html-components version from 1.0.0 to [1.0.1](https://github.com/plotly/dash-html-components/blob/master/CHANGELOG.md#101---2019-08-27) - Bump dash-renderer version from 1.0.0 to [1.0.1](https://github.com/plotly/dash/blob/dev/dash-renderer/CHANGELOG.md#101---2019-08-27) ### Fixed + - [#874](https://github.com/plotly/dash/pull/874) Clean all the binary assets in dash-renderer, add tool to build all the required bundles from fresh source code to avoid confusion of the assets and improve the release process. Fixes [#868](https://github.com/plotly/dash/pull/868) and [#734](https://github.com/plotly/dash/pull/734) ## [1.1.1] - 2019-08-06 + ### Changed + - Bump dash-core-components version from 1.1.0 to [1.1.1](https://github.com/plotly/dash-core-components/blob/master/CHANGELOG.md#111---2019-08-06) ## [1.1.0] - 2019-08-05 + ### Added + - [#827](https://github.com/plotly/dash/pull/827) Add support for dashR testing to the `dash.testing` pytest framework. ### Changed + - Bump dash-table version from 4.0.2 to [4.1.0](https://github.com/plotly/dash-table/blob/master/CHANGELOG.md#410---2019-08-05) - Bump dash-core-components version from 1.0.0 to [1.1.0](https://github.com/plotly/dash-core-components/blob/master/CHANGELOG.md#110---2019-08-05) ## [1.0.2] - 2019-07-15 + ### Changed + - Bump dash-table version from 4.0.1 to [4.0.2](https://github.com/plotly/dash-table/blob/master/CHANGELOG.md#402---2019-07-15) ### Fixed + - [#821](https://github.com/plotly/dash/pull/821) Fix a bug with callback error reporting, [#791](https://github.com/plotly/dash/issues/791). ## [1.0.1] - 2019-07-09 + ### Changed + - 💥 [#808](https://github.com/plotly/dash/pull/808) Remove strong `dash.testing` dependencies per community feedback. Testing users should do `pip install dash[testing]` afterwards. - [#805](https://github.com/plotly/dash/pull/805) Add headless mode for dash.testing, add `pytest_setup_options` hook for full configuration of `WebDriver Options`. @@ -1186,8 +1341,11 @@ clientside JavaScript callbacks via inline strings. - Bump dash-table version from 4.0.0 to [4.0.1](https://github.com/plotly/dash-table/blob/master/CHANGELOG.md#401---2019-07-09) ## [1.0.0] - 2019-06-20 + ### Changed + - 💥 [#761](https://github.com/plotly/dash/pull/761) Several breaking changes to the `dash.Dash` API: + - Remove two obsolete constructor kwargs: `static_folder` and `components_cache_max_age` - Remove the misspelled `supress_callback_exceptions` fallback - Remove the unused `resources.config.infer_from_layout` @@ -1210,96 +1368,124 @@ clientside JavaScript callbacks via inline strings. - 💥 [#709](https://github.com/plotly/dash/pull/709) Merge the `dash-renderer` project into the main dash repo to simplify feature dev workflow. We will keep the [deprecated one](https://github.com/plotly/dash-renderer) for archive purpose. ## [0.43.0] - 2019-05-15 + ### Changed + - Bump dash-core-components version from 0.47.0 to [0.48.0](https://github.com/plotly/dash-core-components/blob/master/CHANGELOG.md#0480---2019-05-15) - Bump dash-renderer version from 0.23.0 to [0.24.0](https://github.com/plotly/dash-renderer/blob/master/CHANGELOG.md#0240---2019-05-15) - Bump dash-table version from 3.6.0 to [3.7.0](https://github.com/plotly/dash-table/blob/master/CHANGELOG.md#370---2019-05-15) ### Fixed + - [renderer#170](https://github.com/plotly/dash-renderer/pull/170) Fix regression on handling PreventUpdate (204 NO CONTENT) ## [0.42.0] - 2019-04-25 + ### Added + - [#687](https://github.com/plotly/dash/pull/687), [renderer#100](https://github.com/plotly/dash-renderer/pull/100) Dev Tools support. A new UI in the application that automatically display JavaScript & Python error messages, validates your component's properties, and displays a graph of your callback's dependencies. Only enabled in debug mode. Turn this on and off with two new config flags in `app.run_server`: - `dev_tools_props_check` - turn on/off property validation. - `dev_tools_ui` - turn on/off the UI. ### Fixed + - [renderer#148](https://github.com/plotly/dash-renderer/issues/148) Fix regression for `children=0` case. ## [0.41.0] - 2019-04-10 + ### Added + - [#672](https://github.com/plotly/dash/pull/672), [renderer#143](https://github.com/plotly/dash-renderer/pull/143) Support for "Clientside Callbacks" - an escape hatch to execute your callbacks in JavaScript instead of Python - [#676](https://github.com/plotly/dash/pull/676) Add `dev_tools_ui` config flag in `app.run_server` (serialized in `