Skip to content

clarify "soft" reloading of CSS during hot reload events requires that hard = TRUE #977

Open
@rpkyle

Description

@rpkyle

In the current implementation of hot reloading, a JSON response containing four keys is provided by the backend whenever asset changes are detected and a reload event is in progress:

dash/dash/dash.py

Lines 508 to 514 in 74b4c2e

return flask.jsonify(
{
"reloadHash": _hash,
"hard": hard,
"packages": list(self.registered_paths.keys()),
"files": list(changed),
}

The original intent of the "hard" key was to identify reload events in which only CSS files have been updated. In this situation, the page would refresh CSS without re-rendering the page layout. However, @alexcjohnson and I observed that CSS (soft) reloading does not appear to work properly unless "hard": true. It seems that "hard" may always be true, so that this flag has essentially no effect.

For the moment, it appears that "is_css" (a key nested within the "files" key) actually serves this purpose, and "hard" is unused. We may wish to remove references to "hard" from both Dash for Python and R .

@Marc-Andre-Rivet

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions