Skip to content

Commit

Permalink
Clean up team assessments (#2875)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
RichDom2185 authored and izruff committed Mar 30, 2024
1 parent 06cf2f3 commit 1cc7775
Show file tree
Hide file tree
Showing 15 changed files with 185 additions and 552 deletions.
15 changes: 0 additions & 15 deletions src/commons/application/ApplicationTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,19 +405,6 @@ export const defaultWorkspaceManager: WorkspaceManagerState = {
currentQuestion: undefined,
hasUnsavedChanges: false
},
teamFormation: {
...createDefaultWorkspace('teamFormation'),
teamFormationTableFilters: {
columnFilters: [],
globalFilter: null
}
},
groundControl: {
...createDefaultWorkspace('groundControl'),
GroundControlTableFilters: {
columnFilters: []
}
},
playground: {
...createDefaultWorkspace('playground'),
usingSubst: false,
Expand Down Expand Up @@ -554,8 +541,6 @@ export const defaultSideContentManager: SideContentManagerState = {
assessment: defaultSideContent,
grading: defaultSideContent,
playground: defaultSideContent,
groundControl: defaultSideContent,
teamFormation: defaultSideContent,
sicp: defaultSideContent,
sourcecast: defaultSideContent,
sourcereel: defaultSideContent,
Expand Down
14 changes: 0 additions & 14 deletions src/commons/workspace/WorkspaceActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import {
EVAL_EDITOR_AND_TESTCASES,
EVAL_REPL,
EVAL_TESTCASE,
GroundControlTableFilters,
MOVE_CURSOR,
NAV_DECLARATION,
PLAYGROUND_EXTERNAL_SELECT,
Expand All @@ -51,7 +50,6 @@ import {
SET_TOKEN_COUNT,
SHIFT_EDITOR_TAB,
SubmissionsTableFilters,
TeamFormationsTableFilters,
TOGGLE_EDITOR_AUTORUN,
TOGGLE_FOLDER_MODE,
TOGGLE_UPDATE_CSE,
Expand All @@ -65,15 +63,13 @@ import {
UPDATE_CURRENTSTEP,
UPDATE_EDITOR_BREAKPOINTS,
UPDATE_EDITOR_VALUE,
UPDATE_GROUND_CONTROL_TABLE_FILTERS,
UPDATE_HAS_UNSAVED_CHANGES,
UPDATE_LAST_DEBUGGER_RESULT,
UPDATE_LAST_NON_DET_RESULT,
UPDATE_REPL_VALUE,
UPDATE_STEPSTOTAL,
UPDATE_SUBLANGUAGE,
UPDATE_SUBMISSIONS_TABLE_FILTERS,
UPDATE_TEAM_FORMATIONS_TABLE_FILTERS,
UPDATE_WORKSPACE,
WorkspaceLocation,
WorkspaceLocationsWithTools,
Expand Down Expand Up @@ -404,16 +400,6 @@ export const updateSubmissionsTableFilters = createAction(
(filters: SubmissionsTableFilters) => ({ payload: { filters } })
);

export const updateTeamFormationsTableFilters = createAction(
UPDATE_TEAM_FORMATIONS_TABLE_FILTERS,
(filters: TeamFormationsTableFilters) => ({ payload: { filters } })
);

export const updateGroundControlTableFilters = createAction(
UPDATE_GROUND_CONTROL_TABLE_FILTERS,
(filters: GroundControlTableFilters) => ({ payload: { filters } })
);

export const updateCurrentAssessmentId = createAction(
UPDATE_CURRENT_ASSESSMENT_ID,
(assessmentId: number, questionId: number) => ({ payload: { assessmentId, questionId } })
Expand Down
9 changes: 0 additions & 9 deletions src/commons/workspace/WorkspaceReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ import {
UPDATE_STEPSTOTAL,
UPDATE_SUBLANGUAGE,
UPDATE_SUBMISSIONS_TABLE_FILTERS,
UPDATE_TEAM_FORMATIONS_TABLE_FILTERS,
UPDATE_WORKSPACE,
WorkspaceLocation,
WorkspaceManagerState
Expand Down Expand Up @@ -627,14 +626,6 @@ const oldWorkspaceReducer: Reducer<WorkspaceManagerState, SourceActionType> = (
submissionsTableFilters: action.payload.filters
}
};
case UPDATE_TEAM_FORMATIONS_TABLE_FILTERS:
return {
...state,
teamFormation: {
...state.teamFormation,
teamFormationTableFilters: action.payload.filters
}
};
case UPDATE_CURRENT_ASSESSMENT_ID:
return {
...state,
Expand Down
19 changes: 0 additions & 19 deletions src/commons/workspace/WorkspaceTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ export const TOGGLE_USING_SUBST = 'TOGGLE_USING_SUBST';
export const TOGGLE_USING_CSE = 'TOGGLE_USING_CSE';
export const TOGGLE_UPDATE_CSE = 'TOGGLE_UPDATE_CSE';
export const UPDATE_SUBMISSIONS_TABLE_FILTERS = 'UPDATE_SUBMISSIONS_TABLE_FILTERS';
export const UPDATE_TEAM_FORMATIONS_TABLE_FILTERS = 'UPDATE_TEAM_FORMATIONS_TABLE_FILTERS';
export const UPDATE_GROUND_CONTROL_TABLE_FILTERS = 'UPDATE_GROUND_CONTROL_TABLE_FILTERS';
export const UPDATE_CURRENT_ASSESSMENT_ID = 'UPDATE_CURRENT_ASSESSMENT_ID';
export const UPDATE_CURRENT_SUBMISSION_ID = 'UPDATE_CURRENT_SUBMISSION_ID';
export const TOGGLE_FOLDER_MODE = 'TOGGLE_FOLDER_MODE';
Expand Down Expand Up @@ -84,19 +82,8 @@ type GradingWorkspaceAttr = {
readonly hasUnsavedChanges: boolean;
};

type TeamFormationWorkspaceAttr = {
readonly teamFormationTableFilters: TeamFormationsTableFilters;
};

type GradingWorkspaceState = GradingWorkspaceAttr & WorkspaceState;

type TeamFormationWorkspaceState = TeamFormationWorkspaceAttr & WorkspaceState;

type GroundControlWorkspaceAttr = {
readonly GroundControlTableFilters: GroundControlTableFilters;
};
type GroundControlWorkspaceState = GroundControlWorkspaceAttr & WorkspaceState;

type PlaygroundWorkspaceAttr = {
readonly usingSubst: boolean;
readonly usingCse: boolean;
Expand All @@ -112,8 +99,6 @@ export type SicpWorkspaceState = PlaygroundWorkspaceState;
export type WorkspaceManagerState = {
readonly assessment: AssessmentWorkspaceState;
readonly grading: GradingWorkspaceState;
readonly teamFormation: TeamFormationWorkspaceState;
readonly groundControl: GroundControlWorkspaceState;
readonly playground: PlaygroundWorkspaceState;
readonly sourcecast: SourcecastWorkspaceState;
readonly sourcereel: SourcereelWorkspaceState;
Expand Down Expand Up @@ -188,7 +173,3 @@ export type TeamFormationsTableFilters = {
columnFilters: { id: string; value: unknown }[];
globalFilter: string | null;
};

export type GroundControlTableFilters = {
columnFilters: { id: string; value: unknown }[];
};
8 changes: 0 additions & 8 deletions src/commons/workspace/__tests__/WorkspaceReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,6 @@ function generateDefaultWorkspace(payload: any = {}): WorkspaceManagerState {
stories: {
...defaultWorkspaceManager.stories,
...cloneDeep(payload)
},
teamFormation: {
...defaultWorkspaceManager.teamFormation,
...cloneDeep(payload)
},
groundControl: {
...defaultWorkspaceManager.groundControl,
...cloneDeep(payload)
}
};
}
Expand Down
Loading

0 comments on commit 1cc7775

Please sign in to comment.