-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Interactive Graph Editor: Storybook] Add a story for Point graph typ…
…e start coords (#1482) ## Summary: There currently isn't a good way to manually test the start coords for Point graph in storybook, so I'm adding a story for that here. - Added story for point graph start coords in the interactive graph editor stories. - Shortened the names of the stories so they show up neater in the files structure. - Added `numPoints` to the stateful mafs graph useEffect so it appropriately updates the preview when the number of points is changed. - Fixed the builder for point graphs so the default coords value is undefined and it calculates the correct coords itself. It was defaulting to [0, 0] before, which really didn't work when there was a different number of points. - Added `points` graph to the flag utility so it uses the mafs version in storybook. Issue: https://khanacademy.atlassian.net/browse/LEMS-2209 ## Test plan: Storybook - http://localhost:6006/?path=/story/perseuseditor-widgets-interactive-graph--interactive-graph-point - Change the number of points and confirm that it looks correct in both previews ## Screenshot <img width="1212" alt="Screenshot 2024-08-02 at 3 57 23 PM" src="https://github.com/user-attachments/assets/ed618517-efba-4f12-ac87-7e619d0489fc"> Author: nishasy Reviewers: Myranae, nishasy, jeremywiebe, benchristel, mark-fitzgerald Required Reviewers: Approved By: Myranae Checks: ✅ Upload Coverage (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), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Jest Coverage (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ gerald Pull Request URL: #1482
- Loading branch information
Showing
7 changed files
with
81 additions
and
60 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,6 @@ | ||
--- | ||
"@khanacademy/perseus": patch | ||
"@khanacademy/perseus-editor": patch | ||
--- | ||
|
||
[Interactive Graph Editor: Storybook] Add a story for Point graph type start coords |
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
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
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