Skip to content

Commit 8b52a6d

Browse files
authored
Merge branch 'dev' into mathjax-v3
2 parents 52fcf9c + 58bec06 commit 8b52a6d

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
All notable changes to `dash` will be documented in this file.
33
This project adheres to [Semantic Versioning](https://semver.org/).
44

5+
## [Unreleased]
6+
7+
### Fixed
8+
- [#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.
9+
510
## [2.2.0] - 2022-02-18
611

712
### Added

dash/dash-renderer/src/components/core/Reloader.react.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,16 @@ class Reloader extends React.Component {
154154
// Backend code changed - can do a soft reload in place
155155
dispatch({type: 'RELOAD'});
156156
}
157-
} else if (reloadRequest.status === 500) {
157+
} else if (
158+
this.state.intervalId !== null &&
159+
reloadRequest.status === 500
160+
) {
158161
if (this._retry > this.state.max_retry) {
159162
this.clearInterval();
160163
// Integrate with dev tools ui?!
161164
window.alert(
162-
`
163-
Reloader failed after ${this._retry} times.
164-
Please check your application for errors.
165-
`
165+
`Hot reloading is disabled after failing ${this._retry} times. ` +
166+
'Please check your application for errors, then refresh the page.'
166167
);
167168
}
168169
this._retry++;

dash/dash.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,8 @@ def init_app(self, app=None, **kwargs):
443443
self.server = app
444444

445445
assets_blueprint_name = "{}{}".format(
446-
config.routes_pathname_prefix.replace("/", "_"), "dash_assets"
446+
config.routes_pathname_prefix.replace("/", "_").replace(".", "_"),
447+
"dash_assets",
447448
)
448449

449450
self.server.register_blueprint(

setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ def read_req_file(req_type):
4444
"pytest11": ["dash = dash.testing.plugin"],
4545
},
4646
url="https://plotly.com/dash",
47+
project_urls={
48+
"Documentation": "https://dash.plotly.com",
49+
"Source": "https://github.com/plotly/dash",
50+
"Issue Tracker": "https://github.com/plotly/dash/issues",
51+
},
4752
classifiers=[
4853
"Development Status :: 5 - Production/Stable",
4954
"Environment :: Web Environment",

0 commit comments

Comments
 (0)