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

Removed updateCellStatus from widgets #88

Merged
merged 1 commit into from
Sep 29, 2021
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: 0 additions & 1 deletion packages/jupyter-widgets/__tests__/manager/manager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const mockRequireJS = jest.fn((modules, ready, errCB) => ready(mockFooModule));
const mockManagerActions: ManagerActions["actions"] = {
appendOutput: jest.fn(),
clearOutput: jest.fn(),
updateCellStatus: jest.fn(),
promptInputRequest: jest.fn()
};

Expand Down
12 changes: 1 addition & 11 deletions packages/jupyter-widgets/src/manager/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import {
KernelNotStartedProps,
LocalKernelProps,
RemoteKernelProps,
ContentRef,
KernelStatus
ContentRef
} from "@nteract/core";
import { CellId } from "@nteract/commutable";
import { WidgetModel } from "@jupyter-widgets/base";
Expand All @@ -27,7 +26,6 @@ export interface ManagerActions {
actions: {
appendOutput: (output: any) => void;
clearOutput: () => void;
updateCellStatus: (status: KernelStatus) => void;
promptInputRequest: (prompt: string, password: boolean) => void;
};
}
Expand Down Expand Up @@ -114,14 +112,6 @@ const mapDispatchToProps = (dispatch: any, props: OwnProps): ManagerActions => {
contentRef: props.contentRef
})
),
updateCellStatus: (status: KernelStatus) =>
dispatch(
actions.updateCellStatus({
id: props.id,
contentRef: props.contentRef,
status
})
),
promptInputRequest: (prompt: string, password: boolean) =>
dispatch(
actions.promptInputRequest({
Expand Down
9 changes: 7 additions & 2 deletions packages/jupyter-widgets/src/manager/widget-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,13 @@ export class WidgetManager extends base.ManagerBase<DOMWidgetView> {
output_type: reply.header.msg_type
}),
clear_output: (reply: JupyterMessage) => this.actions.clearOutput(),
status: (reply: JupyterMessage) =>
this.actions.updateCellStatus(reply.content.execution_state)
status: (reply: JupyterMessage) => {
/**
* Currently, we don't do anything with status messages. Previously,
* we updated the cell status, but we removed it because it was confusing
* to users and had bugs related to widgets updating the wrong cell's status
*/
}
},
input: (reply: JupyterMessage) =>
this.actions.promptInputRequest(
Expand Down