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 iFrame #1996

Merged
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/proud-ghosts-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/perseus": patch
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to just be removing an unused type, so I put it as patch, but it does touch the UserInput type and the Props type, so wasn't sure if that meant it should be minor. Leaning towards patch, but wanted to confirm :)

---

Remove unused iframe rubric type
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any changes to our main package file (index.ts) which means that this type was not exported from Perseus, so a patch release sounds right to me.

4 changes: 0 additions & 4 deletions packages/perseus/src/validation.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ export type PerseusGrapherRubric = {

export type PerseusGrapherUserInput = PerseusGrapherRubric["correct"];

// TODO(LEMS-2440): Can possibly be removed during 2440; only userInput used
export type PerseusIFrameRubric = Empty;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could removing this now cause problems down the road? I think it's pretty easy to add it back in, but not sure if we need a rubric and userInput for every widget. I'm guessing it's okay, but wanted to double check.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree to remove it now. We already have other widgets where there is no Rubric type.


export type PerseusIFrameUserInput = {
status: UserInputStatus;
message: string | null;
Expand Down Expand Up @@ -238,7 +235,6 @@ export type Rubric =
| PerseusGradedGroupRubric
| PerseusGradedGroupSetRubric
| PerseusGrapherRubric
| PerseusIFrameRubric
| PerseusInputNumberRubric
| PerseusInteractiveGraphRubric
| PerseusLabelImageRubric
Expand Down
3 changes: 1 addition & 2 deletions packages/perseus/src/widgets/iframe/iframe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {scoreIframe} from "./score-iframe";
import type {PerseusIFrameWidgetOptions} from "../../perseus-types";
import type {WidgetExports, WidgetProps, Widget} from "../../types";
import type {
PerseusIFrameRubric,
PerseusIFrameUserInput,
UserInputStatus,
} from "../../validation.types";
Expand All @@ -36,7 +35,7 @@ type RenderProps = PerseusIFrameWidgetOptions & {
height: string;
};

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

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