Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the Expression widget to support the 'Show Your Work' hackathon project #1768

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

kevinb-khan
Copy link
Contributor

Summary:

This PR makes the following changes:

  • adds a 'setValue' method on the Expression widget that can be used to set the value of the input field programmatically
  • adds a 'disabled' prop which will be used to disable to widget when its rendered outside a Renderer
  • adds a 'noBackground' prop which removes the 'background: white' styling that's present by default

The reason for rendering the Expression widget outside of the Renderer is so that we can access the new 'setValue' method on it.

Issue: None

Test plan:

  • install the PR published npm module in webapp and do some manual testing there to ensure that setValue is work as expected
  • write some unit tests for this

@kevinb-khan kevinb-khan self-assigned this Oct 20, 2024
Copy link
Contributor

github-actions bot commented Oct 20, 2024

npm Snapshot: Published

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

Example:

yarn add @khanacademy/perseus@PR1768

If you are working in Khan Academy's webapp, you can run:

./dev/tools/bump_perseus_version.sh -t PR1768

Copy link
Contributor

github-actions bot commented Oct 20, 2024

Size Change: +198 B (+0.02%)

Total Size: 858 kB

Filename Size Change
packages/perseus/dist/es/index.js 409 kB +198 B (+0.05%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 38.8 kB
packages/keypad-context/dist/es/index.js 760 B
packages/kmath/dist/es/index.js 4.27 kB
packages/math-input/dist/es/index.js 77.8 kB
packages/math-input/dist/es/strings.js 1.79 kB
packages/perseus-core/dist/es/index.js 1.48 kB
packages/perseus-editor/dist/es/index.js 282 kB
packages/perseus-linter/dist/es/index.js 22.2 kB
packages/perseus/dist/es/strings.js 3.49 kB
packages/pure-markdown/dist/es/index.js 3.66 kB
packages/simple-markdown/dist/es/index.js 12.4 kB

compressed-size-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant