Skip to content

Commit e95a931

Browse files
Adam Erbsvc-squareup-copybara
authored andcommitted
Remove some conflicting keyboard shortcuts and trigger
autocomplete for enums GitOrigin-RevId: e7feda51a3eefe67cbcbed0953425f6aec0a0305
1 parent d802105 commit e95a931

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

misk-admin/web-actions/src/web-actions/completion/CompletionProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default class CompletionProvider {
7777
currIndex - completion.cursorOffset - 1,
7878
);
7979
editor.moveCursorTo(moveCursorTo.row, moveCursorTo.column);
80-
if (type.isObject()) {
80+
if (type.isObject() || type.isEnum()) {
8181
editor.triggerCompletionDialog();
8282
}
8383
},

misk-admin/web-actions/src/web-actions/ui/ReadOnlyViewer.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ export default class ReadOnlyEditor extends React.Component<Props> {
2929
highlightGutterLine: false,
3030
});
3131
const editor = this.editor!;
32+
33+
editor.commands.removeCommand('showSettingsMenu');
34+
editor.commands.removeCommand('gotoline');
35+
3236
editor.setReadOnly(true);
3337
editor.resize();
3438
}

misk-admin/web-actions/src/web-actions/ui/RequestEditor.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ export default class RequestEditor extends React.Component<Props, State> {
5252
editor.session.setTabSize(2);
5353
editor.completers = [this.completer];
5454

55+
editor.commands.removeCommand('showSettingsMenu');
56+
editor.commands.removeCommand('gotoline');
57+
5558
editor.resize();
5659
}
5760

0 commit comments

Comments
 (0)