Skip to content

Commit

Permalink
[Interactive Graph Editor] Add locked vector to storybook story for a…
Browse files Browse the repository at this point in the history
…ll locked figures (#1350)

## Summary:
Super minor. Just adding a locked vector to the `segmentWithLockedFigures`
testdata so that the stories with all locked figures show all the current
locked figures.

Issue: none

## Test plan:
http://localhost:6006/?path=/story/perseuseditor-editorpage--mafs-with-locked-figures-m-2-flag

confirm all four locked figure types' settings are there

<img width="377" alt="Screenshot 2024-06-13 at 3 24 20 PM" src="https://github.com/Khan/perseus/assets/13231763/5fcf85f0-db27-4577-923b-7384f44913a9">

Author: nishasy

Reviewers: nishasy, Myranae, 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), ✅ Jest Coverage (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ gerald

Pull Request URL: #1350
  • Loading branch information
nishasy committed Jun 17, 2024
1 parent 73ba4f7 commit 1e877c6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .changeset/chatty-pears-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@khanacademy/perseus": patch
"@khanacademy/perseus-editor": patch
---

[Interactive Graph Editor] Add locked vector to storybook story for all locked figures
Original file line number Diff line number Diff line change
Expand Up @@ -2089,13 +2089,6 @@ export const segmentWithAllLockedRayVariations: PerseusRenderer = {
},
};

export const segmentWithLockedFigures: PerseusRenderer =
interactiveGraphQuestionBuilder()
.addLockedPointAt(-7, -7)
.addLockedLine([-7, -5], [2, -3])
.addLockedEllipse([0, 5], [4, 2], {angle: Math.PI / 4})
.build();

export const segmentWithLockedEllipses: PerseusRenderer =
interactiveGraphQuestionBuilder()
.addLockedEllipse([0, 0], [5, 5])
Expand All @@ -2119,6 +2112,14 @@ export const segmentWithLockedVectors: PerseusRenderer =
.addLockedVector([2, 2], [-2, 4], "green")
.build();

export const segmentWithLockedFigures: PerseusRenderer =
interactiveGraphQuestionBuilder()
.addLockedPointAt(-7, -7)
.addLockedLine([-7, -5], [2, -3])
.addLockedEllipse([0, 5], [4, 2], {angle: Math.PI / 4})
.addLockedVector([0, 0], [8, 2], "purple")
.build();

export const quadraticQuestion: PerseusRenderer = {
content: "All locked lines\n\n[[☃ interactive-graph 1]]",
images: {},
Expand Down

0 comments on commit 1e877c6

Please sign in to comment.