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

Remove the settings editor bug icon and always display the error inspector #6653

Merged
merged 2 commits into from Jun 20, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions packages/settingeditor-extension/schema/plugin.json
Expand Up @@ -2,11 +2,6 @@
"title": "Setting Editor",
"description": "Setting editor settings.",
"jupyter.lab.shortcuts": [
{
"command": "settingeditor:debug",
"keys": ["Accel I"],
"selector": ".jp-SettingEditor"
},
{
"command": "settingeditor:open",
"keys": ["Accel ,"],
Expand Down
12 changes: 0 additions & 12 deletions packages/settingeditor-extension/src/index.ts
Expand Up @@ -30,8 +30,6 @@ import {
* The command IDs used by the setting editor.
*/
namespace CommandIDs {
export const debug = 'settingeditor:debug';

export const open = 'settingeditor:open';

export const revert = 'settingeditor:revert';
Expand Down Expand Up @@ -85,15 +83,6 @@ function activate(
name: widget => namespace
});

commands.addCommand(CommandIDs.debug, {
execute: () => {
tracker.currentWidget.content.toggleDebug();
},
iconClass: 'jp-MaterialIcon jp-BugIcon',
label: 'Debug User Settings In Inspector',
isToggled: () => tracker.currentWidget.content.isDebugVisible
});

commands.addCommand(CommandIDs.open, {
execute: () => {
if (tracker.currentWidget) {
Expand All @@ -107,7 +96,6 @@ function activate(
editor = new SettingEditor({
commands: {
registry: commands,
debug: CommandIDs.debug,
revert: CommandIDs.revert,
save: CommandIDs.save
},
Expand Down
5 changes: 0 additions & 5 deletions packages/settingeditor/src/plugineditor.ts
Expand Up @@ -201,11 +201,6 @@ export namespace PluginEditor {
*/
registry: CommandRegistry;

/**
* The debug command ID.
*/
debug: string;

/**
* The revert command ID.
*/
Expand Down
36 changes: 3 additions & 33 deletions packages/settingeditor/src/raweditor.ts
Expand Up @@ -121,13 +121,6 @@ export class RawEditor extends SplitPanel {
return this._commandsChanged;
}

/**
* Whether the debug panel is visible.
*/
get isDebugVisible(): boolean {
return this._inspector.isVisible;
}

/**
* Tests whether the settings have been modified and need saving.
*/
Expand Down Expand Up @@ -234,20 +227,6 @@ export class RawEditor extends SplitPanel {
});
}

/**
* Toggle the debug functionality.
*/
toggleDebug(): void {
const inspector = this._inspector;

if (inspector.isHidden) {
inspector.show();
} else {
inspector.hide();
}
this._updateToolbar();
}

/**
* Handle `after-attach` messages.
*/
Expand Down Expand Up @@ -313,11 +292,7 @@ export class RawEditor extends SplitPanel {

this._canRevert = revert;
this._canSave = save;
this._commandsChanged.emit([
commands.debug,
commands.revert,
commands.save
]);
this._commandsChanged.emit([commands.revert, commands.save]);
}

private _canRevert = false;
Expand Down Expand Up @@ -345,11 +320,6 @@ export namespace RawEditor {
*/
registry: CommandRegistry;

/**
* The debug command ID.
*/
debug: string;

/**
* The revert command ID.
*/
Expand Down Expand Up @@ -420,14 +390,14 @@ namespace Private {
commands: RawEditor.ICommandBundle,
toolbar: Toolbar<Widget>
): void {
const { debug, registry, revert, save } = commands;
const { registry, revert, save } = commands;

toolbar.addItem('spacer', Toolbar.createSpacerItem());

// Note the button order. The rationale here is that no matter what state
// the toolbar is in, the relative location of the revert button in the
// toolbar remains the same.
[revert, debug, save].forEach(name => {
[revert, save].forEach(name => {
const item = new CommandToolbarButton({ commands: registry, id: name });
toolbar.addItem(name, item);
});
Expand Down
19 changes: 0 additions & 19 deletions packages/settingeditor/src/settingeditor.tsx
Expand Up @@ -130,13 +130,6 @@ export class SettingEditor extends Widget {
return this._editor.raw.commandsChanged;
}

/**
* Whether the debug panel is visible.
*/
get isDebugVisible(): boolean {
return this._editor.raw.isDebugVisible;
}

/**
* The currently loaded settings.
*/
Expand Down Expand Up @@ -180,13 +173,6 @@ export class SettingEditor extends Widget {
return this._editor.raw.save();
}

/**
* Toggle the debug functionality.
*/
toggleDebug(): void {
this._editor.raw.toggleDebug();
}

/**
* Handle `'after-attach'` messages.
*/
Expand Down Expand Up @@ -366,11 +352,6 @@ export namespace SettingEditor {
*/
registry: CommandRegistry;

/**
* The debug command ID.
*/
debug: string;

/**
* The revert command ID.
*/
Expand Down