Skip to content

Commit

Permalink
Merge pull request #88 from miduncan/master
Browse files Browse the repository at this point in the history
Removed updateCellStatus from widgets
  • Loading branch information
captainsafia authored Sep 29, 2021
2 parents c40cf8e + 123a566 commit d5026fd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
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

0 comments on commit d5026fd

Please sign in to comment.