Skip to content

Dash v1.8.0

Compare
Choose a tag to compare
@Marc-Andre-Rivet Marc-Andre-Rivet released this 14 Jan 18:37
· 4789 commits to dev since this release

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 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:
    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 nested dcc.Markdown (dccMarkdown) react components inside of dcc.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

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 the window.hljs variable. Similarly to how plotly.js is handled, it is overridden by a user-provided version if one exists.

Updated

Dash-Table

Added

  • #606 Add markdown support for table cells. Cells will be rendered as markdown if the column presentation is specified as markdown.
    • Add highlight.js for syntax highlighting. If window.hljs is specified, that will be used for highlighting instead.

Fixed

  • #670 Fix a bug where derived_filter_query_structure was not getting updated properly
  • #677 Fix a bug where the table fails to load when used inside an iframe with a sandbox attribute that only has allow-scripts
  • #665 Fix a bug in Firefox where the dropdown cells height is incorrect