Skip to content

Commit

Permalink
Remove mock/test widgets (#1577)
Browse files Browse the repository at this point in the history
## Summary:

I don't see the point of having a bunch of test widgets when we could just use real widgets in tests.

Open to push back.

Author: handeyeco

Reviewers: jeremywiebe, handeyeco

Required Reviewers:

Approved By: jeremywiebe

Checks: ✅ Upload Coverage (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Jest Coverage (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ gerald

Pull Request URL: #1577
  • Loading branch information
handeyeco authored Sep 4, 2024
1 parent a6ec402 commit c875acd
Show file tree
Hide file tree
Showing 22 changed files with 146 additions and 847 deletions.
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
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 c875acd

Please sign in to comment.