Dash and Dash-Renderer
Added
- #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
Changed
- #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).
Fixed
- #1037 Fix no_update test to allow copies, such as those stored and retrieved from a cache.
Dash-Core-Components
Added
- #711 Added support for
dcc.Link
(dccLink) and nesteddcc.Markdown
(dccMarkdown) react components inside ofdcc.Markdown
- #706
- Added new
responsive
property that overrides the underlying Plotly.js graph responsiveness from Dash-land - Added responsiveness on graph parent element resize (previously only worked on window.resize)
- Added new
dash-graph--pending
class to dcc.Graph, present while resizing, (re-)rendering, loading
- Added new
Changed
- #723 Changed npm package content to allow source code inclusion from other projects
- #725 Improve async graph performance by parallelizing resource fetching instead of fetching sequentially
- #720
highlight.js
is now bundled into the package, and no longer sets thewindow.hljs
variable. Similarly to howplotly.js
is handled, it is overridden by a user-provided version if one exists.
Updated
- #732
- Upgraded plotly.js to 1.52.1
- Feature release 1.52.0 which contains:
- Patch release 1.52.1 containing several bug fixes.
- #706
- Upgraded plotly.js to 1.51.3
Dash-Table
Added
- #606 Add markdown support for table cells. Cells will be rendered as markdown if the column
presentation
is specified asmarkdown
.- Add highlight.js for syntax highlighting. If
window.hljs
is specified, that will be used for highlighting instead.
- Add highlight.js for syntax highlighting. If