From 1e877c6d44a0de351bfbfa5716391b6522bebbeb Mon Sep 17 00:00:00 2001 From: Nisha Yerunkar Date: Mon, 17 Jun 2024 12:10:31 -0700 Subject: [PATCH] [Interactive Graph Editor] Add locked vector to storybook story for all locked figures (#1350) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 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 Screenshot 2024-06-13 at 3 24 20 PM 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: https://github.com/Khan/perseus/pull/1350 --- .changeset/chatty-pears-drum.md | 6 ++++++ .../__testdata__/interactive-graph.testdata.ts | 15 ++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 .changeset/chatty-pears-drum.md diff --git a/.changeset/chatty-pears-drum.md b/.changeset/chatty-pears-drum.md new file mode 100644 index 0000000000..54e1f20180 --- /dev/null +++ b/.changeset/chatty-pears-drum.md @@ -0,0 +1,6 @@ +--- +"@khanacademy/perseus": patch +"@khanacademy/perseus-editor": patch +--- + +[Interactive Graph Editor] Add locked vector to storybook story for all locked figures diff --git a/packages/perseus/src/widgets/__testdata__/interactive-graph.testdata.ts b/packages/perseus/src/widgets/__testdata__/interactive-graph.testdata.ts index 1920f52c8c..6a6217efd7 100644 --- a/packages/perseus/src/widgets/__testdata__/interactive-graph.testdata.ts +++ b/packages/perseus/src/widgets/__testdata__/interactive-graph.testdata.ts @@ -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]) @@ -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: {},