Skip to content

Commit df7fb1b

Browse files
committed
Merge remote-tracking branch 'origin' into v4-merge-dev
2 parents 7cc17cf + ec5cfa3 commit df7fb1b

29 files changed

Lines changed: 2668 additions & 2157 deletions

File tree

@plotly/dash-jupyterlab/yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,9 +1312,9 @@ lib0@^0.2.85, lib0@^0.2.98:
13121312
isomorphic.js "^0.2.4"
13131313

13141314
lodash-es@^4.17.21:
1315-
version "4.17.21"
1316-
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee"
1317-
integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==
1315+
version "4.17.23"
1316+
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.23.tgz#58c4360fd1b5d33afc6c0bbd3d1149349b1138e0"
1317+
integrity sha512-kVI48u3PZr38HdYz98UmfPnXl2DXrpdctLrFLCd3kOx1xUkOmpFPx7gCWWM5MPkL/fD8zb+Ph0QzjGFs4+hHWg==
13181318

13191319
lodash.escape@^4.0.1:
13201320
version "4.0.1"

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,27 @@ This project adheres to [Semantic Versioning](https://semver.org/).
6060
- [#3398](https://github.com/plotly/dash/pull/3398) Modernize dcc.Input
6161
- [#3414](https://github.com/plotly/dash/pull/3414) Modernize dcc.Slider
6262

63+
64+
## [3.4.0] - 2026-01-19
65+
66+
## Added
67+
68+
- [#3568]((https://github.com/plotly/dash/pull/3568) Added `children` and `copied_children` props to `dcc.Clipboard` to customize the button contents before and after copying.
69+
- [#3534]((https://github.com/plotly/dash/pull/3534) Adds `playsInline` prop to `html.Video`. Based on [#2338]((https://github.com/plotly/dash/pull/2338)
70+
- [#3541](https://github.com/plotly/dash/pull/3541) Add `attributes` dictionary to be be formatted on script/link (_js_dist/_css_dist) tags of the index, allows for `type="module"` or `type="importmap"`. [#3538](https://github.com/plotly/dash/issues/3538)
71+
- [#3542](https://github.com/plotly/dash/pull/3542) Add hidden=True to dash pages callback.
72+
- [#3564](https://github.com/plotly/dash/pull/3564) Add new parameter `hide_all_callbacks` to `run()`. Closes [#3493](https://github.com/plotly/dash/issues/3493)
73+
- [#3563](https://github.com/plotly/dash/pull/3563) Add hidden to clientside callbacks as configurable parameter
74+
75+
## Fixed
76+
- [#3541](https://github.com/plotly/dash/pull/3541) Remove last reference of deprecated `pkg_resources`.
77+
- [#3548](https://github.com/plotly/dash/pull/3548) Fix devtools overflowing it's container on version update. Fix [#3535](https://github.com/plotly/dash/issues/3535).
78+
- [#3545](https://github.com/plotly/dash/pull/3545) Replace deprecated asyncio.iscoroutinefunction() call with inspect.iscoroutinefunction()
79+
80+
# Changed
81+
- [#3540](https://github.com/plotly/dash/pull/3540) Expose more types for better static typing options.
82+
- [#3520](https://github.com/plotly/dash/pull/3520). Set `pointer-events` to `auto` on `Tooltip` to make it possible to interact with tooltip content when `targetable=True`
83+
6384
## [3.3.0] - 2025-11-12
6485

6586
## Added

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

Lines changed: 381 additions & 344 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: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@
6767
"uniqid": "^5.4.0"
6868
},
6969
"devDependencies": {
70-
"@babel/cli": "^7.28.3",
71-
"@babel/core": "^7.28.5",
72-
"@babel/eslint-parser": "^7.28.5",
70+
"@babel/cli": "^7.28.6",
71+
"@babel/core": "^7.28.6",
72+
"@babel/eslint-parser": "^7.28.6",
7373
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
74-
"@babel/preset-env": "^7.28.5",
74+
"@babel/preset-env": "^7.28.6",
7575
"@babel/preset-react": "^7.28.5",
7676
"@babel/preset-typescript": "^7.28.5",
7777
"@plotly/dash-component-plugins": "^1.2.3",
@@ -110,7 +110,7 @@
110110
"styled-jsx": "^5.1.7",
111111
"ts-jest": "^29.1.0",
112112
"typescript": "^5.8.3",
113-
"webpack": "^5.102.1",
113+
"webpack": "^5.104.1",
114114
"webpack-cli": "^5.1.4"
115115
},
116116
"optionalDependencies": {

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

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,14 @@ export default class Clipboard extends React.Component {
128128
}
129129

130130
render() {
131-
const {id, title, className, style} = this.props;
132-
const copyIcon = <FontAwesomeIcon icon={faCopy} />;
133-
const copiedIcon = <FontAwesomeIcon icon={faCheckCircle} />;
134-
const btnIcon = this.state.copied ? copiedIcon : copyIcon;
131+
const {id, title, className, style, children, copied_children} =
132+
this.props;
133+
134+
const isCopied = this.state.copied;
135+
136+
const button_children = isCopied
137+
? copied_children ?? <FontAwesomeIcon icon={faCheckCircle} />
138+
: children ?? <FontAwesomeIcon icon={faCopy} />;
135139

136140
return clipboardAPI ? (
137141
<LoadingElement
@@ -141,7 +145,7 @@ export default class Clipboard extends React.Component {
141145
className={className}
142146
onClick={this.onClickHandler}
143147
>
144-
<i> {btnIcon}</i>
148+
{button_children}
145149
</LoadingElement>
146150
) : null;
147151
}
@@ -160,6 +164,16 @@ Clipboard.propTypes = {
160164
*/
161165
id: PropTypes.string,
162166

167+
/**
168+
* Children rendered inside the Clipboard button before copying. By default, a copy icon.
169+
*/
170+
children: PropTypes.node,
171+
172+
/**
173+
* Children rendered inside the Clipboard button after the value has been copied. By default, a check icon.
174+
*/
175+
copied_children: PropTypes.node,
176+
163177
/**
164178
* The id of target component containing text to copy to the clipboard.
165179
* The inner text of the `children` prop will be copied to the clipboard. If none, then the text from the
@@ -173,7 +187,7 @@ Clipboard.propTypes = {
173187
content: PropTypes.string,
174188

175189
/**
176-
* The number of times copy button was clicked
190+
* The number of times Clipboard button was clicked
177191
*/
178192
n_clicks: PropTypes.number,
179193

components/dash-core-components/tests/integration/clipboard/test_clipboard.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,46 @@ def selected(icon_clicks, button_clicks):
9090
== copy_text,
9191
timeout=3,
9292
)
93+
94+
95+
def test_clp004_clipboard_children_and_copied_children(dash_dcc_headed):
96+
content = "https://dash.plotly.com/"
97+
children_text = "Copy URL"
98+
copied_children_text = "Copied!"
99+
100+
app = Dash(__name__, prevent_initial_callbacks=True)
101+
app.layout = html.Div(
102+
[
103+
dcc.Clipboard(
104+
id="clipboard",
105+
children=children_text,
106+
copied_children=copied_children_text,
107+
content=content,
108+
),
109+
dcc.Textarea(id="textarea"),
110+
]
111+
)
112+
113+
dash_dcc_headed.start_server(app)
114+
115+
clipboard = dash_dcc_headed.find_element("#clipboard")
116+
117+
assert clipboard.text == children_text
118+
119+
clipboard.click()
120+
wait.until(
121+
lambda: dash_dcc_headed.find_element("#clipboard").text == copied_children_text,
122+
timeout=3,
123+
)
124+
textarea = dash_dcc_headed.find_element("#textarea")
125+
textarea.click()
126+
127+
ActionChains(dash_dcc_headed.driver).key_down(Keys.CONTROL).send_keys("v").key_up(
128+
Keys.CONTROL
129+
).perform()
130+
131+
wait.until(
132+
lambda: dash_dcc_headed.find_element("#textarea").get_attribute("value")
133+
== content,
134+
timeout=3,
135+
)

0 commit comments

Comments
 (0)