Skip to content

Commit 1cc7775

Browse files
RichDom2185izruff
authored andcommitted
Clean up team assessments (#2875)
* Migrate Ground Control back to AG-Grid But also retained the functional component aspect. * Delete unused component * Use selectors for Ground Control state * Remove ground control from file system * Remove unnecessary styles Favors the use of Blueprint components over custom components and styles for a more consistent user interface. * Remove remaining traces of old Ground Control * Fix format * Remove team formation from workspace slice The filters never belonged there in the first place as it is not a workspace. The functionality is not restored as we will be moving back to AG Grid for tables.
1 parent 06cf2f3 commit 1cc7775

15 files changed

+185
-552
lines changed

src/commons/application/ApplicationTypes.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -405,19 +405,6 @@ export const defaultWorkspaceManager: WorkspaceManagerState = {
405405
currentQuestion: undefined,
406406
hasUnsavedChanges: false
407407
},
408-
teamFormation: {
409-
...createDefaultWorkspace('teamFormation'),
410-
teamFormationTableFilters: {
411-
columnFilters: [],
412-
globalFilter: null
413-
}
414-
},
415-
groundControl: {
416-
...createDefaultWorkspace('groundControl'),
417-
GroundControlTableFilters: {
418-
columnFilters: []
419-
}
420-
},
421408
playground: {
422409
...createDefaultWorkspace('playground'),
423410
usingSubst: false,
@@ -554,8 +541,6 @@ export const defaultSideContentManager: SideContentManagerState = {
554541
assessment: defaultSideContent,
555542
grading: defaultSideContent,
556543
playground: defaultSideContent,
557-
groundControl: defaultSideContent,
558-
teamFormation: defaultSideContent,
559544
sicp: defaultSideContent,
560545
sourcecast: defaultSideContent,
561546
sourcereel: defaultSideContent,

src/commons/workspace/WorkspaceActions.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import {
3434
EVAL_EDITOR_AND_TESTCASES,
3535
EVAL_REPL,
3636
EVAL_TESTCASE,
37-
GroundControlTableFilters,
3837
MOVE_CURSOR,
3938
NAV_DECLARATION,
4039
PLAYGROUND_EXTERNAL_SELECT,
@@ -51,7 +50,6 @@ import {
5150
SET_TOKEN_COUNT,
5251
SHIFT_EDITOR_TAB,
5352
SubmissionsTableFilters,
54-
TeamFormationsTableFilters,
5553
TOGGLE_EDITOR_AUTORUN,
5654
TOGGLE_FOLDER_MODE,
5755
TOGGLE_UPDATE_CSE,
@@ -65,15 +63,13 @@ import {
6563
UPDATE_CURRENTSTEP,
6664
UPDATE_EDITOR_BREAKPOINTS,
6765
UPDATE_EDITOR_VALUE,
68-
UPDATE_GROUND_CONTROL_TABLE_FILTERS,
6966
UPDATE_HAS_UNSAVED_CHANGES,
7067
UPDATE_LAST_DEBUGGER_RESULT,
7168
UPDATE_LAST_NON_DET_RESULT,
7269
UPDATE_REPL_VALUE,
7370
UPDATE_STEPSTOTAL,
7471
UPDATE_SUBLANGUAGE,
7572
UPDATE_SUBMISSIONS_TABLE_FILTERS,
76-
UPDATE_TEAM_FORMATIONS_TABLE_FILTERS,
7773
UPDATE_WORKSPACE,
7874
WorkspaceLocation,
7975
WorkspaceLocationsWithTools,
@@ -404,16 +400,6 @@ export const updateSubmissionsTableFilters = createAction(
404400
(filters: SubmissionsTableFilters) => ({ payload: { filters } })
405401
);
406402

407-
export const updateTeamFormationsTableFilters = createAction(
408-
UPDATE_TEAM_FORMATIONS_TABLE_FILTERS,
409-
(filters: TeamFormationsTableFilters) => ({ payload: { filters } })
410-
);
411-
412-
export const updateGroundControlTableFilters = createAction(
413-
UPDATE_GROUND_CONTROL_TABLE_FILTERS,
414-
(filters: GroundControlTableFilters) => ({ payload: { filters } })
415-
);
416-
417403
export const updateCurrentAssessmentId = createAction(
418404
UPDATE_CURRENT_ASSESSMENT_ID,
419405
(assessmentId: number, questionId: number) => ({ payload: { assessmentId, questionId } })

src/commons/workspace/WorkspaceReducer.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ import {
8989
UPDATE_STEPSTOTAL,
9090
UPDATE_SUBLANGUAGE,
9191
UPDATE_SUBMISSIONS_TABLE_FILTERS,
92-
UPDATE_TEAM_FORMATIONS_TABLE_FILTERS,
9392
UPDATE_WORKSPACE,
9493
WorkspaceLocation,
9594
WorkspaceManagerState
@@ -627,14 +626,6 @@ const oldWorkspaceReducer: Reducer<WorkspaceManagerState, SourceActionType> = (
627626
submissionsTableFilters: action.payload.filters
628627
}
629628
};
630-
case UPDATE_TEAM_FORMATIONS_TABLE_FILTERS:
631-
return {
632-
...state,
633-
teamFormation: {
634-
...state.teamFormation,
635-
teamFormationTableFilters: action.payload.filters
636-
}
637-
};
638629
case UPDATE_CURRENT_ASSESSMENT_ID:
639630
return {
640631
...state,

src/commons/workspace/WorkspaceTypes.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ export const TOGGLE_USING_SUBST = 'TOGGLE_USING_SUBST';
3939
export const TOGGLE_USING_CSE = 'TOGGLE_USING_CSE';
4040
export const TOGGLE_UPDATE_CSE = 'TOGGLE_UPDATE_CSE';
4141
export const UPDATE_SUBMISSIONS_TABLE_FILTERS = 'UPDATE_SUBMISSIONS_TABLE_FILTERS';
42-
export const UPDATE_TEAM_FORMATIONS_TABLE_FILTERS = 'UPDATE_TEAM_FORMATIONS_TABLE_FILTERS';
43-
export const UPDATE_GROUND_CONTROL_TABLE_FILTERS = 'UPDATE_GROUND_CONTROL_TABLE_FILTERS';
4442
export const UPDATE_CURRENT_ASSESSMENT_ID = 'UPDATE_CURRENT_ASSESSMENT_ID';
4543
export const UPDATE_CURRENT_SUBMISSION_ID = 'UPDATE_CURRENT_SUBMISSION_ID';
4644
export const TOGGLE_FOLDER_MODE = 'TOGGLE_FOLDER_MODE';
@@ -84,19 +82,8 @@ type GradingWorkspaceAttr = {
8482
readonly hasUnsavedChanges: boolean;
8583
};
8684

87-
type TeamFormationWorkspaceAttr = {
88-
readonly teamFormationTableFilters: TeamFormationsTableFilters;
89-
};
90-
9185
type GradingWorkspaceState = GradingWorkspaceAttr & WorkspaceState;
9286

93-
type TeamFormationWorkspaceState = TeamFormationWorkspaceAttr & WorkspaceState;
94-
95-
type GroundControlWorkspaceAttr = {
96-
readonly GroundControlTableFilters: GroundControlTableFilters;
97-
};
98-
type GroundControlWorkspaceState = GroundControlWorkspaceAttr & WorkspaceState;
99-
10087
type PlaygroundWorkspaceAttr = {
10188
readonly usingSubst: boolean;
10289
readonly usingCse: boolean;
@@ -112,8 +99,6 @@ export type SicpWorkspaceState = PlaygroundWorkspaceState;
11299
export type WorkspaceManagerState = {
113100
readonly assessment: AssessmentWorkspaceState;
114101
readonly grading: GradingWorkspaceState;
115-
readonly teamFormation: TeamFormationWorkspaceState;
116-
readonly groundControl: GroundControlWorkspaceState;
117102
readonly playground: PlaygroundWorkspaceState;
118103
readonly sourcecast: SourcecastWorkspaceState;
119104
readonly sourcereel: SourcereelWorkspaceState;
@@ -188,7 +173,3 @@ export type TeamFormationsTableFilters = {
188173
columnFilters: { id: string; value: unknown }[];
189174
globalFilter: string | null;
190175
};
191-
192-
export type GroundControlTableFilters = {
193-
columnFilters: { id: string; value: unknown }[];
194-
};

src/commons/workspace/__tests__/WorkspaceReducer.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,6 @@ function generateDefaultWorkspace(payload: any = {}): WorkspaceManagerState {
116116
stories: {
117117
...defaultWorkspaceManager.stories,
118118
...cloneDeep(payload)
119-
},
120-
teamFormation: {
121-
...defaultWorkspaceManager.teamFormation,
122-
...cloneDeep(payload)
123-
},
124-
groundControl: {
125-
...defaultWorkspaceManager.groundControl,
126-
...cloneDeep(payload)
127119
}
128120
};
129121
}

0 commit comments

Comments
 (0)