Skip to content

Commit

Permalink
[LEMS-2563] Primary widget splitter (#2234)
Browse files Browse the repository at this point in the history
## Summary:
Create a central place to pass in a PerseusItem and return a version with all the widget options split of answer data.

Mostly tests and some moving of logic. The main important thing is `splitPerseusItem`.

Issue: LEMS-2563

## Test plan:
This just adds the logic, still not using it. Just unit tests right now.

Author: handeyeco

Reviewers: handeyeco, benchristel, jeremywiebe, Myranae

Required Reviewers:

Approved By: benchristel

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

Pull Request URL: #2234
  • Loading branch information
handeyeco authored Feb 14, 2025
1 parent c565e26 commit 1ade12c
Show file tree
Hide file tree
Showing 40 changed files with 621 additions and 100 deletions.
6 changes: 6 additions & 0 deletions .changeset/sixty-balloons-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@khanacademy/perseus": major
"@khanacademy/perseus-core": minor
---

Move splitters into perseus-core, add splitPerseusItem
2 changes: 2 additions & 0 deletions packages/perseus-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ export {
upgradeWidgetInfoToLatestVersion,
} from "./widgets/upgrade";

export {default as splitPerseusItem} from "./utils/split-perseus-item";

export type * from "./widgets/logic-export.types";

export * as CoreWidgetRegistry from "./widgets/core-widget-registry";
Expand Down
Loading

0 comments on commit 1ade12c

Please sign in to comment.