Skip to content

Fixes to ds custom editor #10257

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

Merged
merged 1 commit into from
Feb 21, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class NativeEditorProvider
return editor.load(model, panel).then(() => this.openedEditor(editor));
} catch (exc) {
// Send telemetry indicating a failure
sendTelemetryEvent(Telemetry.OpenNotebookFailure, { message: exc.message });
sendTelemetryEvent(Telemetry.OpenNotebookFailure);
}
}
public get editingDelegate(): WebviewCustomEditorEditingDelegate<unknown> | undefined {
Expand Down
2 changes: 1 addition & 1 deletion src/client/telemetry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1757,7 +1757,7 @@ export interface IEventNamePropertyMapping {
* Telemetry event fired if a failure occurs loading a notebook
* message param is the exception message string.
*/
[Telemetry.OpenNotebookFailure]: { message: string };
[Telemetry.OpenNotebookFailure]: undefined | never;
/**
* Telemetry event sent to capture total time taken for completions list to be provided by LS.
* This is used to compare against time taken by Jupyter.
Expand Down
6 changes: 3 additions & 3 deletions src/datascience-ui/native-editor/redux/reducers/execution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const cloneDeep = require('lodash/cloneDeep');
import * as uuid from 'uuid/v4';
import { CellMatcher } from '../../../../client/datascience/cellMatcher';
import { InteractiveWindowMessages } from '../../../../client/datascience/interactive-common/interactiveWindowTypes';
import { CellState } from '../../../../client/datascience/types';
import { CellState, ICell } from '../../../../client/datascience/types';
import { concatMultilineStringInput } from '../../../common';
import { createCellFrom } from '../../../common/cellFactory';
import {
Expand Down Expand Up @@ -38,7 +38,7 @@ export namespace Execution {
originalArg: NativeEditorReducerArg<any>
): IMainState {
const newVMs = [...prevState.cellVMs];
const cellsToExecute = [];
const cellsToExecute: { cell: ICell; code: string }[] = [];
for (let pos = start; pos <= end; pos += 1) {
const orig = prevState.cellVMs[pos];
const code = codes[pos - start];
Expand All @@ -56,6 +56,7 @@ export namespace Execution {
inputBlockText: code,
cell: { ...orig.cell, state: CellState.executing, data: clonedCell }
});
cellsToExecute.push({ cell: orig.cell, code });
} else {
// Update our input to be our new code
newVMs[pos] = Helpers.asCellViewModel({
Expand All @@ -64,7 +65,6 @@ export namespace Execution {
cell: { ...orig.cell, data: clonedCell }
});
}
cellsToExecute.push(clonedCell);
}
}

Expand Down