Skip to content

Commit 7aca71b

Browse files
authored
Merge branch 'dev' into localstorage-handling
2 parents 551d96e + a8ad575 commit 7aca71b

File tree

27 files changed

+6245
-6666
lines changed

27 files changed

+6245
-6666
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# These owners will be the default owners for everything in
22
# the repo. Unless a later match takes precedence
3-
* @alexcjohnson @T4rk1n @ndrezn @gvwilson @emilykl
3+
* @T4rk1n @ndrezn @gvwilson @emilykl
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ignore_props = ['ignored_prop']

@plotly/dash-generator-test-component-typescript/generator.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,23 @@ describe('Test Typescript component metadata generation', () => {
271271
);
272272
expect(objectOfComponents).toBe("node");
273273
}
274+
);
275+
276+
test(
277+
'union and literal values', () => {
278+
const propType = R.path(
279+
propPath('TypeScriptComponent', 'union_enum').concat(
280+
'type'
281+
),
282+
metadata
283+
);
284+
expect(propType.name).toBe('union');
285+
expect(propType.value.length).toBe(3);
286+
expect(propType.value[0].name).toBe('number');
287+
expect(propType.value[1].name).toBe('literal');
288+
expect(propType.value[2].name).toBe('literal');
289+
expect(propType.value[1].value).toBe('small');
290+
}
274291
)
275292
});
276293

@plotly/dash-generator-test-component-typescript/src/props.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ export type TypescriptComponentProps = {
4747

4848
object_of_string?: {[k: string]: string};
4949
object_of_components?: {[k: string]: JSX.Element};
50+
ignored_prop?: {ignore: {me: string}};
51+
union_enum?: number | 'small' | 'large'
5052
};
5153

5254
export type WrappedHTMLProps = {

CHANGELOG.md

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

5+
## [3.0.0] - 2025-03-17
6+
7+
## Added
8+
9+
- [#2276](https://github.com/plotly/dash/pull/2276) Added component prop static typing for Python.
10+
- [#3152](https://github.com/plotly/dash/pull/3152) Custom Python prop typing for component library.
11+
- Added `-t`, `--custom-typing-module` argument to `dash-generate-components` CLI, default to `dash_prop_typing` and can contains definitions in variables:
12+
- `custom_imports: dict[ComponentName, list[str]]` import statement to be copied at the top of the component class definition.
13+
- `custom_props: dict[ComponentName, dict[PropName, function]]` for custom props. The function signature is: `def generate_type(type_info, component_name, prop_name) -> str`
14+
- [#3035](https://github.com/plotly/dash/pull/3035) `PropType` generation for Typescript components allowing runtime prop validation when in debug mode.
15+
- [#3121](https://github.com/plotly/dash/pull/3121) Restyle and add version checker to dev tools.
16+
- [#3029](https://github.com/plotly/dash/pull/3029) Add pip install based hooks to Dash functionalities.
17+
- Packages can add an `entry_points` with key `dash-hooks` to their `setup.py` for a module to be run when a Dash app is started.
18+
- Add `dash.hooks` methods to hook into Dash apps.
19+
- `hooks.layout` takes the layout as argument and must return a layout, can be used to wrap or add to the layout of Dash apps.
20+
- `hooks.callback` defines a callback to be added to Dash apps.
21+
- `hooks.clientside_callback` defines a clientside callback to be added to Dash apps.
22+
- `hooks.setup` is called before a Dash app is started to get an instance of the app as first argument.
23+
- `hooks.error` to receive all callback errors.
24+
- `hooks.index` to change the `Dash.index_string`.
25+
- `hooks.route` to add a Flask route to the Dash app.
26+
- [#3175](https://github.com/plotly/dash/pull/3175) `hooks.custom_data` to add custom data called from the callback route to the user callback.
27+
- [#3066](https://github.com/plotly/dash/pull/3066) Adds `window.dash_component_api` for components developer as alternative to removed `_dashprivate` props.
28+
- Add `dash_component_api.useDashContext`, `dash_component_api.DashContext` to access the redux store and loading mechanisms.
29+
- `DashContext.componentPath` hold the path to the current component.
30+
- `DashContext.useLoading(options?)` selector to get a boolean if the component is loading.
31+
- `DashContext.isLoading` in case you need to use outside of a functional component.
32+
- `DashContext.useSelector` to create custom selectors for the connected redux store.
33+
- `DashContext.useStore` get the Dash app redux store.
34+
- `DashContext.useDispatch` to dispatch new actions on the Dash redux store.
35+
- Add `dash_component_api.getLayout(path)` to replace `_dashprivate_layout`.
36+
- Expose `stringifyId` in `window.dash_component_api`. [#3175](https://github.com/plotly/dash/pull/3175)
37+
- Add `window.dash_component_api.ExternalWrapper` to render Dash components that are not part of the layout tree. [#3170](https://github.com/plotly/dash/pull/3170) [#3183](https://github.com/plotly/dash/pull/3183)
38+
39+
40+
## Removed
41+
42+
- [#3066](https://github.com/plotly/dash/pull/3066) `loading_state` removed from components props.
43+
- [#3078](https://github.com/plotly/dash/pull/3078) Deprecations removals
44+
- Removed `dash.development.component_loader`, components libraries now required to generate the components with `dash-generate-components`.
45+
- `Dash.run_server` has been removed in favor of `Dash.run`.
46+
- Removed `dcc.LogoutButton` component.
47+
- Renamed all `long` references to `background`.
48+
- Removed `dash_core_components`, `dash_html_components` and `dash_table` stub packages from `dash` install requirements.
49+
50+
## Changed
51+
52+
- [#3093](https://github.com/plotly/dash/pull/3093) Changed default React version to 18.3.1
53+
- `defaultProps` on functional components now emits a deprecation warning.
54+
- Deprecation notice on strings refs.
55+
56+
## Fixed
57+
58+
- [#3080](https://github.com/plotly/dash/pull/3080) Fix docstring generation for components using single-line or nonstandard-indent leading comments
59+
- [#3103](https://github.com/plotly/dash/pull/3103) Fix Graph component becomes unresponsive if an invalid figure is passed
60+
- [#3190](https://github.com/plotly/dash/pull/3190) Fix issue with cache key generation by adding option to include triggered inputs. Fixes [#3189](https://github.com/plotly/dash/issues/3189)
61+
- [#3130](https://github.com/plotly/dash/pull/3130) Fix HOST variable when using conda.
62+
- [#3066](https://github.com/plotly/dash/pull/3066) Improve performance of context components re-rendering.
63+
- [#3171](https://github.com/plotly/dash/pull/3171) JupyterDash Fix - Alive Check
64+
- [#3168](https://github.com/plotly/dash/pull/3168) Fix clientside pattern matching with a dot in the id.
65+
566
## [3.0.0-rc4] - 2025-03-04
667

768
## Fixed
@@ -89,6 +150,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
89150

90151
- [#3080](https://github.com/plotly/dash/pull/3080) Fix docstring generation for components using single-line or nonstandard-indent leading comments
91152
- [#3103](https://github.com/plotly/dash/pull/3103) Fix Graph component becomes unresponsive if an invalid figure is passed
153+
- [#3190](https://github.com/plotly/dash/pull/3190) Fix issue with cache key generation by adding option to include triggered inputs. Fixes [#3189](https://github.com/plotly/dash/issues/3189)
92154
- [#3130](https://github.com/plotly/dash/pull/3130) Fix HOST variable when using conda.
93155
- [#3066](https://github.com/plotly/dash/pull/3066) Improve performance of context components re-rendering.
94156

0 commit comments

Comments
 (0)