Skip to content

Commit 993283b

Browse files
committed
merge: pull in latest changes from dev
2 parents c8073a8 + 8297e54 commit 993283b

File tree

28 files changed

+615
-365
lines changed

28 files changed

+615
-365
lines changed

@plotly/dash-generator-test-component-typescript/dash_prop_typing.py

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import React, { useState, useEffect } from "react";
2+
import PropTypes from "prop-types";
3+
4+
const RenderType = (props) => {
5+
const onClick = () => {
6+
props.setProps({n_clicks: (props.n_clicks || 0) + 1})
7+
}
8+
9+
return <div id={props.id}>
10+
<span>{props.dashRenderType}</span>
11+
<button onClick={onClick}>Test Internal</button>
12+
</div>;
13+
};
14+
15+
RenderType.propTypes = {
16+
id: PropTypes.string,
17+
dashRenderType: PropTypes.string,
18+
n_clicks: PropTypes.number,
19+
setProps: PropTypes.func
20+
};
21+
22+
RenderType.dashRenderType = true;
23+
export default RenderType;

@plotly/dash-test-components/src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import MyPersistedComponentNested from './components/MyPersistedComponentNested'
77
import StyledComponent from './components/StyledComponent';
88
import WidthComponent from './components/WidthComponent';
99
import ComponentAsProp from './components/ComponentAsProp';
10+
import RenderType from './components/RenderType';
1011

1112
import DrawCounter from './components/DrawCounter';
1213
import AddPropsComponent from "./components/AddPropsComponent";
@@ -32,4 +33,5 @@ export {
3233
ShapeOrExactKeepOrderComponent,
3334
ArrayOfExactOrShapeWithNodePropAssignNone,
3435
ExternalComponent,
36+
RenderType
3537
};

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,22 @@
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]
5+
## [3.0.2] - 2025-04-01
66

77
## Changed
88
- [#3113](https://github.com/plotly/dash/pull/3113) Adjusted background polling requests to strip the data from the request, this allows for context to flow as normal. This addresses issue [#3111](https://github.com/plotly/dash/pull/3111)
9+
- [#3248](https://github.com/plotly/dash/pull/3248) Changes to rendering logic:
10+
- if it is first time rendering, render from the parent props
11+
- listens only to updates for that single component, no children listening to parents
12+
- if parents change a prop with components as props, only the prop changed re-renders, this is then forced on all children regardless of whether or not the props changed
913

1014
## Fixed
1115
- [#3251](https://github.com/plotly/dash/pull/3251). Prevented default styles from overriding `className_*` props in `dcc.Upload` component.
1216

17+
## Added
18+
- [#3248](https://github.com/plotly/dash/pull/3248) added new `dashRenderType` to determine why the component layout was changed (`internal`, `callback`, `parent`, `clientsideApi`):
19+
- this can be utilized to keep from rendering components by the component having `dashRenderType` defined as a prop, and the `dashRenderType = true` must be set on the component, eg (`Div.dashRenderType = true`)
20+
- [#3241](https://github.com/plotly/dash/pull/3241) Added a collapse / expand button to Dash Dev Tools.
1321

1422
## [3.0.1] - 2025-03-24
1523

components/dash-core-components/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/dash-core-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dash-core-components",
3-
"version": "3.0.3",
3+
"version": "3.0.4",
44
"description": "Core component suite for Dash",
55
"repository": {
66
"type": "git",

dash/_callback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def callback(
7777
cache_ignore_triggered=True,
7878
on_error: Optional[Callable[[Exception], Any]] = None,
7979
**_kwargs,
80-
):
80+
) -> Callable[..., Any]:
8181
"""
8282
Normally used as a decorator, `@dash.callback` provides a server-side
8383
callback relating the values of one or more `Output` items to one or

dash/_dash_renderer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import os
22

3-
__version__ = "2.0.5"
3+
__version__ = "2.0.6"
44

55
_available_react_versions = {"18.3.1", "18.2.0", "16.14.0"}
66
_available_reactdom_versions = {"18.3.1", "18.2.0", "16.14.0"}
@@ -64,7 +64,7 @@ def _set_react_version(v_react, v_reactdom=None):
6464
{
6565
"relative_package_path": "dash-renderer/build/dash_renderer.min.js",
6666
"dev_package_path": "dash-renderer/build/dash_renderer.dev.js",
67-
"external_url": "https://unpkg.com/[email protected].5"
67+
"external_url": "https://unpkg.com/[email protected].6"
6868
"/build/dash_renderer.min.js",
6969
"namespace": "dash",
7070
},

dash/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def split_callback_id(callback_id):
177177
return {"id": id_, "property": prop}
178178

179179

180-
def stringify_id(id_):
180+
def stringify_id(id_) -> str:
181181
def _json(k, v):
182182
vstr = v.to_json() if hasattr(v, "to_json") else json.dumps(v)
183183
return f"{json.dumps(k)}:{vstr}"

dash/dash-renderer/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)