Skip to content

[Static:Perseus] Remove static from WidgetOptions - #4072

Open
handeyeco wants to merge 5 commits into
mainfrom
remove-widget-options-static
Open

[Static:Perseus] Remove static from WidgetOptions#4072
handeyeco wants to merge 5 commits into
mainfrom
remove-widget-options-static

Conversation

@handeyeco

@handeyeco handeyeco commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary:

The Go parser part of this was released: https://github.com/Khan/webapp/pull/41461

See the ticket for more details, but the tl;dr:

  1. We think static in Perseus*WidgetOptions was the result of poor serialization
  2. Either way, we think the static in WidgetOptions shadows static in Perseus*WidgetOptions

Issue: LEMS-4476

@handeyeco handeyeco self-assigned this Aug 13, 2026
@handeyeco handeyeco changed the title remove static from WidgetOptions Remove static from WidgetOptions Aug 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

npm Snapshot

Want to try this PR's changes before it merges? Comment /snapshot below and we'll publish an npm snapshot you can install right away.

@handeyeco handeyeco changed the title Remove static from WidgetOptions Remove static from WidgetOptions Aug 13, 2026
@github-actions github-actions Bot added item-splitting-change schema-change Attached to PRs when we detect Perseus Schema changes in it labels Aug 13, 2026
@handeyeco handeyeco added schema-change-ack Acknowledges that this PR's data-schema change has been reviewed by Content Platform item-splitting-change-ack Acknowledges that this PR's item-splitting bundle change has been reviewed labels Aug 13, 2026
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Size Change: -74 B (-0.01%)

Total Size: 519 kB

📦 View Changed
Filename Size Change
packages/perseus-core/dist/es/index.item-splitting.js 13.1 kB -20 B (-0.15%)
packages/perseus-core/dist/es/index.js 28.2 kB -39 B (-0.14%)
packages/perseus-editor/dist/es/index.js 106 kB -11 B (-0.01%)
packages/perseus/dist/es/index.js 203 kB -4 B (0%)
ℹ️ 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-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

…`Perseus*WidgetOptions` since it was shadowed by `static` in `WidgetOptions` (the higher-level type). This has some large implications: types in `perseus-core` have changed and serialization in `perseus-editor` and `perseus` are also likely to change.
trackInteraction,
handleUserInput,
} = props;
const isStatic = props.static ?? false;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was some weirdness with undefined and null (destructuring defaults undefined but not null)

@handeyeco
handeyeco marked this pull request as ready for review August 13, 2026 15:54
@handeyeco
handeyeco requested review from a team and jeremywiebe August 13, 2026 15:54

@jeremywiebe jeremywiebe left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! So nice to see this getting cleaned up!

@handeyeco handeyeco changed the title Remove static from WidgetOptions [Static:Perseus] Remove static from WidgetOptions Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

item-splitting-change item-splitting-change-ack Acknowledges that this PR's item-splitting bundle change has been reviewed olc-5.0.83442 schema-change Attached to PRs when we detect Perseus Schema changes in it schema-change-ack Acknowledges that this PR's data-schema change has been reviewed by Content Platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants