Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack broadcasts so that not one is lost #1882

Merged
merged 3 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/taipy-gui/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module.exports = {
"./test-config/Canvas.js",
"./test-config/mockFileUpload.js",
"./test-config/intersectionObserver.js",
"./test-config/nanoid.js",
],
coverageReporters: ["json", "html", "text"],
modulePathIgnorePatterns: ["<rootDir>/packaging/"],
Expand Down
138 changes: 59 additions & 79 deletions frontend/taipy-gui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions frontend/taipy-gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
"react-window": "^1.8.6",
"react-window-infinite-loader": "^1.0.7",
"socket.io-client": "^4.3.2",
"sprintf-js": "^1.1.2",
"uuid": "^10.0.0"
"sprintf-js": "^1.1.2"
},
"overrides": {
"react": "$react",
Expand Down Expand Up @@ -89,7 +88,6 @@
"@types/react-window": "^1.8.5",
"@types/react-window-infinite-loader": "^1.0.5",
"@types/sprintf-js": "^1.1.2",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^8.5.0",
"@typescript-eslint/parser": "^8.5.0",
"add-asset-html-webpack-plugin": "^6.0.0",
Expand Down
20 changes: 20 additions & 0 deletions frontend/taipy-gui/packaging/taipy-gui.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,26 @@ export declare const createRequestUpdateAction: (
forceRefresh?: boolean,
stateContext?: Record<string, unknown>
) => Action;

/**
* Broadcast stack definition.
*/
export interface BroadcastDesc {
/** Name of the broadcast. */
name: string;
FredLL-Avaiga marked this conversation as resolved.
Show resolved Hide resolved
/** Broadcast stack */
stack: Array<unknown>;
}

/**
* Create an *un broadcast* `Action` that will be used to update local state.
*
* This action will remove a value from a broadcasted stacked variable identified by name.
* @param name - The name of the variable identifying the broadcast.
* @param values - The values to remove.
* @returns The action fed to the reducer.
*/
export declare const createUnBroadcastAction: (name: string, ...values: Array<unknown>) => Action;
/**
* A column description as received by the backend.
*/
Expand Down
4 changes: 2 additions & 2 deletions frontend/taipy-gui/src/components/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
createSetLocationsAction,
initializeWebSocket,
INITIAL_STATE,
retreiveBlockUi,
retrieveBlockUi,
taipyInitialize,
taipyReducer,
} from "../context/taipyReducers";
Expand Down Expand Up @@ -79,7 +79,7 @@ const Router = () => {
.then((result) => {
dispatch(createSetLocationsAction(result.data.locations));
setRoutes(result.data.locations);
result.data.blockUI && dispatch(createBlockAction(retreiveBlockUi()));
result.data.blockUI && dispatch(createBlockAction(retrieveBlockUi()));
})
.catch((error) => {
// Fallback router if there is any error
Expand Down
Loading
Loading