-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUGFIX: [Number Line] - Some exercises with fractions would not render (
#1762) ## Summary: The code that generates the list of tick marks on the number line assumed an integer value for the number of ticks. Exercises with fractions could generate a seed value (`numDivisions`) that is a decimal value (i.e. 7.000001). This fix ensures that an integer value is used. Issue: LEMS-2549 ## Test plan: 1. Launch Storybook 1. Open the [Editor Page demo](http://localhost:6006/?path=/story/perseuseditor-editorpage--demo) 1. Add a Number Line widget 1. Configure the widget as shown in the image: ![Number Line - Settings](https://github.com/user-attachments/assets/f22e5bf9-f4c5-4733-9d84-f8f9c814f292) 1. The number line in the preview should be visible ## Affected behavior ### Before ![Number Line - Before](https://github.com/user-attachments/assets/7803501f-06ed-4087-8418-59433840990e) ### After ![Number Line - After](https://github.com/user-attachments/assets/d0b3f89d-fcf8-437e-98ee-c33c2ab79726) Author: mark-fitzgerald Reviewers: SonicScrewdriver Required Reviewers: Approved By: SonicScrewdriver Checks: ✅ gerald, ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ gerald, ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ gerald Pull Request URL: #1762
- Loading branch information
1 parent
93bd39b
commit a0f438f
Showing
4 changed files
with
387 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@khanacademy/perseus": patch | ||
--- | ||
|
||
BUGFIX - [Number Line] - Some exercises with fractions wouldn't render |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.