All notable changes to dash
will be documented in this file.
This project adheres to Semantic Versioning.
- #3080 Fix docstring generation for components using single-line or nonstandard-indent leading comments
- #3103 Fix Graph component becomes unresponsive if an invalid figure is passed
- #2939 Fixes bug with whitespace on DataTable when
merge_duplicate_header=True
. Fixes #2870 - #2994 Keep generated doc-string order for shape or exact props. Fixes #2990
- #3011 Fixed an exception error caused by assigning
None
to array properties withexact
orshape
element types. Fixes #3010 - #2991 Add support for URL decoding of the search parameter for pages.
- #3025 Fix no output callback with error handler setting the response to NoUpdate and triggering an error.
- #3034 Remove whitespace from
metadata.json
files to reduce package size. - #3009 Performance improvement on (pattern-matching) callbacks.
- #3028 Fix jupyterlab v4 support.
- #2926 Fix components defaultProps with react 18.3.1
- #3051 Add missing request data to callback context. Fix #2235.
- #2987 Fix multioutput requiring same number of no_update. Fixes #2986
- 2988 Fix error handler and grouped outputs. Fixes #2983
- #2841 Fix typing on Dash init.
- #1548 Enable changing of selenium url, fix for selenium grid support.
- #2985 Deprecate dynamic component loader.
- #2985 Deprecate
run_server
, userun
instead. - #2899 Deprecate
dcc.LogoutButton
, can be replaced with ahtml.Button
orhtml.A
. eg:html.A(href=os.getenv('DASH_LOGOUT_URL'))
on a Dash Enterprise instance. - #2995 Deprecate
Dash.__init__
keywords:- The
plugins
keyword will be removed. - Old
long_callback_manager
keyword will be removed, can usebackground_callback_manager
instead.
- The
- #2881 Add outputs_list to window.dash_clientside.callback_context. Fixes #2877.
- #2903 Add callback on_error handler, either globally on Dash init or per callback basis. Receives the exception as first argument, can return output(s) or None for
no_update
. Access to original callback context is preserved andset_props
works inside the error handler. - #2936 Adds support for TypeScript 5.5+.
- #2789 Add library loading capacity to
_allow_dynamic_callbacks
- #2898 Fix error thrown when using non-existent components in callback running keyword. Fixes #2897.
- #2892 Fix ensures dcc.Dropdown menu maxHeight option works with Datatable. Fixes #2529 #2225
- #2896 The tabIndex parameter of Div can accept number or string type. Fixes #2891
- #2900 Allow strings in layout list. Fixes #2890
- #2908 Fix when environment variables are ignored by Dash.run() at runtime. Fixes #2902
- #2888 Add id to dcc.Loading DOM. Fixes #2878
- #2922 Fix background callback hash_function when source is unavailable. Fixes #1885
- #2915 Fix 'AttributeError' when layout is a function that returns a list of components. Fixes #2905
- #2956 Add missing useEffect dependency to dcc.Loading component.
- #2909 Rehighlights dcc.Markdown when it is updated, fixes #2895
- #2860 Fix dcc.Loading to apply overlay_style only to the children and not the spinner. Fixes #2858
- #2854 Fix dcc.Dropdown resetting empty values to null and triggering callbacks. Fixes #2850
- #2859 Fix base patch operators. fixes #2855
- #2856 Fix multiple consecutive calls with same id to set_props only keeping the last props. Fixes #2852
- #2867 Fix clientside no output callback. Fixes #2866
- #2876 Fix pattern matching in callback running argument. Fixes #2863
-
#2832 Add dash startup route setup on Dash init.
-
#2819 Add dash subcomponents receive additional parameters passed by the parent component. Fixes #2814.
-
#2826 When using Pages, allows for
app.title
and (new)app.description
to be used as defaults for the page title and description. Fixes #2811. -
#2795 Allow list of components to be passed as layout.
-
#2760 New additions to dcc.Loading resolving multiple issues:
delay_show
anddelay_hide
props to prevent flickering during brief loading periods (similar to Dash Bootstrap Components dbc.Spinner)overlay_style
for styling the loading overlay, such as setting visibility and opacity for childrentarget_components
specifies components/props triggering the loading spinnercustom_spinner
enables using a custom component for loading messages instead of built-in spinnersdisplay
overrides the loading status with options for "show," "hide," or "auto"
- #2362 Global namespace not polluted any more when loading clientside callbacks.
- #2833 Allow data url in link props. Fixes #2764
- #2822 Fix side update (running/progress/cancel) dict ids. Fixes #2111
- #2817 Change hashing algorithm from md5 to sha256, Fixes #2697.
- #2816 Fix dcc.Dropdown value not updated when option is removed. Fixes #2733.
- #2823 Fix None in "wait" methods causing incorrectly passing tests. Fixes #2818
- #2783 Remove dynamic loading.
- #2756 Prevent false dangerous link warning. Fixes #2743
- #2752 Fixed issue with Windows build, for first time build on Windows, the dev needs to use
npm run first-build
- #2734 Configure CI for Python 3.10 #1863
- #2735 Configure CI for Python 3.8 and 3.12, drop support for Python 3.6 and Python 3.7 #2736
- #2762 Add dynamic loading of component libraries.
- Add
dynamic_loading=True
to dash init. - Add
preloaded_libraries=[]
to dash init, included libraries names will be loaded on the index like before.
- Add
- #2758
- exposing
setProps
todash_clientside.clientSide_setProps
to allow for JS code to interact directly with the dash eco-system
- exposing
- #2730 Load script files with
.mjs
ending as js modules - #2770 Add running to regular callbacks.
- #2695 Adds
triggered_id
todash_clientside.callback_context
. Fixes #2692 - #2723 Improve dcc Slider/RangeSlider tooltips. Fixes #1846
- Add
tooltip.template
a string for the format template, {value} will be formatted with the actual value. - Add
tooltip.style
a style object to give to the div of the tooltip. - Add
tooltip.transform
a reference to a function in thewindow.dccFunctions
namespace.
- Add
- #2732 Add special key
_dash_error
tosetProps
, allowing component developers to send error without throwing in render. Usageprops.setProps({_dash_error: new Error("custom error")})
- #2732 Sanitize html props that are vulnerable to xss vulnerability if user data is inserted. Fix Validate url to prevent XSS attacks #2729
- #2652 dcc.Clipboard supports htm_content and triggers a copy to clipboard when n_clicks are changed
- #2721 Remove ansi2html, fixes #2613
- #2700 Fix
_allow_dynamic_callbacks
for newly-added components.
- #2672 Fix
get_caller_name
in case the source is not available.
- #2674 Raise flask & werkzeug limits to <3.1
- #2635 Get proper app module name, remove need to give
__name__
to Dash constructor.
- #2647
routing_callback_inputs
allowing to pass more Input and/or State arguments to the pages routing callback - #2649 Add
_allow_dynamic_callbacks
, register new callbacks inside other callbacks. 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.
- #2610 Load plotly.js bundle/version from plotly.py
- #2630 New layout hooks in the renderer
- #2619 Fix for dash-table column IDs containing special characters
- #2616 Add mapping of tsconfig compiler option
moduleResolution
, fixes #2618 - #2596 Fix react-dom throwing unique key prop error for markdown table, fix #1433
- #2589 CSS for input elements not scoped to Dash application
- #2599 Fix background callback cancel inputs used in multiple callbacks and mixed cancel inputs across pages.
- #2593 dcc.Input accepts a number for its debounce argument
- #2621 Update plotly.js to 2.25.2 from 2.24.2
- Feature release 2.25.0, Add "Equal Earth" project, options to include legends for shapes, Plotly.deleteActivateShape.
- Patch release 2.24.3 Fix for doubles clicks and legend group.
- Patch release 2.25.1 Fix clearing legend using react.
- Patch release 2.25.2 Fix potential prototype pollution in plot API calls.
- #2573 Disable jupyter dash in Databricks, as the implementation here does not work in a Databricks notebook. Dash Enterprise customers can use the separate databricks-dash package for this purpose.
- #2530 Merge JupyterDash repository with Dash.
- Add
jupyter_mode
argument toapp.run
, defaults toinline
and configurable viajupyter_dash.default_mode
. - Add prefixed arguments from
JupyterDash
toapp.run
:jupyter_width
,jupyter_height
,jupyter_server_url
.
- Add
- #2555 Fix browser back button when removing one of multiple location components from layout, fix #1312
- #2565 Fix sorting for > 10 pages, fix #2564
- #2474 Update plotly js to 2.24.2 from 2.23.2
- Set Flask and Werkzeug version upper bound to
<2.3
.
- #2545 Fix typescript objectOf generation.
- #2548 Fix component as props callback triggering other callbacks not in response, fix #2487.
- #2538 Add an upper bound to Flask and Werkzeug versions at
<2.2.3
because we expect the Dash ecosystem to be incompatible with the next minor release of Flask (this excludes the current latest Flask release 2.3.x). We will raise the upper bound to<2.4
after we fix incompatibilities elsewhere in the Dash ecosystem.
- #2540 Add
include_pages_meta=True
toDash
constructor, and fix a security issue in pages meta tags #2536.
- #2508 Fix error message, when callback output has different length than spec
- #2207 Fix object of components support.
- #2500 Passing customdata by click for scattermapbox, fix #2493
- #2513 Raise error when iterating over patch objects, fix #2512
-
#2533 and #2538 Update Plotly.js to v2.23.2 from v2.20.0.
- Feature release 2.23.0 adds legend/colorbar xref/yref.
- Feature release 2.22.0 adds
legend
references to traces. - Feature release 2.21.0 adds
label.texttemplate
to parametric shapes. - Patch releases 2.23.1 and 2.23.2 fix heatmap rendering on iOS and Safari when zsmooth is set to false and shape text when drawing a new shape.
-
#2538 Update JS dependencies in dcc, html, dash-table, dash-renderer, and dash
- #2489 Fix location change event handling when
Location
objects are removed from the layout. Event handlers would not be removed and eventually change props of a random DOM element, fix #1346 - #2498 Fix error when caching callbacks which return
Patch
objects by makingPatch
objects picklable - #2491 Fix clientside inline function name not found, fix #2488
- #2479 Fix
KeyError
"Callback function not found for output [...], , perhaps you forgot to prepend the '@'?" issue when using duplicate callbacks targeting the same output. This issue would occur when the app is restarted or when running with multiplegunicorn
workers. - #2471 Fix
allow_duplicate
output with clientside callback, fix #2467 - #2473 Fix background callbacks with different outputs but same function, fix #2221
- #2450 Set label style
display: block
ifinline
is false in RadioItems & Checklist components. To keep previous behavior, setinline=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.
- #2392 Improved pages feature:
- Accept an absolute path or a
pathlib.path
forpages_folder
, to matchassets_folder
- Fix inferring
use_pages=True
when you supply a custompages_folder
- Fix for
pages_folder
that includes special characters - New test fixture
clear_pages_state
- Make imported pages act more like regular Python modules
- Accept an absolute path or a
- #2068 Added
refresh="callback-nav"
indcc.Location
. This allows for navigation without refreshing the page when url is updated in a callback. - #2417 Add wait_timeout property to customize the behavior of the default wait timeout used for by wait_for_page, fix #1595
- #2417 Add the element target text for wait_for_text* error message, fix #945
- #2425 Add
add_log_handler=True
to Dash init, if you don't want a log stream handler at all. - #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 calldash._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 Add
dash.Patch
for partial update Output props without transferring the previous value in a State. - #2414 Add
allow_duplicate
toOutput
arguments allowing duplicate callbacks to target the same prop. - #2349 Added new
dcc.Geolocation
component
- #2429 Fix side effect on updating possible array children triggering callbacks, fix #2411.
- #2417 Disable the pytest plugin if
dash[testing]
not installed, fix #946. - #2417 Do not swallow the original error to get the webdriver, easier to know what is wrong after updating the browser but the driver.
- #2425 Fix multiple log handler added unconditionally to the logger, resulting in duplicate log message.
- #2415 Fix background callbacks progress not deleted after fetch.
- #2426 Set default interval to 1 second for app.long_callback, restoring the behavior it had before v2.6.0 when we introduced
backround=True
callbacks.
- #2425 Moved the logger namespace to
dash.dash
, as library logger it should be on that namespace instead of the user app.
- #2241 Update Plotly.js to v2.20.0 from v2.18.0.
- #2400 Added
disable_n_clicks=True
to thehtml.Div
components inpage_container
.
- #2389 Added
disable_n_clicks
prop to all html components to make it possible to remove onclick event listeners
- #2367 Updated the default
favicon.ico
to the current Plotly logo - #2394 Update Plotly.js to v2.18.0 from v2.16.4.
- #2344 Fix #1519, a case where dependent callbacks can be called too many times and with inconsistent inputs
- #2332 Add key to wrapped children props in list.
- #2336 Fix inserted dynamic ids in component as props.
- #2282 Dropped support for Internet Explorer. Our build process now targets vendor-supported browsers released in the last 7 years. Currently this means ES2015 but over time this will natually advance as older browser versions pass the 7-year threshold.
- #2261 Added new
placeholder_text
property tofilterOptions
for DataTable which allows overriding the default filter field placeholder.
- #2282 Widespread dependency upgrades
- Update Plotly.js to v2.16.1 (from v2.13.3)
- Feature release 2.14.0 adds arrows to
sankey
links, andeditSelection
option to config. - Feature release 2.15.0 adds directed arrowheads and markers to
scatter
and scatter-like traces and increased control of automargin and legend sizing - Feature release 2.16.0 adds clustering to
scattermapbox
traces and restricted bounds tomapbox
plots. - Patch releases 2.15.1 and 2.16.1 fix several bugs.
- Feature release 2.14.0 adds arrows to
- Update Plotly.js to v2.16.1 (from v2.13.3)
- #2292 Pages: find the 404 page even if
pages_folder
is nested, or the 404 page is nested insidepages_folder
. - #2265 Removed deprecated
before_first_request
as reported in #2177. - #2257 Fix tuple types in the TypeScript component generator.
- #2293 Fix Dropdown useMemo not detecting equal objects
- #2277 Use dropdown styles from node_modules, instead of from stored css file
- #2105 Fix order of dash component libraries imports.
- #2291 Move
flask-compress
dependency to new extras requiresdash[compress]
- #2237 Ensure calls to
plotly.js
fromdcc.Graph
are properly sequenced even if React initiates multiple render cycles in quick succession. - #2218 Fix bug #1348 Validate children prop (required or not).
- #2223 Exclude hidden folders when building
dash.page_registry
. - #2182 Fix #2172 Make it so that when using pages, if
suppress_callback_exceptions=True
thevalidation_layout
is not set. - #2152 Fix bug #2128 preventing rendering of multiple components inside a dictionary.
- #2187 Fix confusing error message when trying to use pytest fixtures but
dash[testing]
is not installed. - #2202 Fix bug #2185 when you copy text with multiple quotes into a table
- #2226 Fix #2219 pages register & background callbacks.
- #2175 Fix #2173 callback output of ndarray and no_update check.
- #2146 Remove leftover debug console.log statement.
- #2168 Reverts #2126 (supporting redirect from root when using pages) until the new bugs introduced by that PR are fixed.
- #2167 Update Plotly.js to v2.13.3 (from v2.13.1) including patch release v2.13.2 and patch release v2.13.3.
- Emit
plotly_selected
event on plot API calls and GUI edits. - Fix
sankey
select error (regression introduced in 2.13.0). - Handle missing drag layer of invisible
sankey
traces to fix select error. - Emit selection event in shape drawing
dragmode
s when an existing selection is modified.
- Emit
- #2109 Add
maxHeight
to Dropdown options menu. - #2039 Long callback changes:
- Add
background=False
todash.callback
to use instead ofapp.long_callback
. - Add previous
app.long_callback
arguments todash.callback
(interval
,running
,cancel
,progress
,progress_default
,cache_args_to_ignore
,manager
)
- Add
- #2110 Add
search
prop todcc.Dropdown
options, allowing to search the dropdown options with something other than the label or value.
- #2126 Fix bug where it was not possible to redirect from root when using pages.
- #2114 Fix bug #1978 where text could not be copied from cells in tables with
cell_selectable=False
. - #2102 Fix bug as reported in dash-labs #113 where files starting with
.
were not excluded when buildingdash.page_registry
. - #2100 Fixes bug where module name in for a custom
not_found_404
page is incorrect in thedash.page_registry
when not using thepages
folder. - #2098 Accept HTTP code 400 as well as 401 for JWT expiry
- #2097 Fix bug #2095 with TypeScript compiler and
React.FC
empty valueDeclaration error & support empty props components. - #2104 Fix bug #2099 with Dropdown clearing search value when a value is selected.
- #2039 Fix bugs in long callbacks:
- #2110 Fix
dcc.Dropdown
search with component as prop for option label. - #2131 Add encoding to file open calls. Fix bug #2127.
- #2116 Rename long callbacks to background callbacks
- Deprecated
dash.long_callback.managers.CeleryLongCallbackManager
, usedash.CeleryManager
instead. - Deprecated
dash.long_callback.managers.DiskcacheLongCallbackManager
, usedash.DiskcacheManager
instead. - Deprecated dash constructor argument
long_callback_manager
in favor ofbackground_callback_manager
.
- Deprecated
- #2134 Upgrade Plotly.js to v2.13.1 (from v2.12.1) including feature release 2.13.0 and patch release 2.13.1
- Add persistent selections via layout attributes
selections
,newselection
, andactiveselection
, along with an updated UI allowing you to modify a selection you created. - Add unselected line styling to
parcoords
traces. - Add more quartile algorithms to
violin
traces. - More flexible axis
automargin
behavior. - And several other enhancements and bug fixes.
- Add persistent selections via layout attributes
- #2087 Fix bug #2086 in which using id as a key within a component's id breaks the new callback context's
args_grouping
function. - #2084 In dash 2.5.0, a default viewport meta tag was added as recommended for mobile-optimized sites by mdn
This feature can be disabled by providing an empty viewport meta tag. e.g.
app = Dash(meta_tags=[{"name": "viewport"}])
- #2090, #2092. Fixed bug where the
path
to thepages_folder
was incorrect on Windows.
- #2087 Removed the undocumented callback context
args_grouping_values
property which was incompatible with pattern-matching callbacks.
- #1947 Added
pages
- a better way to build multi-page apps. For more information see the forum post. - #1965 Add component as props.
- #2049 Added
wait_for_class_to_equal
andwait_for_contains_class
methods todash.testing
- #2050 Changed
find_element
andfind_elements
to accept anattribute
argument that aligns with Selenium'sBy
class, allowing you to search elements by other attributes. Default value isCSS_SELECTOR
to maintain backwards compatibility with previousfind_elements
.
- #2043 Fix bug
#2003 in which
dangerously_allow_html=True
+mathjax=True
works in some cases, and in some cases not. - #2065 Fix bug #2064 rendering of
dcc.Dropdown
with a value but no options. - #2047 Fix bug #1979 in which
DASH_DEBUG
as environment variable gets ignored. - #2070 Fix bug #2066 nested types triggering maximum call stack error when building typescript components.
- Fix #2045 import error when using pytest but
dash[testing]
is not installed.
-
#1952 Improved callback_context
- Closes #1818 Closes #1054
- adds
dash.ctx
, a more concise name fordash.callback_context
- adds
ctx.triggered_prop_ids
, a dictionary of the component ids and props that triggered the callback. - adds
ctx.triggered_id
, theid
of the component that triggered the callback. - adds
ctx.args_grouping
, a dict of the inputs used with flexible callback signatures.
-
#2009 Add support for Promises within Client-side callbacks as requested in #1364.
-
#1956 Add TypeScript components generation.
-
#2034 Add
link_target
prop to dcc.Markdown component. Closes #1827 -
#2035 Add type annotations to testing fixtures.
-
#2029 Restrict the number of props listed explicitly in generated component constructors - default is 250. This prevents exceeding the Python 3.6 limit of 255 arguments. The omitted props are still in the docstring and can still be provided the same as before, they just won't appear in the signature so autocompletion may be affected.
-
#1968 Fix bug #1877, code which uses
merge_duplicate_headers
andstyle_header_conditional
to highlight columns, it incorrectly highlights header cells. -
#2015 Fix bug #1854 in which the combination of row_selectable="single or multi" and filter_action="native" caused the JS error.
-
#1976 Fix #1962 in which DatePickerSingle and DatePickerRange are extremely slow when provided a long list of disabled_days.
-
#2035 Fix #2033 In-App error reporting does not render HTML.
-
#1970 dcc.Dropdown Refactor fixes:
-
#1751 Rename
app.run_server
toapp.run
while preservingapp.run_server
for backwards compatibility. -
#1839 The
callback
decorator returns the original function, not the wrapped function, so that you can still call these functions directly, for example in tests. Note that in this case there will be no callback context so not all callbacks can be tested this way. -
#2016 Drop the 375px width from default percy_snapshot calls, keep only 1280px
-
#2027 Improve the error message when a user doesn't wrap children in a list
- #2016, #2032, and #2042 Widespread dependency upgrades
- Upgrade Plotly.js to v2.12.1 (from v2.11.0).
- Upgrade
black
to v22.3.0 for Python 3.7+ - if you usedash[ci]
and you callblack
, 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.
- #1963 Fix #1780 flask shutdown deprecation warning when running dashduo threaded tests.
- #1995 Fix #1992 ImportError: cannot import name 'get_current_traceback' from 'werkzeug.debug.tbtools'.
- #1949 Add built-in MathJax support to both
dcc.Markdown
anddcc.Graph
. A new boolean propmathjax
was added to these two components, defaulting toFalse
. Setmathjax=True
to enable math rendering. This work uses MathJax v3, althoughdcc.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. - For an intro to LaTeX math, see https://en.wikibooks.org/wiki/LaTeX/Mathematics.
- Big thanks to Equinor for sponsoring this development, including the related work in Plotly.js!
- In
- #1949 Upgrade Plotly.js to v2.11.0 (from v2.9.0)
- Feature release 2.10.0:
- Support for MathJax v3
fillpattern
forscatter
traces with filled area
- Feature release 2.11.0:
- Every trace type can now be rendered in a stricter CSP environment, specifically avoiding
unsafe-eval
. Please note: theregl
-based traces (scattergl
,scatterpolargl
,parcoords
, andsplom
) are only strict in thestrict
bundle, which is NOT served by default in Dash. To use this bundle with Dash, you must either download it and put it in yourassets/
folder, or include it as anexternal_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.
- Every trace type can now be rendered in a stricter CSP environment, specifically avoiding
- Patch release 2.10.1 containing a bugfix for
mesh3d
traces.
- Feature release 2.10.0:
-
#1915 Fix bug #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 Fix bug #1783 in which a failed hot reloader blocks the UI with alerts.
-
#1942 Fix bug #1663 preventing pie traces from sending
customdata
withclickData
and other events.
- #1923:
dash.get_relative_path
dash.strip_relative_path
dash.get_asset_url
This is similar todash.callback
where you don't need theapp
object. It makes it possible to use these functions in thepages
folder of a multi-page app without running into the circularapp
imports issue.
-
#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 intodcc
orddk
.
- Adds
-
#1930 Upgrade JavaScript dependencies across renderer and all components.
- #1932 Fixes several bugs:
-
#1876 Delays finalizing
Dash.config
attributes not used in the constructor untilinit_app()
. -
#1869, #1873 Upgrade Plotly.js to v2.8.3. This includes:
- Feature release 2.5.0:
- 3D traces are now compatible with
no-unsafe-eval
CSP rules.
- 3D traces are now compatible with
- Feature release 2.6.0:
- Add
smith
subplots andscattersmith
traces, for drawing Smith charts.
- Add
- Feature release 2.7.0:
- Add text data for
histogram
traces. - Fix an interaction between
uirevision
andautorange
that pops up in some cases of mixed clientside / serverside figure generation.
- Add text data for
- Feature release 2.8.0:
- Add horizontal colorbars.
- Add text data on
heatmap
and related trace types. - Control legend group title fonts.
- Patch releases 2.5.1, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.8.1, 2.8.2, and 2.8.3 containing bugfixes.
- This PR also upgrades various other dependencies of dash renderer and component suites.
- Feature release 2.5.0:
-
#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 thepytest
plugins in thedash.testing
moduledash[diskcache]
: required if you useDiskcacheLongCallbackManager
dash[celery]
: required if you useCeleryLongCallbackManager
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.
-
#1883 in DataTable added
page_current
topersisted_props
as requested in #1860 -
Input
,State
, andOutput
now accept components instead of ID strings and Dashcallback
will auto-generate the component's ID under-the-hood if not supplied. This allows usage like:
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}'
Or, if using Python >=3.8 you can use the
:=
walrus operator: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}'
#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 usespersistence
, as this can create confusing errors. Callback definitions can still reference components in these cases, but those components must have explicit IDs.Dropdown
,RadioItem
, andChecklist
- 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=
andvalue=
) is still supported. - Flexible Types -
options
can be supplied in two new forms:- An array of
string|number|bool
wherelabel
andvalue
are equal to the items in the list. - A dictionary where the keys and values set as
value
andlabel
respectively.
- An array of
Before:
dcc.Dropdown( options=[ {'label': 'New York', 'value': 'New York'}, {'label': 'Montreal', 'value': 'Montreal'}, ], value='New York' )
or
dcc.Dropdown( options=[ {'label': 'New York', 'value': 'NYC'}, {'label': 'Montreal', 'value': 'MTL'}, ], value='New York' )
After:
dcc.Dropdown(['New York', 'Montreal'], 'New York')
Or
dcc.Dropdown({'NYC': 'New York', 'MTL': 'Montreal'}, 'New York')
RangeSlider
&Slider
- Rearranged Keyword Arugments -
min
,max
, andstep
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 usemin
andmax
and will respectstep
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
.
Before:
dcc.Slider(marks={1: 2, 2: 2, 3: 3})
After:
dcc.Slider(min=1, max=3, step=1)
Or equivalently:
dcc.Slider(1, 3, 1)
Step can also be omitted and the
Slider
will attempt to create a nice, human readable step with SI units and around 5 marks:dcc.Slider(0, 100)
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¹⁸
Ranges below 10µ are not supported by the Slider. This is a bug: #1766
DataTable
- Rearranged Keyword Arguments -
data
andcolumns
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 indata
Before:
dash_table.DataTable(data=df.to_dict('records'), columns=[{'name': i, 'id': i} for i in df.columns])
After:
dash_table.DataTable(data=df.to_dict('records'))
Checklist
&RadioItems
- A new property
inline
appendsdisplay: inline-block
tolabelStyle
.
dcc.Checklist(inline=True)
-
#1879 Delete redundancy in pattern-matching callback implementation, specifically when
ALL
andMATCH
wildcards are used together. This patch was submitted by an anonymous Dash Enterprise customer. Many thanks! -
#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. -
#1836 Fix
__all__
in dcc and table for extras: dcc download helpers and table format helpers. This also restores this functionality to the obsolete top-level packagesdash_core_components
anddash_table
. -
#1822 Remove Radium from renderer dependencies, as part of investigating React 17 support.
-
- 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
-
#1778 DataTable: Fix React warnings stating that each child in a list should have a unique "key" prop
-
#1895 Support debug=True if native namespace-packages are present
- #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 Perform json encoding using the active plotly JSON engine. This will default to the faster orjson encoder if the
orjson
package is installed. - #1736 Add support for
request_refresh_jwt
hook and retry requests that used expired JWT tokens.
- #1679 Restructure
dash
,dash-core-components
,dash-html-components
, anddash-table
into a singular monorepo and move component packages intodash
. This change makes the component modules available for import within thedash
namespace, and simplifies the import pattern for a Dash app. From a development standpoint, all future changes to component modules will be made within thecomponents
directory, and relevant packages updated with thedash-update-components
CLI command. - #1707 Change the default value of the
compress
argument to thedash.Dash
constructor toFalse
. 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 addingcompress=True
to thedash.Dash
constructor. - #1734 Added
npm run build
script to simplify build process involvingdash-renderer
and subcomponent libraries withindash
.
- #1857 Fixed a regression with
dcc.Slider
anddcc.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 and #1851).
-
#1729 Include F#, C#, and MATLAB in markdown code highlighting, for the upcoming .NET and MATLAB flavors of dash.
-
#1735 Upgrade Plotly.js to v2.4.2. This includes:
- Feature release 2.3.0:
- More number formatting options due to
d3-format
upgrade. - Many new
geo
projections. - Improved rendering and performance of
scattergl
,splom
andparcoords
traces.
- More number formatting options due to
- Feature release 2.4.0:
legend.groupclick
bbox
of hover items in event data, to support custom dash-driven hover effects
- Patch releases 2.3.1, 2.4.1, and 2.4.2 containing various bug fixes.
- Feature release 2.3.0:
-
#1735 New
dcc.Tooltip
component. This is particularly useful for rich hover information ondcc.Graph
charts, using thebbox
information included in the event data in plotly.js v2.4.0
- #1729 Include F#, C#, and MATLAB in markdown code highlighting, for the upcoming .NET and MATLAB flavors of dash.
- #1734 Removed the following obsolete
html
elements -<command>
,<element>
,<isindex>
,<listing>
,<multicol>
,<nextid>
. These are obsolete and had been previously removed from the reference table.
- #1675 Add new
Dash
constructor argumentextra_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.
- #1675 Remove the constraint that
requests_pathname_prefix
ends withroutes_pathname_prefix
. When you are serving your app behind a reverse proxy that rewrites URLs that constraint needs to be violated. - #1611 and #1685 Package dash-renderer artifacts and dependencies with Dash, and source renderer resources from within Dash.
- #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 overloadedsrc
directory.
- #1664 Fix #1649, makes the devtools readable with a dark theme.
- #1640 Fix #1475, missing
timing_information
after certain modifications to Flask behavior
-
This applies the fix from #878 to the RangeSlider. It not only fixes the bug where the tooltips were visible when slider was not, but it also reduces the lag in the tooltip when the slider handles are moved.
- #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:
- Stop exporting d3 as
Plotly.d3
, and remove many other deep pieces of the public API. This does not affect thedcc.Graph
component, but if you make use ofPlotly
from the global scope in some other way you may be affected. - Drop the deprecated trace types
contourgl
andarea
, as well as legacy pre-scatterpolar
polar attributesbar.r
,bar.t
,scatter.r
,scatter.t
,layout.radialaxis
,layout.angularaxis
. Usescatterpolar
,barpolar
, andpolar
subplots instead. heatmapgl
andpointcloud
trace types, and thetransform
attribute are deprecated, and will be removed in a future release.- Increase CSP safety by removing function constructors. 3D plots still use function constructors, but if you place one of the non-3D bundles (including the new
strict
bundle) in yourassets
folder you will have no function constructors. - Remove "Aa" text in legends.
- Default
hovermode
to "closest". - Default
textposition
to "auto" inbar
traces. If you previously used thebar.text
attribute for hover only, you will need to explicitly settextposition="none"
. - Add
bar.marker.pattern
,image.zsmooth
, and various other features and bugfixes.
- Stop exporting d3 as
- Feature release 2.1.0:
- New
icicle
trace type. - New
legendrank
trace attribute. - Several other additions and bug fixes.
- New
- Feature release 2.2.0:
- Legend group titles
- Half-year directive (
%h
) for date formatting - Several other bug fixes and performance improvements
- Patch release 2.2.1 containing a security fix.
- Major release 2.0.0:
- #932 Adds a new copy to clipboard component.
- #948] Adds
disabled_days
prop toDatePickerRange
andDatePickerSingle
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 bymin_date_allowed
andmax_date_allowed
.
- #972 Updated R package vignettes and
dash-info.yaml
to regenerate examples without attaching now-deprecated core component packages (dashHtmlComponents
,dashCoreComponents
, ordashTable
).
- #194 Updated dependencies and build process
- #190 Updated R package vignettes and
dash-info.yaml
to regenerate examples without attaching now-deprecated core component packages (dashHtmlComponents
,dashCoreComponents
, ordashTable
).
-
- Added
html
option tomarkdown_options
prop. This enables the use of html tags in markdown text.
- Added
-
- 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
- #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 Updated R package
dash-info.yaml
to regenerate example without attaching now-deprecated core component packages (dashHtmlComponents
,dashCoreComponents
, ordashTable
).
- #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
- #1553 Increase the z-index of the Dash error menu from 1001 to 1100 in order to make sure it appears above Bootstrap components.
- #1546 Validate callback request
outputs
vsoutput
to avoid a perceived security issue.
- #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 diskdcc.send_data_frame
- send aDataFrame
, using one of its writer methodsdcc.send_bytes
- send a bytestring or the result of a bytestring writerdcc.send_string
- send a string or the result of a string writer
- #930 Fixed a bug #867 with
DatePickerRange
that would sometimes shift the allowed dates by one day. - #934 Fixed a bug in
EnhancedTab
component that ignoreddisabled_className
property
-
#179 - Fixes #77 Added
allow
andreferrerPolicy
properties tohtml.Iframe
-
#178 - Fix #161
data
property, and fix #129 obsolete, deprecated, and discouraged elements. No elements were removed, but comments were added to the documentation about these elements detailing their limitations.- #862 - update docstrings per #1205
- #878 - update build process to use Webpack 5 and other latest dependencies
- #1508 Fix #1403: Adds an x button to close the error messages box.
- #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.
- #1503 Fix #1466: loosen
dash[testing]
requirements for easier integration in external projects. This PR also bumps manydash[dev]
requirements.
- #1530 Dedent error messages more carefully.
- #1527 🐛
get_asset_url
now pulls from an external source ifassets_external_path
is set.- updated
_add_assets_resource
to build asset urls the same way asget_asset_url
. - updated doc string for
assets_external_path
Dash argument to be more clear that it will always be joined with theassets_url_path
argument when determining the url to an external asset.
- updated
- #1493 Fix #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"
- #905 Make sure the
figure
prop ofdcc.Graph
receives updates from user interactions in the graph, by using the samelayout
object as provided in the prop rather than cloning it. Fixes #879. - #903 Part of fixing dash import bug #1143
- #888 Adds a
drag_value
prop todcc.Slider
to be able to fire callbacks from dragging and releasing the slider.
- #1442 Update from React 16.13.0 to 16.14.0
- #1448 Provide a hint in the callback error when the user forgot to make
app.callback(...)
a decorator.
- #1426 Fix a regression caused by
flask-compress==1.6.0
causing performance degradation on server requests
- #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 Make callback graph more robust for complex apps and some specific props (
width
in particular) that previously caused errors.
- #1376 Extends the
getTransform
logic in the renderer to handlepersistenceTransforms
for both nested and non-nested persisted props. This was used to to fix dcc#700 in conjunction with dcc#854 by using persistenceTransforms to strip the time part of the datetime so that datepickers can persist when defined in callbacks.
- #1408 Fixes a bug where the callback graph layout would reset whenever a callback fired, losing user-initiated layout changes (#1402) or creating a new force layout (#1401)
- #1371 You can now get CSP
script-src
hashes of all added inline scripts by callingapp.csp_hashes()
(both Dash internal inline scripts, and those added withapp.clientside_callback
) .
- #1385 Closes #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 triggeredn_clicks
props changes. - #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)
- #1384 Fixed a bug introduced by #1180 breaking use of
prevent_initial_call
as a positional arg in callback definitions
- #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, #1377 Added experimental
--jl-prefix
option todash-generate-components
, optionally generates Julia version of components and corresponding Julia package
- #1180 and #1375
Input
,Output
, andState
in callback definitions don't need to be in lists. You still need to provideOutput
items first, thenInput
items, thenState
, 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 theOutput
in a list. This can be useful for procedurally-generated callbacks. - #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.
- #1343 Add
title
parameter to set the document title. This is the recommended alternative to setting app.title or overriding the index HTML. - #1315 Add
update_title
parameter to set or disable the "Updating...." document title during updates. Closes #856 and #732
- #1310 Fix a regression since 1.13.0 preventing more than one loading state from being shown at a time.
- #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
- #1289 Supports
DASH_PROXY
env var to tellapp.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 Adds
callback_context
to clientside callbacks (e.g.dash_clientside.callback_context.triggered
). Supportstriggered
,inputs
,inputs_list
,states
, andstates_list
, all of which closely resemble their serverside cousins.
- #1237 Closes #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 Modifies the callback chain implementation and improves performance for apps with a lot of components
- #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 Fixes #919 so
dash.testing
is compatible with morepytest
plugins, particularlypytest-flake8
andpytest-black
. - #1248 Fixes #1245, so you can use prop persistence with components that have dict IDs, ie for pattern-matching callbacks.
- #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 Closes #1285: Debug=True should work in the main module.
- #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 forapp.clientside_callback
. The app-wide default can also be changed withapp=Dash(prevent_initial_callbacks=True)
, then individual callbacks may disable this behavior. - #1201 New attribute
app.validation_layout
allows you to create a multi-page app withoutsuppress_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 Permit usage of arbitrary file extensions for assets within component libraries
- #1224 Fixes #1223, a very specific situation in which initial callbacks will not fire.
- #1220 Fixes #1216, a set of related issues about pattern-matching callbacks with
ALL
wildcards in theirOutput
which would fail if no components matched the pattern. - #1212 Fixes #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 Fixes #1193 - prior to Dash 1.11, you could use
flask.has_request_context() == False
inside anapp.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.
- #1103 Pattern-matching IDs and callbacks. Component IDs can be dictionaries, and callbacks can reference patterns of components, using three different wildcards:
ALL
,MATCH
, andALLSMALLER
, available fromdash.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
, andstates_list
, which contain all the ids, properties, and except for the outputs, the property values from all matched components. - #1103
dash.testing
option--pause
: after opening the dash app in a test, will invokepdb
for live debugging of both Javascript and Python. Use with a single test case likepytest -k cbwc001 --pause
.
- #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 fortriggered
, but itsid
andproperty
are blank strings, andbool(triggered)
isFalse
.- 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.
- #1103 Fixed multiple bugs with chained callbacks either not triggering, inconsistently triggering, or triggering multiple times. This includes: #635, #832, #1053, #1071, and #1084. Also fixed #1105: async components that aren't rendered by the page (for example in a background Tab) would block the app from executing callbacks.
- #1134 Allow
dash.run_server()
host and port parameters to be set with environment variables HOST & PORT, respectively
- #1145 Update from React 16.8.6 to 16.13.0
- #1142 Persistence: Also persist 0, empty string etc
- #1133 Allow the
compress
config variable to be set with an environment variable with DASH_COMPRESS=FALSE
- #1080 Handle case where dash fails to load when used inside an iframe with a sandbox attribute that only has allow-scripts
- #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 settingrequests_pathname_prefix
prefixed. Useapp.get_relative_path
anywhere you would provide a relative pathname, likedcc.Link(href=app.relative_path('/page-2'))
or even as an alternative toapp.get_asset_url
with e.g.html.Img(src=app.get_relative_path('/assets/logo.png'))
.app.trim_relative_path
a path withrequests_pathname_prefix
and leading & trailing slashes stripped from it. Use this function in callbacks that deal withdcc.Location
pathname
routing. Example usage:
app.layout = html.Div([ dcc.Location(id='url'), html.Div(id='content') ]) @app.callback(Output('content', 'children'), [Input('url', 'pathname')]) def display_content(path): page_name = app.strip_relative_path(path) if not page_name: # None or '' return html.Div([ html.Img(src=app.get_relative_path('/assets/logo.png')), dcc.Link(href=app.get_relative_path('/page-1')), dcc.Link(href=app.get_relative_path('/page-2')), ]) elif page_name == 'page-1': return chapters.page_1 if page_name == "page-2": return chapters.page_2
- #1035 Simplify our build process.
- #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).
- #1037 Fix no_update test to allow copies, such as those stored and retrieved from a cache.
- #967 Add support for defining clientside JavaScript callbacks via inline strings.
- #1020 Allow
visit_and_snapshot
API indash.testing.browser
to stay on the page so you can run other checks.
- #1026 Better error message when you forget to wrap multiple
children
in an array, and they get passed to other props.
- #1018 Fix the
dash.testing
stop API with process application runner in Python2. Usekill()
instead ofcommunicate()
to avoid hanging. - #1027 Fix bug with renderer callback lock never resolving with non-rendered async component using the asyncDecorator
- #1006 Fix IE11 / ES5 compatibility and validation issues
- #1006 Fix bug with renderer wrapper component TreeContainer to prevent useless re-renders
- #1001
- Fix and improve the
clear_input()
API indash.testing
, so it's more robust handling reactinput
. - make the
percy_snapshot()
API more robust, and the timeout ofwait_for_callbacks
(if set to True) will not fail the snapshot execution, but logged as potential error.
- Fix and improve the
- #999 Fix fingerprint for component suites with
metadata
in version. - #983 Fix the assets loading issues when dashR application runner is handling with an app defined by string chunk.
- #987 Fix cache string handling for component suites with nested folders in their packages.
- #986 Fix a bug with evaluation of
_force_eager_loading
when application is loaded with gunicorn
- #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
- Reject all updates with
- #899 Add support for async dependencies and components
- #973 Adds support for resource caching and adds a fallback caching mechanism through etag
- #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.
- #969 Fix warnings emitted by react devtools coming from our own devtools components.
- #948 Support setting working directory for R apps run using the
dashr
fixture, primarily useful for tests with assets.dashr.start_server
supports acwd
argument to set an explicit working directory, and has smarter defaults when it's omitted: ifapp
is a path to an R script, uses the directory of that path; ifapp
is a string, uses the directory the test file itself is in. - #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
. - Three new
dash.testing
methods:clear_local_storage
,clear_session_storage
, andclear_storage
(to clear both together)
- Relevant
- #937
dash.testing
adds two APIszoom_in_graph_by_ratio
andclick_at_coord_fractions
about advanced interactions using mouseActionChain
- #938 Add debugging traces to dash backend about serving component suites, to verify the installed packages whenever in doubt.
- #944 Fix a bug with persistence being toggled on/off on an existing component.
- Bump dash-core-components version from 1.2.0 to 1.2.1
-
#923 Add one configuration
--percy-assets
inpytest
to specify extra application assets path if needed. -
#918 Add
wait_for_element_by_id
andvisit_and_snapshot
APIs in browser, addraw_command
option (with higher priority than the default waitress one) and optionalstart_timeout
argument to handle large applications within the process runner. -
#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
, andpersistence_type
as described in the lead comment ofsrc/persistence.js
. App developers then enable this behavior by, in the simplest case, settingpersistence: true
on the component. First use case is table, see dash-table#566
- Bump dash-table version from 4.2.0 to 4.3.0
- Bump dash-core-components version from 1.1.2 to 1.2.0
- Bump dash-renderer version from 1.0.1 to 1.1.0
- #915 Fix
dash-generate-components
on Windows. - #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 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 .
- #860 Add a new arg
dev_tools_prune_errors
toapp.run_server
andapp.enable_dev_tools
. DefaultTrue
, tracebacks only include user code and below. Set itFalse
for the previous behavior showing all the Dash and Flask parts of the stack.
- Bump dash-table version from 4.1.0 to 4.2.0
- Bump dash-core-components version from 1.1.1 to 1.1.2
- Bump dash-html-components version from 1.0.0 to 1.0.1
- Bump dash-renderer version from 1.0.0 to 1.0.1
- #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 and #734
- Bump dash-core-components version from 1.1.0 to 1.1.1
- #827 Add support for dashR testing to the
dash.testing
pytest framework.
- Bump dash-table version from 4.0.1 to 4.0.2
-
💥 #808 Remove strong
dash.testing
dependencies per community feedback. Testing users should dopip install dash[testing]
afterwards. -
#805 Add headless mode for dash.testing, add
pytest_setup_options
hook for full configuration ofWebDriver Options
. -
Bump dash-table version from 4.0.0 to 4.0.1
-
💥 #761 Several breaking changes to the
dash.Dash
API:- Remove two obsolete constructor kwargs:
static_folder
andcomponents_cache_max_age
- Remove the misspelled
supress_callback_exceptions
fallback - Remove the unused
resources.config.infer_from_layout
- Revamp
app.config
: ALL constructor args are now stored inconfig
, with three exceptions:server
,index_string
, andplugins
. None of these are stored in any other instance attributes anymore. - Change
hot_reload_interval
from msec to seconds, for consistency withhot_reload_watch_interval
- When called from
enable_dev_tools
,debug=True
by default. It's stillFalse
by default fromrun_server
.
- Remove two obsolete constructor kwargs:
-
✨ #744 Introducing Dash Testing (
dash.testing
) - read the full tutorial at https://dash.plotly.com/testing. -
#753
Component
no longer inheritsMutableMapping
, sovalues
,keys
, and more are no longer methods. Fixes an issue reported in dcc#440 where components with certain prop names defined but not provided would cause a failure to render. During component generation we now disallow all props with leading underscores or matching a few remaining reserved words:UNDEFINED
,REQUIRED
,to_plotly_json
,available_properties
, andavailable_wildcard_properties
. -
#739 Allow the Flask app to be provided to Dash after object initialization. This allows users to define Dash layouts etc when using the app factory pattern, or any other pattern that inhibits access to the app object. This broadly complies with the flask extension API, allowing Dash to be considered as a Flask extension where it needs to be.
-
#774 Allow the Flask app to set the Dash app name if the name is not provided by users.
-
#722 Assets are served locally by default. Both JS scripts and CSS files are affected. This improves robustness and flexibility in numerous situations, but in certain cases initial loading could be slowed. To restore the previous CDN serving, set
app.scripts.config.serve_locally = False
(and similarly withapp.css
, but this is generally less important). -
#724, renderer#175 Undo/redo toolbar is removed by default, you can enable it with
app=Dash(show_undo_redo=true)
. The CSS hack._dash-undo-redo:{display:none;}
is no longer needed -
💥 #709 Merge the
dash-renderer
project into the main dash repo to simplify feature dev workflow. We will keep the deprecated one for archive purpose.
- Bump dash-core-components version from 0.47.0 to 0.48.0
- Bump dash-renderer version from 0.23.0 to 0.24.0
- Bump dash-table version from 3.6.0 to 3.7.0
- renderer#170 Fix regression on handling PreventUpdate (204 NO CONTENT)
- #687, renderer#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.
- renderer#148 Fix regression for
children=0
case.
- #672, renderer#143 Support for "Clientside Callbacks" - an escape hatch to execute your callbacks in JavaScript instead of Python
- #676 Add
dev_tools_ui
config flag inapp.run_server
(serialized in<script id="_dash-config" type="application/json">
) to display or hide the forthcoming Dev Tools UI in Dash's front-end (dash-renderer). - #680 Partial updates: leave some multi-output updates unchanged while updating others
- renderer#145 Remove
dash_renderer._set_react_version
support for 15.4.2 and 16.2.0
- Bump dash-core-components version from 0.45.0 to 0.46.0
- renderer#145 Update from React 15.4.2 to React 16.8.6
- Bump dash-core-components version from 0.44.0 to 0.45.0
- Bump dash-html-components version from 0.14.0 to 0.15.0
- renderer#140, renderer#126 Optimize rendering, and always assign
setProps
to components even with no callbacks to use it.
- #436 Allow multiple outputs from a single callback.
- #367 Support custom JavaScript hooks to modify callback payloads and responses.
- #623 Modify the flask response with custom cookies or headers, using
dash.callback_context.response
. - renderer#93 Loading states API
- Bump dash-core-components version from 0.43.1 to 0.44.0
- Bump dash-html-components version from 0.13.5 to 0.14.0
- Bump dash-table version from 3.5.0 to 3.6.0
- #603 Add components libraries js/css distribution to hot reload watch.
- #608, renderer#124 Callback context:
- Know which inputs caused a callback to fire:
dash.callback_context.triggered
- Input/State values by name
dash.callback_context.states.get('btn.n_clicks')
- Know which inputs caused a callback to fire:
- Fix missing indentation for generated metadata.json #600
- Fix missing component prop docstring error #598
- #492 Move
__repr__
to base component instead of being generated. - #605 Raise exception when same input & output are used in a callback
- renderer#118 Removed redux logger for the dev.
- #565 Add core libraries as version locked dependencies
- Bump dash-table version from 3.3.0 to 3.4.0
- Bump dash-renderer version from 0.17.0 to 0.18.0
- Bump dash-core-components version from 0.43.0 to 0.43.1
- #563 Fix collections.abc deprecation warning for Python 3.8
- #550, renderer#114 Remove support for
Event
system. Use event properties instead, for example then_clicks
property instead of theclick
event, see #531.dash_renderer
MUST be upgraded to >=0.17.0 together with this, and it is recommended to updatedash_core_components
to >=0.43.0 anddash_html_components
to >=0.14.0.
- #547
assets_folder
argument now defaults to 'assets'- The assets folder is now always relative to the given root path of
name
argument, the default of__main__
will get thecwd
. - No longer coerce the name argument from the server if the server argument is provided.
- #547
- Asset blueprint takes routes prefix into it's static path.
- Asset url path no longer strip routes from requests.
- #548 Remove print statement from PreventUpdate error handler.
- #524 Removed ComponentRegistry dist cache.
- #522 Fix typo in some exception names
- renderer#110
- Keep the config store state on soft reload.
- AppProvider returns
Loading...
if no configs as before renderer#108.
- #518 Always skip
dynamic
resources from index resources collection.
- #483 Experimental
--r-prefix
option todash-generate-components
, optionally generates R version of components and corresponding R package.
- #490 Add
--ignore
option todash-generate-components
, defaults to^_
.
- renderer#108 Unused login api and Authentication component
- Add
key
to rendered components, fixing renderer#379
- #487 Add specific Dash exception types to replace generic exceptions (
InvalidIndexException
,DependencyException
,ResourceException
)
- #485 Fix typo in missing events/inputs error message
- #484 Mute dash related missing props docstring from extract-meta warnings
- #478, renderer#104 Support for .map file extension and dynamic (on demand) loading
- renderer#107 Redux devtools support
- #473 Fix
_imports_.py
indentation generation.
- #451 Combine
extract-meta
and Python component files generation in a cli
- Fix a bug renderer#66 in the ON_PROP_CHANGE callback where history was not correctly set when acting on more than one component. In particular, the 'undo' button should now work as expected.
- #362, renderer#73 Hot reloading from the browser.
- Silence routes logging with
dev_tools_silence_routes_logging
.
- #444 Add component namespaces registry, collect the resources needed by component library when they are imported instead of crawling the layout.
- #450 Use the same prop name black list for component generation in all supported Python versions. Closes #361.
- #443
Dash.registered_paths
changed to acollections.defaultdict(set)
, was appending the same package paths on every index.
- #431 Replace windows endline when generating components class docstrings.
- #430 Fix
Component.traverse()
andComponent.traverse_with_paths()
for components withchildren
of typetuple
, not justlist
.
- #418 Fix http-equiv typo
- Include missing polyfills to restore Internet Explorer support, restore whatwg-fetch renderer#87
- #377 Move
add_url
function definition out ofDash.__init__
- #407 Missing favicon package_data from setup.py
- #406 Default favicon for dash apps.
- Bust the cache of the assets favicon.
- #403 Remove the first and last blank lines from the HTML index string.
- #369, renderer#77 Allow serving dev bundles from the components suite, enable with
app.run_server(dev_tools_serve_dev_bundles=True)
- #350 Use HTML5 syntax for the meta tag
- #387 Add
Cache-Control
headers to files served byDash.serve_component_suites
, and time modified query string to collected components suites resources. - #394 Add
InvalidResourceError
error and a Flask error handler so unregistered paths inserve_component_suites
return a 404 instead of 500.
- #374 Fix
get_asset_url
with a differentassets_url_path
.
- Set
url_base_pathname
toNone
inDash.__init__
. Fix #364
Dash.get_asset_url
will give the prefixed url for the asset file.
- #351 Prefix assets files with
requests_pathname_prefix
.
- #343 Only create the assets blueprint once for apps that provide the same flask instance to multiple dash instances.
- #336 Fix bug in
_validate_layout
which would not let a user setapp.layout
to be a function that returns a layout (fixes #334).
- #318 Add
assets_ignore
init keyword, regex filter for the assets files.
- #335 Ensure CSS/JS external resources are loaded before the assets.
- #322 Take config values from init or environ variables (Prefixed with
DASH_
).
- Take
requests_pathname_prefix
config when creating scripts tags. requests/routes_pathname_prefix
must start and end with/
.requests_pathname_prefix
must end withroutes_pathname_prefix
. If you supplied bothrequests
androutes
pathname before this update, make surerequests_pathname_prefix
ends with the same value asroutes_pathname_prefix
.url_base_pathname
sets bothrequests/routes
pathname, cannot supply it with eitherrequests
orroutes
pathname prefixes.
- #320 Disallow duplicate component ids in the initial layout.
- Fix bug #321 where importing Dash components with no props would result in an error.
- Fix a bug in 0.23.1 where importing components with arguments that are Python keywords could cause an error. In particular, this fixes
dash-html-components
with Python 3.7.
- #319 Add a modified time query string to assets included in the index in order to bust the cache.
- #316 Add
ie-compat
meta tag to the index by default. - #305 Add
external_script
andexternal_css
keywords to dash__init__
. - Dash components are now generated at build-time and then imported rather than generated when a module is imported. This should reduce the time it takes to import Dash component libraries, and makes Dash compatible with IDEs.
- #273 Raise a more informative error if a non-JSON-serializable value is returned from a callback.
- #286 Asset files & index customization.
- #294 Raise an error if there is no layout present when the server is run.
- renderer#55 Add
_dash-error
class to the "Error loading layout" and "Error loading dependencies" messages.
- Attempting to render a
Boolean
value to the page no longer crashes the app. - renderer#57 If a callback references an
id
which does not exist in the DOM tree at the time it is executed, throw a more informative front-end exception. - renderer#54 Previously, if a component called
updateProps
with multiple properties, Dash would fire the callback multiple times (once for each property). Now the callback only fires once.
- #237 Support
aria-*
anddata-*
attributes in all dash html components. These new keywords can be added using a dictionary expansion, e.g.html.Div(id="my-div", **{"data-toggle": "toggled", "aria-toggled": "true"})
- renderer#45 Allow user to choose between React versions '15.4.2' and '16.2.0':
import dash_renderer # Set the react version before setting up the Dash application dash_renderer._set_react_version('16.2.0') app = dash.Dash(...)
- renderer#50 Update MANIFEST.in to include
react
andreact-dom
bundles for development mode
- #207 Support React components using Flow types.
component_loader
now has the following behavior to create docstrings as determined in discussion in #187:- If a Dash component has
PropTypes
-generated typing, the docstring uses thePropTypes
, regardless of whether the component also has Flow types (current behavior). - Otherwise if a Dash component has Flow types but not
PropTypes
, the docstring now uses the objects generated byreact-docgen
from the Flow types.
- If a Dash component has
- renderer#42 Fix renderer#41 and renderer#44.
- In some cases, during initialization, callbacks may fired multiple times instead of just once. This only happens in certain scenarios where outputs have overlapping inputs and those inputs are leaves (they don't have any inputs of their own).
- If an output component is returned from a callback and its inputs were not returned from the same input (i.e. they were already visible), then the callback to update the output would not fire. This has now been fixed. A common scenario where this app structure exists is within a Tabbed app, where there are global controls that update each tab's contents and the tab's callback just displays new output containers.
- #190
exceptions.PreventUpdate
can be raised inside a callback to prevent the callback from updating the app. See https://community.plotly.com/t/improving-handling-of-aborted-callbacks/7536/2.
- Removes logging from redux middleware from production build based on process.env.NODE_ENV.
- Many pylint style fixes: #163, #164, #165, #166, #167, #168, #169, #172, #173, #181, #185, #186, #193
- #184 New integration test framework.
- #174 Submodules are now imported into the
dash
namespace for better IDE completion.
- 🔒 Remove CSRF protection measures. CSRF-style attacks are not relevant to Dash apps. Dash's API uses
POST
requests with content typeapplication/json
which are not susceptible to unwanted requests from 3rd party sites. See #141. - 🔒
app.server.secret_key
is no longer required since CSRF protection was removed. Settingapp.server.secret_key
was difficult to document and a very common source of confusion, so it's great that users won't get bitten by this anymore 🎉 - 🐞 renderer#22, renderer#28 Previously, old requests could override new requests if their response was longer than the new one. This caused subtle bugs when apps are deployed on multiple processes or threads with component callbacks that update at varying rates like urls. Originally reported in #133. This fix should also improve performance when many updates happen at once as outdated requests will get dropped instead of updating the UI. Performance issue with the first PR reported in renderer#27 and fixed in the second PR.
- renderer#21 Fix an issue where a callback would be fired excessively. Previously, the callback would be called as many times as it had inputs. Now, it is called less.
app.config
is now adict
instead of a class. You can set config variables withapp.config['suppress_callback_exceptions'] = True
now. The previous class-based syntax (e.g.app.config.suppress_callback_exceptions
) has been maintained for backwards compatibility.- 🐌 Experimental behaviour for a customizable "loading state". When a callback is in motion, Dash now appends a
<div class="_dash-loading-callback"/>
to the DOM. Users can style this element using custom CSS to display loading screen overlays. This feature is in alpha, we may remove it at any time.
- Fix a bug from 0.18.2 that removed the ability for dash to serve the app on any route besides
/
. - Fix a bug from 0.18.0 with the new config variables when used in a multi-app setting, causing config to be shared across apps. Originally reported in https://community.plotly.com/t/flask-endpoint-error/5691/7
- Rename config setting
supress_callback_exceptions
tosuppress_callback_exceptions
. The original spelling is kept for backward compatibility. - 🐞 (renderer) Fix a bug where Dash would fire updates for each parent of a grandchild node that shared the same grandparent. Originally reported in https://community.plotly.com/t/specifying-dependency-tree-traversal/5080/5
- 🐞 (renderer) Fix a bug where the document title that displays "Updating..." wouldn't change if the callback raised an Exception. Now it will be removed on any response, even a failure.
- #70 🔧 Add an
endpoint
to each of the URLs to allow for multiple routes.
- #128 🐛 If
app.layout
is a function, then it used to be called excessively. Now it is called just once on startup and just once on page load.
- 🔒 Remove the
/static/
folder and endpoint that is implicitly initialized by flask. This is too implicit for my comfort level: I worry that users will not be aware that their files in theirstatic
folder are accessible - ⚡️ Remove all API calls to the Plotly API (https://api.plotly.com/), the authentication endpoints and decorators, and the associated
filename
,sharing
andapp_url
arguments. This was never documented or officially supported. Authentication has been moved to thedash-auth
package. - #107 ✏️ Sort prop names in exception messages.
- 🔧 Add two new
config
variables:routes_pathname_prefix
andrequests_pathname_prefix
to provide more flexibility for API routing when Dash apps are run behind proxy servers.routes_pathname_prefix
is a prefix applied to the backend routes andrequests_pathname_prefix
prefixed in requests made by Dash's front-end.dash-renderer==0.8.0rc3
uses these endpoints. - #112 🔧 Add
id
toKeyError
exceptions in components.
- ✏️ Fix a typo in an exception.
- 🔧 Replaced all illegal characters in environment variables.
- 📝 Update README.md
- ✅ Fix CircleCI tests. Note that the
dash-renderer
contains the bulk of the integration tests. - 💄 Flake8 fixes and tests (fixes #99)
- ✨ Add this CHANGELOG.md.
✨ This is the initial open-source release of Dash.