Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into am/lems-2306/phet-widget-sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
aemandine committed Sep 4, 2024
2 parents 3c6a6f5 + c875acd commit 636c2fd
Show file tree
Hide file tree
Showing 215 changed files with 655 additions and 1,299 deletions.
7 changes: 7 additions & 0 deletions .changeset/light-poems-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@khanacademy/perseus-dev-ui": patch
"@khanacademy/perseus": patch
"@khanacademy/perseus-editor": patch
---

Reorganize files in the widgets folder
6 changes: 6 additions & 0 deletions .changeset/plenty-crews-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@khanacademy/perseus": major
"@khanacademy/perseus-editor": major
---

Remove example widgets and their editors
4 changes: 2 additions & 2 deletions dev/gallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import {useEffect, useMemo, useState} from "react";
import {Renderer} from "../packages/perseus/src";
import {mockStrings} from "../packages/perseus/src/strings";
import {MafsGraphTypeFlags} from "../packages/perseus/src/types";
import * as grapher from "../packages/perseus/src/widgets/__testdata__/grapher.testdata";
import * as interactiveGraph from "../packages/perseus/src/widgets/__testdata__/interactive-graph.testdata";
import * as numberLine from "../packages/perseus/src/widgets/__testdata__/number-line.testdata";
import * as grapher from "../packages/perseus/src/widgets/grapher/grapher.testdata";
import * as numberLine from "../packages/perseus/src/widgets/number-line/number-line.testdata";

import {Header} from "./header";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {useState} from "react";

import {articleWithImages} from "../../../perseus/src/__testdata__/article-renderer.testdata";
import {mockStrings} from "../../../perseus/src/strings";
import {question} from "../../../perseus/src/widgets/__testdata__/radio.testdata";
import {question} from "../../../perseus/src/widgets/radio/__tests__/radio.testdata";
import DeviceFramer from "../components/device-framer";
import ViewportResizer from "../components/viewport-resizer";
import ContentPreview from "../content-preview";
Expand Down
6 changes: 0 additions & 6 deletions packages/perseus-editor/src/all-editors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import CSProgramEditor from "./widgets/cs-program-editor";
import DefinitionEditor from "./widgets/definition-editor";
import DeprecatedStandinEditor from "./widgets/deprecated-standin-editor";
import DropdownEditor from "./widgets/dropdown-editor";
import ExampleGraphieWidgetEditor from "./widgets/example-graphie-widget-editor";
import ExampleWidgetEditor from "./widgets/example-widget-editor";
import ExplanationEditor from "./widgets/explanation-editor";
import ExpressionEditor from "./widgets/expression-editor";
import GradedGroupEditor from "./widgets/graded-group-editor";
Expand All @@ -31,7 +29,6 @@ import PhetSimulationEditor from "./widgets/phet-simulation-editor";
import PlotterEditor from "./widgets/plotter-editor";
import PythonProgramEditor from "./widgets/python-program-editor";
import RadioEditor from "./widgets/radio/editor";
import SimpleMarkdownTesterEditor from "./widgets/simple-markdown-tester-editor";
import SorterEditor from "./widgets/sorter-editor";
import TableEditor from "./widgets/table-editor";
import VideoEditor from "./widgets/video-editor";
Expand All @@ -41,8 +38,6 @@ export default [
CSProgramEditor,
DefinitionEditor,
DropdownEditor,
ExampleGraphieWidgetEditor,
ExampleWidgetEditor,
ExplanationEditor,
ExpressionEditor,
GradedGroupEditor,
Expand All @@ -68,7 +63,6 @@ export default [
PhetSimulationEditor,
PlotterEditor,
PythonProgramEditor,
SimpleMarkdownTesterEditor,
SorterEditor,
TableEditor,
VideoEditor,
Expand Down
7 changes: 0 additions & 7 deletions packages/perseus-editor/src/all-widgets.ts

This file was deleted.

7 changes: 3 additions & 4 deletions packages/perseus-editor/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ export {default as StatefulEditorPage} from "./stateful-editor-page";
import "./styles/perseus-editor.less";

// eslint-disable-next-line import/order
import {Widgets} from "@khanacademy/perseus";
import {Widgets, widgets} from "@khanacademy/perseus";
import AllEditors from "./all-editors";
import AllWidgets from "./all-widgets";

Widgets.registerEditors(AllEditors);
Widgets.registerWidgets(AllWidgets);
Widgets.registerWidgets(widgets);

Widgets.replaceDeprecatedWidgets();
Widgets.replaceDeprecatedEditors();

export {AllEditors, AllWidgets};
export {AllEditors, widgets};
11 changes: 0 additions & 11 deletions packages/perseus-editor/src/testing-widgets.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
* in order for them to work. Requiring this file will register all of the
* widgets and editors.
*/
import {Widgets} from "@khanacademy/perseus";
import {Widgets, widgets} from "@khanacademy/perseus";

import allEditors from "../all-editors";
import allWidgets from "../all-widgets";

export const registerAllWidgetsAndEditorsForTesting = () => {
Widgets.registerWidgets(allWidgets);
Widgets.registerWidgets(widgets);
Widgets.registerEditors(allEditors);

Widgets.replaceDeprecatedWidgets();
Expand Down

This file was deleted.

176 changes: 0 additions & 176 deletions packages/perseus-editor/src/widgets/example-graphie-widget.tsx

This file was deleted.

Loading

0 comments on commit 636c2fd

Please sign in to comment.