Skip to content

Feature branch pull-request from benc/widget-props-redesign to main - #3872

Open
benchristel wants to merge 43 commits into
mainfrom
benc/widget-props-redesign
Open

Feature branch pull-request from benc/widget-props-redesign to main#3872
benchristel wants to merge 43 commits into
mainfrom
benc/widget-props-redesign

Conversation

@benchristel

Copy link
Copy Markdown
Member

Summary:

This PR includes the following commits:

Issue: LEMS-4354

Test plan:

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Size Change: +301 B (+0.06%)

Total Size: 519 kB

📦 View Changed
Filename Size Change
packages/perseus-editor/dist/es/index.js 106 kB +137 B (+0.13%)
packages/perseus/dist/es/index.js 203 kB +164 B (+0.08%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 20.6 kB
packages/keypad-context/dist/es/index.js 1 kB
packages/kmath/dist/es/index.js 6.31 kB
packages/math-input/dist/es/index.js 98.6 kB
packages/math-input/dist/es/strings.js 1.63 kB
packages/perseus-core/dist/es/index.item-splitting.js 13.1 kB
packages/perseus-core/dist/es/index.js 28.2 kB
packages/perseus-linter/dist/es/index.js 10.1 kB
packages/perseus-score/dist/es/index.js 9.86 kB
packages/perseus-utils/dist/es/index.js 403 B
packages/perseus/dist/es/strings.js 12.9 kB
packages/pure-markdown/dist/es/index.js 1.39 kB
packages/simple-markdown/dist/es/index.js 6.12 kB

compressed-size-action

@benchristel
benchristel force-pushed the benc/widget-props-redesign branch from d8dcc92 to f46d7d7 Compare July 9, 2026 17:38
@github-actions github-actions Bot added item-splitting-change schema-change Attached to PRs when we detect Perseus Schema changes in it and removed item-splitting-change schema-change Attached to PRs when we detect Perseus Schema changes in it labels Jul 10, 2026
@benchristel
benchristel force-pushed the benc/widget-props-redesign branch 3 times, most recently from 7b96190 to fd7c324 Compare July 16, 2026 15:57
@benchristel
benchristel force-pushed the benc/widget-props-redesign branch 3 times, most recently from e802d7c to e7f990a Compare July 28, 2026 21:41
@benchristel
benchristel force-pushed the benc/widget-props-redesign branch 4 times, most recently from dc64de6 to e709689 Compare August 5, 2026 22:20
@benchristel
benchristel force-pushed the benc/widget-props-redesign branch 5 times, most recently from 3a7f0dc to ca1d652 Compare August 13, 2026 16:48
@benchristel
benchristel marked this pull request as ready for review August 13, 2026 23:07
This continues the work started in #3869.

Issue: LEMS-4354

- `pnpm storybook`
- You should be able to add and edit a CS Program widget in
  http://localhost:6006/?path=/docs/editors-editorpage--docs
- Test with and without the `perseus-renderer-upgrade` feature flag on.

Author: benchristel

Reviewers: benchristel, handeyeco

Required Reviewers:

Approved By: handeyeco

Checks: ⏭️  2 checks have been skipped, ✅ 11 checks were successful

Pull Request URL: #3961
## Summary:
This continues the work started in #3869.

Issue: LEMS-4354

## Test plan:

- `pnpm storybook`
- You should be able to add and edit a Python Program widget in
  http://localhost:6006/?path=/docs/editors-editorpage--docs
- Test with and without the `perseus-renderer-upgrade` feature flag on.

Author: benchristel

Reviewers: handeyeco, benchristel

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #3962
## Summary:

The defaults were never used. The parser ensures all options are set.

Issue: none

## Test plan:

You should be able to create, edit, and preview an interaction widget in
http://localhost:6006/?path=/docs/editors-editorpage--docs

Author: benchristel

Reviewers: handeyeco

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #3963
This continues the work started in #3869.

Issue: LEMS-4354

- `pnpm storybook`
- You should be able to add and edit an Interaction widget in
  http://localhost:6006/?path=/docs/editors-editorpage--docs
- Test with and without the `perseus-renderer-upgrade` feature flag on.

Author: benchristel

Reviewers: handeyeco

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #3964
This continues the work started in #3869.

Issue: LEMS-4354

- `pnpm storybook`
- You should be able to add and edit a Numeric Input widget in
  http://localhost:6006/?path=/docs/editors-editorpage--docs
- Test with and without the `perseus-renderer-upgrade` feature flag on.

Author: benchristel

Reviewers: benchristel, handeyeco

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #3970
## Summary:
There's an ongoing series of PRs to pass all the `options` of each widget as a
single prop. This redesign required a change to the `WidgetContainer`. The redesign
is being done on a long-lived feature branch, `benc/widget-props-redesign`.

`widget-container.new.tsx` was recently introduced to allow inline widgets to
be rendered inside a span instead of a div. This component needs to be updated for the
new widget props design.

This PR will be landed on `benc/widget-props-redesign`, not `main`.

Issue: LEMS-4354

## Test plan:

Widgets should render correctly on this branch with the
`perseus-renderer-upgrade` feature flag turned on (test in Storybook).

Author: benchristel

Reviewers: handeyeco, benchristel, mark-fitzgerald

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 11 checks were successful, ⏭️  2 checks have been skipped

Pull Request URL: #3985
## Summary:
This continues the work started in #3869.

Issue: LEMS-4354

## Test plan:

- `pnpm storybook`
- You should be able to add and edit a Categorizer widget in
  http://localhost:6006/?path=/docs/editors-editorpage--docs
- Test with and without the `perseus-renderer-upgrade` feature flag on.

Author: benchristel

Reviewers: handeyeco

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #3987
## Summary:
This PR is just steering the rest of the WidgetPropsV2 migration based on what
we've learned so far.

Issue: LEMS-4354

## Test plan:

CI checks should pass.

Author: benchristel

Reviewers: benchristel, handeyeco

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #3988
## Summary:
This continues the work started in #3869.

Issue: LEMS-4354

## Test plan:

- `pnpm storybook`
- You should be able to add and edit a Matcher widget in
  http://localhost:6006/?path=/docs/editors-editorpage--docs
- Test with and without the `perseus-renderer-upgrade` feature flag on.

Author: benchristel

Reviewers: handeyeco

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #3989
This continues the work started in #3869.

Issue: LEMS-4354

- `pnpm storybook`
- You should be able to add and edit a Matrix widget in
  http://localhost:6006/?path=/docs/editors-editorpage--docs
- Test with and without the `perseus-renderer-upgrade` feature flag on.

Author: benchristel

Reviewers: handeyeco, benchristel

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #3990
This continues the work started in #3869.

Issue: LEMS-4354

- `pnpm storybook`
- You should be able to add and edit a Grapher widget in
  http://localhost:6006/?path=/docs/editors-editorpage--docs
- Test with and without the `perseus-renderer-upgrade` feature flag on.

Author: benchristel

Reviewers: handeyeco, benchristel

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #3994
## Summary:
This continues the work started in #3869.

Issue: LEMS-4354

## Test plan:

- `pnpm storybook`
- You should be able to add and edit a Table widget in
  http://localhost:6006/?path=/docs/editors-editorpage--docs
- Test with and without the `perseus-renderer-upgrade` feature flag on.

Author: benchristel

Reviewers: handeyeco, benchristel

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #4003
## Summary:
This continues the work started in #3869.

Issue: LEMS-4354

## Test plan:

- `pnpm storybook`
- You should be able to add and edit an Expression widget in
  http://localhost:6006/?path=/docs/editors-editorpage--docs
- Test with and without the `perseus-renderer-upgrade` feature flag on.

Author: benchristel

Reviewers: benchristel, handeyeco

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #4017
## Summary:
This continues the work started in #3869.

Issue: LEMS-4354

## Test plan:

- `pnpm storybook`
- You should be able to add and edit a Label Image widget in
  http://localhost:6006/?path=/docs/editors-editorpage--docs
- Test with and without the `perseus-renderer-upgrade` feature flag on.

Author: benchristel

Reviewers: handeyeco, benchristel, nishasy, ivyolamit, Myranae, catandthemachines

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #4018
## Summary:
This continues the work started in #3869.

Issue: LEMS-4354

## Test plan:

- `pnpm storybook`
- You should be able to add and edit an Interactive Graph widget in
  http://localhost:6006/?path=/docs/editors-editorpage--docs
- Test with and without the `perseus-renderer-upgrade` feature flag on.

Author: benchristel

Reviewers: handeyeco

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #4034
## Summary:
This continues the work started in #3869.

Issue: LEMS-4354

## Test plan:

- `pnpm storybook`
- You should be able to add and edit a Group widget in
  http://localhost:6006/?path=/docs/editors-editorpage--docs
- Test with and without the `perseus-renderer-upgrade` feature flag on.

Author: benchristel

Reviewers: handeyeco

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 11 checks were successful, ⏭️  2 checks have been skipped

Pull Request URL: #4041
## Summary:
This continues the work started in #3869.

Issue: LEMS-4354

## Test plan:

- `pnpm storybook`
- You should be able to add and edit a Graded Group Set widget in
  http://localhost:6006/?path=/docs/editors-editorpage--docs
- Test with and without the `perseus-renderer-upgrade` feature flag on.

Author: benchristel

Reviewers: handeyeco

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #4043
## Summary:
This continues the work started in #3869.

Issue: LEMS-4354

## Test plan:

- `pnpm storybook`
- You should be able to add and edit a Graded Group widget in
  http://localhost:6006/?path=/docs/editors-editorpage--docs
- Test with and without the `perseus-renderer-upgrade` feature flag on.

Author: benchristel

Reviewers: handeyeco, benchristel

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #4042
This continues the work started in #3869.

Issue: LEMS-4354

- `pnpm storybook`
- You should be able to add and edit an Orderer widget in
  http://localhost:6006/?path=/docs/editors-editorpage--docs
- Test with and without the `perseus-renderer-upgrade` feature flag on.

Author: benchristel

Reviewers: handeyeco

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #4044
## Summary:
This continues the work started in #3869.

Issue: LEMS-4354

## Test plan:

CI checks should pass (MockWidget isn't used outside tests).

Author: benchristel

Reviewers: benchristel, handeyeco

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #4046
…PropsV2 (#4047)

## Summary:

This continues the work started in #3869.

Issue: LEMS-4354

## Test plan:

- `pnpm storybook`
- You should be able to add and edit a Number Line widget in
  http://localhost:6006/?path=/docs/editors-editorpage--docs
- Test with and without the `perseus-renderer-upgrade` feature flag on.

Author: benchristel

Reviewers: handeyeco, benchristel

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #4047
…via WidgetProps (#4063)

## Summary:
This cleans up some weirdness that `fixie` tripped over while doing cleanup
work for the linked ticket (grouping widget options into an `options` prop).

Issue: LEMS-4354

## Test plan:

Edit a widget in the EditorPage stories. Linting should work (linter errors
should appear as orange dots in the right margin) and old-style Grapher widgets
(e.g. Quadratic) should have fewer tick marks in the mobile preview vs.
desktop.

Author: benchristel

Reviewers: jeremywiebe, nishasy, handeyeco, Myranae

Required Reviewers:

Approved By: jeremywiebe

Checks: ✅ 10 checks were successful

Pull Request URL: #4063
## Summary:
`MIGRATED_WIDGETS` and the condition that checked it have been removed. All
widget options are now grouped under an `options` prop.

Issue: LEMS-4354

## Test plan:

CI checks should pass. Blank widgets should render in Storybook.

Author: benchristel

Reviewers: Myranae, benchristel, handeyeco, jeremywiebe, nishasy

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 11 checks were successful, ⏭️  2 checks have been skipped

Pull Request URL: #4074
## Summary:
This is the final stage of work for the linked ticket. We're switching over to
WidgetPropsV2 everywhere, in preparation for removing the old WidgetProps.

Issue: LEMS-4354

## Test plan:

CI checks should pass.

Author: benchristel

Reviewers: benchristel, handeyeco, jeremywiebe, nishasy, Myranae

Required Reviewers:

Approved By: handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #4075
## Summary:
This is the penultimate change to close out the widget props migration. All
widgets now accept their `options` as a separate prop, so the old `WidgetProps`
is no longer used. This PR deletes the old `WidgetProps` and renames
`WidgetPropsV2` to `WidgetProps`. We also inline `UniversalWidgetProps` into
`WidgetProps` since it doesn't need to be a separate type anymore.

Issue: LEMS-4354

## Test plan:

CI checks should pass.

Author: benchristel

Reviewers: jeremywiebe, nishasy, handeyeco, ivyolamit, Myranae, catandthemachines

Required Reviewers:

Approved By: jeremywiebe

Checks: ✅ 10 checks were successful

Pull Request URL: #4076
## Summary:
This PR does final cleanup for the WidgetProps migration.

- Making the Numeric Input's `labelText` required is out of scope for this migration.
- The `dependencies` prop that some widgets receive is passed via a HOC, not via the
  Renderer/WidgetContainer. Therefore, it shouldn't be part of `WidgetProps`.

Issue: LEMS-4354

## Test plan:

CI checks should pass.

Author: benchristel

Reviewers: benchristel, jeremywiebe, handeyeco, nishasy, ivyolamit, Myranae, catandthemachines

Required Reviewers:

Approved By: jeremywiebe, handeyeco

Checks: ✅ 10 checks were successful

Pull Request URL: #4077
@benchristel
benchristel force-pushed the benc/widget-props-redesign branch from b2716bf to ea83437 Compare August 13, 2026 23:11
@benchristel

Copy link
Copy Markdown
Member Author

/snapshot

@github-actions

Copy link
Copy Markdown
Contributor

npm Snapshot: Published

Good news!! We've packaged up the latest commit from this PR (359f674) and published it to npm. You
can install it using the tag PR3872.

Example:

pnpm add @khanacademy/perseus@PR3872

If you are working in Khan Academy's frontend, you can run the below command.

./dev/tools/bump_perseus_version.ts -t PR3872

If you are working in Khan Academy's webapp, you can run the below command.

./dev/tools/bump_perseus_version.js -t PR3872

Want another snapshot? Comment /snapshot again.

@benchristel

benchristel commented Aug 13, 2026

Copy link
Copy Markdown
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant