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

Revert PR #1654 #1663

Merged
merged 2 commits into from
Sep 24, 2024
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: 0 additions & 5 deletions .changeset/eleven-elephants-trade.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/ten-seas-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/perseus": patch
---

Internal: revert buggy change to interactive graphs (never shipped)
4 changes: 2 additions & 2 deletions packages/perseus/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import type {Item} from "./multi-items/item-types";
import type {
Hint,
PerseusAnswerArea,
PerseusGraphType,
PerseusWidget,
PerseusWidgetsMap,
} from "./perseus-types";
import type {PerseusStrings} from "./strings";
import type {SizeClass} from "./util/sizing-utils";
import type {InteractiveGraphState} from "./widgets/interactive-graphs/types";
import type {KeypadAPI} from "@khanacademy/math-input";
import type {AnalyticsEventHandlerFn} from "@khanacademy/perseus-core";
import type {LinterContextProps} from "@khanacademy/perseus-linter";
Expand Down Expand Up @@ -90,7 +90,7 @@ export type ChangeHandler = (
// perseus-all-package/widgets/grapher.jsx
plot?: any;
// Interactive Graph callback (see legacy: interactive-graph.tsx)
graph?: PerseusGraphType;
graph?: InteractiveGraphState;
},
callback?: () => unknown | null | undefined,
silent?: boolean,
Expand Down
1 change: 1 addition & 0 deletions packages/perseus/src/widgets/interactive-graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,7 @@ class LegacyInteractiveGraph extends React.Component<Props, State> {

$(this.angle).on("move", () => {
this.onChange({
// @ts-expect-error Type '{ coords: any; type: "angle"; showAngles?: boolean | undefined; allowReflexAngles?: boolean | undefined; angleOffsetDeg?: number | undefined; snapDegrees?: number | undefined; match?: "congruent" | undefined; }' is not assignable to type 'InteractiveGraphState | undefined'.
graph: {...graph, coords: this.angle?.getClockwiseCoords()},
});
});
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading