Skip to content

Commit 6c50a18

Browse files
authored
Merge pull request #2785 from plotly/master-2.16.1
Master 2.16.1
2 parents add7112 + 841cb60 commit 6c50a18

29 files changed

+308
-1459
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
3+
* @alexcjohnson @T4rk1n @ndrezn

CHANGELOG.md

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

5+
## [2.16.1] - 2024-03-06
6+
7+
## Fixed
8+
9+
- [#2783](https://github.com/plotly/dash/pull/2783) Remove dynamic loading.
10+
511
## [2.16.0] - 2024-03-01
612

713
## Fixed

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__ = "1.19.0"
3+
__version__ = "1.19.1"
44

55
_available_react_versions = {"16.14.0", "18.2.0"}
66
_available_reactdom_versions = {"16.14.0", "18.2.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].0"
67+
"external_url": "https://unpkg.com/[email protected].1"
6868
"/build/dash_renderer.min.js",
6969
"namespace": "dash",
7070
},

dash/_validate.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
from collections.abc import MutableSequence
23
import re
34
from textwrap import dedent
@@ -356,6 +357,13 @@ def check_obsolete(kwargs):
356357
See https://dash.plotly.com for details.
357358
"""
358359
)
360+
if key in ["dynamic_loading", "preloaded_libraries"]:
361+
# Only warns as this was only available for a short time.
362+
print(
363+
f"{key} has been removed and no longer a valid keyword argument in Dash.",
364+
file=sys.stderr,
365+
)
366+
continue
359367
# any other kwarg mimic the built-in exception
360368
raise TypeError(f"Dash() got an unexpected keyword argument '{key}'")
361369

dash/dash-renderer/build/dash_renderer.dev.js

Lines changed: 199 additions & 846 deletions
Large diffs are not rendered by default.

dash/dash-renderer/build/dash_renderer.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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.

dash/dash-renderer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dash-renderer",
3-
"version": "1.19.0",
3+
"version": "1.19.1",
44
"description": "render dash components in react",
55
"main": "build/dash_renderer.min.js",
66
"scripts": {

dash/dash-renderer/src/APIController.react.js

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
import {batch, connect} from 'react-redux';
22
import {includes, isEmpty} from 'ramda';
3-
import React, {
4-
useEffect,
5-
useRef,
6-
useState,
7-
createContext,
8-
useCallback
9-
} from 'react';
3+
import React, {useEffect, useRef, useState, createContext} from 'react';
104
import PropTypes from 'prop-types';
115
import TreeContainer from './TreeContainer';
126
import GlobalErrorContainer from './components/error/GlobalErrorContainer.react';
@@ -27,7 +21,6 @@ import {getAppState} from './reducers/constants';
2721
import {STATUS} from './constants/constants';
2822
import {getLoadingState, getLoadingHash} from './utils/TreeContainer';
2923
import wait from './utils/wait';
30-
import LibraryManager from './libraries/LibraryManager';
3124

3225
export const DashContext = createContext({});
3326

@@ -53,10 +46,6 @@ const UnconnectedContainer = props => {
5346
if (!events.current) {
5447
events.current = new EventEmitter();
5548
}
56-
57-
const [libraryReady, setLibraryReady] = useState(false);
58-
const onLibraryReady = useCallback(() => setLibraryReady(true), []);
59-
6049
const renderedTree = useRef(false);
6150

6251
const propsRef = useRef({});
@@ -71,9 +60,7 @@ const UnconnectedContainer = props => {
7160
})
7261
});
7362

74-
useEffect(
75-
storeEffect.bind(null, props, events, setErrorLoading, libraryReady)
76-
);
63+
useEffect(storeEffect.bind(null, props, events, setErrorLoading));
7764

7865
useEffect(() => {
7966
if (renderedTree.current) {
@@ -130,23 +117,14 @@ const UnconnectedContainer = props => {
130117
content = <div className='_dash-loading'>Loading...</div>;
131118
}
132119

133-
return (
134-
<LibraryManager
135-
requests_pathname_prefix={config.requests_pathname_prefix}
136-
onReady={onLibraryReady}
137-
ready={libraryReady}
138-
layout={layoutRequest && layoutRequest.content}
139-
>
140-
{config && config.ui === true ? (
141-
<GlobalErrorContainer>{content}</GlobalErrorContainer>
142-
) : (
143-
content
144-
)}
145-
</LibraryManager>
120+
return config && config.ui === true ? (
121+
<GlobalErrorContainer>{content}</GlobalErrorContainer>
122+
) : (
123+
content
146124
);
147125
};
148126

149-
function storeEffect(props, events, setErrorLoading, libraryReady) {
127+
function storeEffect(props, events, setErrorLoading) {
150128
const {
151129
appLifecycle,
152130
dependenciesRequest,
@@ -165,7 +143,7 @@ function storeEffect(props, events, setErrorLoading, libraryReady) {
165143
}
166144
dispatch(apiThunk('_dash-layout', 'GET', 'layoutRequest'));
167145
} else if (layoutRequest.status === STATUS.OK) {
168-
if (isEmpty(layout) && libraryReady) {
146+
if (isEmpty(layout)) {
169147
if (typeof hooks.layout_post === 'function') {
170148
hooks.layout_post(layoutRequest.content);
171149
}
@@ -208,8 +186,7 @@ function storeEffect(props, events, setErrorLoading, libraryReady) {
208186
layoutRequest.status === STATUS.OK &&
209187
!isEmpty(layout) &&
210188
// Hasn't already hydrated
211-
appLifecycle === getAppState('STARTED') &&
212-
libraryReady
189+
appLifecycle === getAppState('STARTED')
213190
) {
214191
let hasError = false;
215192
try {
@@ -258,8 +235,7 @@ const Container = connect(
258235
graphs: state.graphs,
259236
history: state.history,
260237
error: state.error,
261-
config: state.config,
262-
paths: state.paths
238+
config: state.config
263239
}),
264240
dispatch => ({dispatch})
265241
)(UnconnectedContainer);

dash/dash-renderer/src/CheckedComponent.react.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)