Skip to content

Commit c2aa193

Browse files
committed
Initial fix after rebasing
1 parent e8795fd commit c2aa193

File tree

9 files changed

+10
-26
lines changed

9 files changed

+10
-26
lines changed

src/commons/application/ApplicationTypes.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,7 @@ export const createDefaultWorkspace = (workspaceLocation: WorkspaceLocation): Wo
366366
: undefined,
367367
value: ['playground', 'sourcecast'].includes(workspaceLocation) ? defaultEditorValue : '',
368368
highlightedLines: [],
369-
breakpoints: [],
370-
githubSaveInfo: { repoName:'', filePath:''}
369+
breakpoints: []
371370
}
372371
],
373372
programPrependValue: '',
@@ -435,8 +434,7 @@ export const defaultWorkspaceManager: WorkspaceManagerState = {
435434
filePath: getDefaultFilePath('playground'),
436435
value: defaultEditorValue,
437436
highlightedLines: [],
438-
breakpoints: [],
439-
githubSaveInfo: {repoName:'', filePath:''}
437+
breakpoints: []
440438
}
441439
]
442440
},
@@ -490,8 +488,7 @@ export const defaultWorkspaceManager: WorkspaceManagerState = {
490488
filePath: getDefaultFilePath('sicp'),
491489
value: defaultEditorValue,
492490
highlightedLines: [],
493-
breakpoints: [],
494-
githubSaveInfo: {repoName:'', filePath:''}
491+
breakpoints: []
495492
}
496493
]
497494
},

src/commons/editingWorkspace/EditingWorkspace.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,7 @@ const EditingWorkspace: React.FC<EditingWorkspaceProps> = props => {
321321
{
322322
value: editorValue,
323323
highlightedLines: [],
324-
breakpoints: [],
325-
githubSaveInfo: {repoName: '', filePath: ''}
324+
breakpoints: []
326325
}
327326
],
328327
programPrependValue,

src/commons/fileSystem/FileSystemReducer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const FileSystemReducer: Reducer<FileSystemState, SourceActionType> = cre
4141
state.githubSaveInfoArray = [];
4242
})
4343
.addCase(addPersistenceFile, (state, action) => {
44-
const persistenceFilePayload = action.payload.persistenceFile;
44+
const persistenceFilePayload = action.payload;
4545
const persistenceFileArray = state['persistenceFileArray'];
4646
const persistenceFileIndex = persistenceFileArray.findIndex(e => e.id === persistenceFilePayload.id);
4747
if (persistenceFileIndex === -1) {
@@ -52,7 +52,7 @@ export const FileSystemReducer: Reducer<FileSystemState, SourceActionType> = cre
5252
state.persistenceFileArray = persistenceFileArray;
5353
})
5454
.addCase(deletePersistenceFile, (state, action) => {
55-
const newPersistenceFileArray = state['persistenceFileArray'].filter(e => e.id !== action.payload.persistenceFile.id);
55+
const newPersistenceFileArray = state['persistenceFileArray'].filter(e => e.id !== action.payload.id);
5656
state.persistenceFileArray = newPersistenceFileArray;
5757
})
5858
.addCase(deleteAllPersistenceFiles, (state, action) => {

src/commons/fileSystemView/FileSystemViewFileNode.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { useDispatch, useStore } from 'react-redux';
77
import classes from 'src/styles/FileSystemView.module.scss';
88

99
import { OverallState } from '../application/ApplicationTypes';
10-
import { actions } from '../utils/ActionsHelper';
1110
import { showSimpleConfirmDialog } from '../utils/DialogHelper';
1211
import { addEditorTab, removeEditorTabForFile } from '../workspace/WorkspaceActions';
1312
import { WorkspaceLocation } from '../workspace/WorkspaceTypes';
@@ -53,13 +52,6 @@ const FileSystemViewFileNode: React.FC<Props> = ({
5352
const editorFilePath = store.getState().workspaces['playground'].editorTabs[idx].filePath || '';
5453
console.log(repoName);
5554
console.log(editorFilePath);
56-
store.dispatch(actions.updateEditorGithubSaveInfo(
57-
'playground',
58-
idx,
59-
repoName,
60-
editorFilePath,
61-
new Date()
62-
));
6355
console.log(store.getState().workspaces['playground'].editorTabs);
6456
});
6557
};

src/commons/sagas/WorkspaceSaga/helpers/evalEditor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { EventType } from '../../../../features/achievement/AchievementTypes';
55
import { DeviceSession } from '../../../../features/remoteExecution/RemoteExecutionTypes';
66
import { WORKSPACE_BASE_PATHS } from '../../../../pages/fileSystem/createInBrowserFileSystem';
77
import { OverallState } from '../../../application/ApplicationTypes';
8-
import { retrieveFilesInWorkspaceAsRecord } from '../../../fileSystem/utils';
8+
import { retrieveFilesInWorkspaceAsRecord } from '../../../fileSystem/FileSystemUtils';
99
import { actions } from '../../../utils/ActionsHelper';
1010
import { makeElevatedContext } from '../../../utils/JsSlangHelper';
1111
import {

src/commons/sagas/WorkspaceSaga/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
} from '../../application/types/InterpreterTypes';
2525
import { Library, Testcase } from '../../assessment/AssessmentTypes';
2626
import { Documentation } from '../../documentation/Documentation';
27-
import { writeFileRecursively } from '../../fileSystem/utils';
27+
import { writeFileRecursively } from '../../fileSystem/FileSystemUtils';
2828
import { resetSideContent } from '../../sideContent/SideContentActions';
2929
import { actions } from '../../utils/ActionsHelper';
3030
import {

src/commons/workspace/WorkspaceActions.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ import {
6363
UPDATE_CURRENT_SUBMISSION_ID,
6464
UPDATE_CURRENTSTEP,
6565
UPDATE_EDITOR_BREAKPOINTS,
66-
UPDATE_EDITOR_GITHUB_SAVE_INFO,
6766
UPDATE_EDITOR_VALUE,
6867
UPDATE_HAS_UNSAVED_CHANGES,
6968
UPDATE_LAST_DEBUGGER_RESULT,

src/commons/workspace/WorkspaceReducer.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ import {
8282
UPDATE_CURRENT_SUBMISSION_ID,
8383
UPDATE_CURRENTSTEP,
8484
UPDATE_EDITOR_BREAKPOINTS,
85-
UPDATE_EDITOR_GITHUB_SAVE_INFO,
8685
UPDATE_EDITOR_VALUE,
8786
UPDATE_HAS_UNSAVED_CHANGES,
8887
UPDATE_LAST_DEBUGGER_RESULT,
@@ -837,8 +836,7 @@ const oldWorkspaceReducer: Reducer<WorkspaceManagerState, SourceActionType> = (
837836
filePath,
838837
value: editorValue,
839838
highlightedLines: [],
840-
breakpoints: [],
841-
githubSaveInfo: {repoName: '', filePath: ''}
839+
breakpoints: []
842840
};
843841
const newEditorTabs: EditorTabState[] = [
844842
...state[workspaceLocation].editorTabs,

src/pages/academy/grading/subcomponents/GradingWorkspace.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,7 @@ const GradingWorkspace: React.FC<Props> = props => {
273273
{
274274
value: editorValue,
275275
highlightedLines: [],
276-
breakpoints: [],
277-
githubSaveInfo: {repoName: '', filePath: ''}
276+
breakpoints: []
278277
}
279278
],
280279
programPrependValue,

0 commit comments

Comments
 (0)