Skip to content

Commit 26f01b2

Browse files
authored
Merge branch 'dev' into bring-your-own-server
2 parents 493d150 + 0221a97 commit 26f01b2

File tree

20 files changed

+404
-19
lines changed

20 files changed

+404
-19
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@ This project adheres to [Semantic Versioning](https://semver.org/).
88
- [#3395](https://github.com/plotly/dash/pull/3396) Add position argument to hooks.devtool
99
- [#3403](https://github.com/plotly/dash/pull/3403) Add app_context to get_app, allowing to get the current app in routes.
1010
- [#3407](https://github.com/plotly/dash/pull/3407) Add `hidden` to callback arguments, hiding the callback from appearing in the devtool callback graph.
11+
- [#3397](https://github.com/plotly/dash/pull/3397) Add optional callbacks, suppressing callback warning for missing component ids for a single callback.
1112
- [#3424](https://github.com/plotly/dash/pull/3424) Adds support for `Patch` on clientside callbacks class `dash_clientside.Patch`, as well as supporting side updates, eg: (Running, SetProps).
1213
- [#3347](https://github.com/plotly/dash/pull/3347) Added 'api_endpoint' to `callback` to expose api endpoints at the provided path for use to be executed directly without dash.
14+
- [#3445](https://github.com/plotly/dash/pull/3445) Added API to reverse direction of slider component.
15+
- [#3460](https://github.com/plotly/dash/pull/3460) Add `/health` endpoint for server monitoring and health checks.
16+
- [#3465](https://github.com/plotly/dash/pull/3465) Plotly cloud integrations, add devtool API, placeholder plotly cloud CLI & publish button, `dash[cloud]` extra dependencies.
1317

1418
## Fixed
1519
- [#3395](https://github.com/plotly/dash/pull/3395) Fix Components added through set_props() cannot trigger related callback functions. Fix [#3316](https://github.com/plotly/dash/issues/3316)
16-
- [#3397](https://github.com/plotly/dash/pull/3397) Add optional callbacks, suppressing callback warning for missing component ids for a single callback.
1720
- [#3415](https://github.com/plotly/dash/pull/3415) Fix the error triggered when only a single no_update is returned for client-side callback functions with multiple Outputs. Fix [#3366](https://github.com/plotly/dash/issues/3366)
1821
- [#3416](https://github.com/plotly/dash/issues/3416) Fix DeprecationWarning in dash/_jupyter.py by migrating from deprecated ipykernel.comm.Comm to comm module
1922

components/dash-core-components/src/components/Slider.react.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ Slider.propTypes = {
156156
*/
157157
verticalHeight: PropTypes.number,
158158

159+
/**
160+
* If the value is true, it means the component is rendered reverse.
161+
*/
162+
reverse: PropTypes.bool,
163+
159164
/**
160165
* Additional CSS class for the root DOM node
161166
*/
@@ -208,6 +213,7 @@ Slider.defaultProps = {
208213
persisted_props: ['value'],
209214
persistence_type: 'local',
210215
verticalHeight: 400,
216+
reverse: false,
211217
};
212218

213219
export const propTypes = Slider.propTypes;

components/dash-core-components/src/fragments/Slider.react.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const sliderProps = [
2727
'included',
2828
'tooltip',
2929
'vertical',
30+
'reverse',
3031
'id',
3132
];
3233

dash/_get_app.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ def wrap(*args, **kwargs):
3939

4040

4141
def get_app():
42+
"""
43+
Return the current Dash app instance.
44+
45+
Useful in multi-page apps when Python files within the `pages/` folder
46+
need to reference the `app` object but importing it directly would cause
47+
a circular import error.
48+
"""
4249
try:
4350
ctx_app = app_context.get()
4451
if ctx_app is not None:

dash/_plotly_cli.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import sys
2+
3+
4+
def cli():
5+
try:
6+
from plotly_cloud.cli import main # pylint: disable=import-outside-toplevel
7+
8+
main()
9+
except ImportError:
10+
print(
11+
"Plotly cloud is not installed,"
12+
" install it with `pip install dash[cloud]` to use the plotly command",
13+
file=sys.stderr,
14+
)
15+
sys.exit(-1)

dash/background_callback/managers/diskcache_manager.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,14 @@ async def async_run():
287287
}
288288
},
289289
)
290+
290291
if asyncio.iscoroutine(user_callback_output):
291292
user_callback_output = await user_callback_output
292293
if not errored:
293-
cache.set(result_key, user_callback_output)
294+
try:
295+
cache.set(result_key, user_callback_output)
296+
except Exception as err: # pylint: disable=broad-except
297+
print(f"Diskcache manager couldn't save output: {err}")
294298

295299
if asyncio.iscoroutinefunction(fn):
296300
func = partial(ctx.run, async_run)
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 3 deletions
Loading
Lines changed: 1 addition & 3 deletions
Loading

dash/dash-renderer/src/components/error/menu/DebugMenu.css

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
}
113113

114114
.dash-debug-menu:hover {
115-
background-color: #108de4;
115+
background-color: #7f4bc4;
116116
}
117117

118118
.dash-debug-menu__outer {
@@ -208,13 +208,12 @@
208208
align-items: center;
209209
transition: background-color 0.2s;
210210
font-family: Verdana, sans-serif !important;
211-
font-weight: bold;
212-
color: black;
211+
color: #7f4bc4;
213212
}
214213

215214
.dash-debug-menu__button.dash-debug-menu__button--selected {
216215
color: #7f4bc4;
217-
box-shadow: 0 2px #0071c2;
216+
box-shadow: 0 2px #7f4bc4;
218217
}
219218
.dash-debug-menu__button.dash-debug-menu__button--selected:hover {
220219
color: #5806c4;
@@ -253,3 +252,9 @@
253252
font-size: 14px;
254253
margin-left: 3px;
255254
}
255+
.dash-debug-menu__icon {
256+
color: #9ca3af;
257+
}
258+
.dash-debug-menu__button:hover .dash-debug-menu__icon {
259+
color: #5806c4;
260+
}

0 commit comments

Comments
 (0)