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

fix(LEMS-2738): Convert Expression Editor Answer keys to strings #2042

Merged
merged 5 commits into from
Dec 20, 2024

Conversation

anakaren-rojas
Copy link
Contributor

@anakaren-rojas anakaren-rojas commented Dec 19, 2024

Summary:

  • Converts expression editor keys to strings
  • Updates onDelete handler to use index instead of key

Issue: LEMS-2738

Test plan:

Screen.Recording.2024-12-19.at.16.18.48.mov

@anakaren-rojas anakaren-rojas self-assigned this Dec 19, 2024
Copy link
Contributor

github-actions bot commented Dec 19, 2024

Size Change: +49 B (0%)

Total Size: 1.27 MB

Filename Size Change
packages/perseus-editor/dist/es/index.js 688 kB +49 B (+0.01%)
ℹ️ 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 4.27 kB
packages/math-input/dist/es/index.js 78 kB
packages/math-input/dist/es/strings.js 1.79 kB
packages/perseus-core/dist/es/index.js 1.48 kB
packages/perseus-linter/dist/es/index.js 22.2 kB
packages/perseus/dist/es/index.js 417 kB
packages/perseus/dist/es/strings.js 4.93 kB
packages/pure-markdown/dist/es/index.js 3.67 kB
packages/simple-markdown/dist/es/index.js 12.5 kB

compressed-size-action

@anakaren-rojas anakaren-rojas marked this pull request as ready for review December 19, 2024 21:28
Copy link
Contributor

github-actions bot commented Dec 19, 2024

npm Snapshot: Published

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

Example:

yarn add @khanacademy/perseus@PR2042

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

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

@anakaren-rojas anakaren-rojas changed the title make all keys number type after deletion fix(): Convert Expression Editor Answer keys to strings Dec 19, 2024
@anakaren-rojas anakaren-rojas changed the title fix(): Convert Expression Editor Answer keys to strings fix(LEMS-2738): Convert Expression Editor Answer keys to strings Dec 19, 2024
@anakaren-rojas anakaren-rojas requested a review from a team December 20, 2024 00:52
Copy link
Member

@catandthemachines catandthemachines left a comment

Choose a reason for hiding this comment

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

I have one comment on a line that looked odd that I have questions about. But once that's resolved it looks good to go.

@@ -565,6 +570,7 @@ class AnswerOption extends React.Component<

handleImSure = () => {
this.props.onDelete();
this.handleCancelDelete();
Copy link
Member

Choose a reason for hiding this comment

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

Ooo, what's this do and why is it here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its an existing function that closes the "I'm sure" button, I added it so it wouldn't stay open once someone deletes the current item

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is the before:
https://github.com/user-attachments/assets/8838f716-dfd4-4aa7-995d-b15f4c5aa22a

Here is the after:

Screen.Recording.2024-12-19.at.17.00.15.mov

@anakaren-rojas anakaren-rojas merged commit 705d74b into main Dec 20, 2024
13 of 28 checks passed
@anakaren-rojas anakaren-rojas deleted the exercise-editor-fix branch December 20, 2024 01:04
anakaren-rojas pushed a commit that referenced this pull request Dec 20, 2024
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.


# Releases
## @khanacademy/perseus-editor@17.0.11

### Patch Changes

-   [#2042](#2042) [`705d74b69`](705d74b) Thanks [@anakaren-rojas](https://github.com/anakaren-rojas)! - fix for editor

Author: khan-actions-bot

Reviewers: anakaren-rojas

Required Reviewers:

Approved By: anakaren-rojas

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

Pull Request URL: #2051
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.

2 participants