Skip to content

Commit d766e4b

Browse files
committed
Fully delete keybindingManager, since it's not doing anything anymore
1 parent d0207a5 commit d766e4b

File tree

7 files changed

+3
-66
lines changed

7 files changed

+3
-66
lines changed

packages/app/src/app/overmind/actions.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,7 @@ export const modalOpened: Action<{
9090
}
9191
};
9292

93-
export const modalClosed: Action = ({ state, effects }) => {
94-
// We just start it whenever it closes, if already started nothing happens
95-
if (state.currentModal === 'preferences') {
96-
effects.keybindingManager.start();
97-
}
98-
93+
export const modalClosed: Action = ({ state }) => {
9994
state.currentModal = null;
10095
};
10196

packages/app/src/app/overmind/effects/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export { default as api } from './api';
44
export { default as browser } from './browser';
55
export { default as connection } from './connection';
66
export { default as jsZip } from './jsZip';
7-
export { default as keybindingManager } from './keybindingManager';
87
export { default as live } from './live';
98
export { default as moduleRecover } from './moduleRecover';
109
export { default as notifications } from './notifications';

packages/app/src/app/overmind/effects/keybindingManager.ts

Lines changed: 0 additions & 40 deletions
This file was deleted.

packages/app/src/app/overmind/factories.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Contributor, PermissionType } from '@codesandbox/common/lib/types';
22
import { hasPermission } from '@codesandbox/common/lib/utils/permission';
3-
import { IDerive, IState, json } from 'overmind';
3+
import { IDerive, IState } from 'overmind';
44

55
import { AsyncAction } from '.';
66

@@ -26,10 +26,6 @@ export const withLoadApp = <T>(
2626

2727
effects.connection.addListener(actions.connectionChanged);
2828
actions.internal.setStoredSettings();
29-
effects.keybindingManager.set(
30-
json(state.preferences.settings.keybindings || []) as any
31-
);
32-
effects.keybindingManager.start();
3329
effects.codesandboxApi.listen(actions.server.onCodeSandboxAPIMessage);
3430

3531
if (state.jwt) {

packages/app/src/app/overmind/internalActions.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ export const closeModals: Action<boolean> = ({ state, effects }, isKeyDown) => {
170170
}
171171

172172
state.currentModal = null;
173-
effects.keybindingManager.start();
174173
};
175174

176175
export const setCurrentSandbox: AsyncAction<Sandbox> = async (

packages/app/src/app/overmind/namespaces/preferences/actions.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Badge } from '@codesandbox/common/lib/types';
2+
23
import { Action, AsyncAction } from 'app/overmind';
3-
import { json } from 'overmind';
44

55
export const viewModeChanged: Action<{
66
showEditor: boolean;
@@ -23,12 +23,6 @@ export const itemIdChanged: AsyncAction<{
2323
}> = async ({ state, actions, effects }, { itemId }) => {
2424
state.preferences.itemId = itemId;
2525

26-
if (itemId === 'keybindings') {
27-
effects.keybindingManager.pause();
28-
} else {
29-
effects.keybindingManager.start();
30-
}
31-
3226
if (itemId === 'integrations') {
3327
await actions.deployment.internal.getZeitUserDetails();
3428
}
@@ -128,10 +122,6 @@ export const keybindingChanged: Action<{
128122
);
129123

130124
effects.settingsStore.set('keybindings', keybindingsValue);
131-
132-
effects.keybindingManager.set(
133-
json(state.preferences.settings.keybindings) as any
134-
);
135125
};
136126

137127
export const zenModeToggled: Action = ({ state }) => {

packages/app/src/app/overmind/onInitialize.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ export const onInitialize: OnInitialize = async (
1919

2020
effects.flows.initialize(overmindInstance.reaction);
2121

22-
effects.keybindingManager.initialize();
23-
2422
effects.api.initialize({
2523
provideJwtToken,
2624
getParsedConfigurations() {

0 commit comments

Comments
 (0)