Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused rubric type for CS Program #1997

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fifty-laws-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/perseus": patch
---

Remove unused CS Program rubric type
7 changes: 0 additions & 7 deletions packages/perseus/src/validation.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ export type PerseusCategorizerValidationData = {
items: ReadonlyArray<string>;
};

// TODO(LEMS-2440): Can possibly be removed during 2440?
// This is not used for grading at all. The only place it is used is to define
// Props type in cs-program.tsx, but RenderProps already contains WidgetOptions
// and is already included in the Props type.
export type PerseusCSProgramRubric = Empty;

export type PerseusCSProgramUserInput = {
status: UserInputStatus;
message: string | null;
Expand Down Expand Up @@ -237,7 +231,6 @@ export type PerseusTableUserInput = ReadonlyArray<ReadonlyArray<string>>;

export type Rubric =
| PerseusCategorizerScoringData
| PerseusCSProgramRubric
| PerseusDropdownRubric
| PerseusExpressionRubric
| PerseusGroupRubric
Expand Down
7 changes: 2 additions & 5 deletions packages/perseus/src/widgets/cs-program/cs-program.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,14 @@ import scoreCSProgram from "./score-cs-program";

import type {PerseusCSProgramWidgetOptions} from "../../perseus-types";
import type {Widget, WidgetExports, WidgetProps} from "../../types";
import type {
PerseusCSProgramRubric,
PerseusCSProgramUserInput,
} from "../../validation.types";
import type {PerseusCSProgramUserInput} from "../../validation.types";
import type {UnsupportedWidgetPromptJSON} from "../../widget-ai-utils/unsupported-widget";

const {updateQueryString} = Util;

type RenderProps = PerseusCSProgramWidgetOptions & PerseusCSProgramUserInput;

type Props = WidgetProps<RenderProps, PerseusCSProgramRubric>;
type Props = WidgetProps<RenderProps>;

type DefaultProps = {
showEditor: Props["showEditor"];
Expand Down
Loading