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

Create helper to build public widget options for Matcher #2156

Open
wants to merge 49 commits into
base: main
Choose a base branch
from

Conversation

Myranae
Copy link
Contributor

@Myranae Myranae commented Jan 24, 2025

Summary:

Adds a function that takes a Matcher widget's full widget options and removes correct order information. Some additional shuffling logic has been added to allow shuffling to occur server-side.

It also adds this function to the widget's widget export and adds a test confirming the function works as expected.

Issue: LEMS-2761

Test plan:

  • Confirm all checks pass
  • Confirm Matcher still works as expected.

@Myranae Myranae self-assigned this Jan 24, 2025
Copy link
Contributor

github-actions bot commented Jan 24, 2025

npm Snapshot: Published

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

Example:

yarn add @khanacademy/perseus@PR2156

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

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

Copy link
Contributor

github-actions bot commented Jan 24, 2025

Size Change: +1.06 kB (+0.07%)

Total Size: 1.48 MB

Filename Size Change
packages/perseus-core/dist/es/index.js 48 kB +1.73 kB (+3.73%)
packages/perseus/dist/es/index.js 378 kB -669 B (-0.18%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 39 kB
packages/keypad-context/dist/es/index.js 760 B
packages/kmath/dist/es/index.js 86.9 kB
packages/math-input/dist/es/index.js 77.6 kB
packages/math-input/dist/es/strings.js 1.79 kB
packages/perseus-editor/dist/es/index.js 688 kB
packages/perseus-linter/dist/es/index.js 22.2 kB
packages/perseus-score/dist/es/index.js 115 kB
packages/perseus/dist/es/strings.js 6.06 kB
packages/pure-markdown/dist/es/index.js 3.66 kB
packages/simple-markdown/dist/es/index.js 12.5 kB

compressed-size-action

Copy link
Collaborator

@jeremywiebe jeremywiebe left a comment

Choose a reason for hiding this comment

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

Nice. Please check my comments as one of them (how to remove the order information) should be resolved before landing. Thanks!

packages/perseus-core/src/widgets/matcher/matcher-util.ts Outdated Show resolved Hide resolved
@Myranae Myranae marked this pull request as ready for review January 28, 2025 16:49
@Myranae Myranae requested a review from benchristel January 30, 2025 00:46
@Myranae Myranae requested a review from benchristel February 6, 2025 21:50
…tcher-split

# Conflicts:
#	packages/perseus-core/src/index.ts
#	packages/perseus/src/types.ts
…tcher-split

# Conflicts:
#	packages/perseus-core/src/index.ts
#	packages/perseus/src/types.ts
Copy link
Collaborator

@jeremywiebe jeremywiebe left a comment

Choose a reason for hiding this comment

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

Whew, I had a bunch of nitpicky comments. The approach you did her is good though! Thanks for taking this through a few rounds as we all figure out how we want to handle this.

packages/perseus-core/src/utils/util.ts Outdated Show resolved Hide resolved
packages/perseus-core/src/widgets/matcher/matcher-util.ts Outdated Show resolved Hide resolved
packages/perseus-core/src/widgets/matcher/matcher-util.ts Outdated Show resolved Hide resolved
packages/perseus/src/util.ts Outdated Show resolved Hide resolved
packages/perseus/src/widgets/categorizer/categorizer.tsx Outdated Show resolved Hide resolved
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.

3 participants