From 94067d7522a2ffcb04d213e1ebdb4a96cc0414bc Mon Sep 17 00:00:00 2001 From: Nisha Yerunkar Date: Mon, 1 Jul 2024 15:19:59 -0700 Subject: [PATCH] [Interactive Graph: Circle] Add a key prop to the circle drag handle (#1388) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary: There's always a console error saying that the circle graph drag handle is missing the `key` prop. Adding a `key` here. Issue: none ## Test plan: Open the console and make sure the error isn't showing up anymore. `yarn jest packages/perseus/src/widgets/__tests__/interactive-graph.test.ts` Make sure the logs don't show the console error anymore. Screenshot 2024-07-01 at 3 10 31 PM Author: nishasy Reviewers: benchristel, catandthemachines Required Reviewers: Approved By: benchristel, catandthemachines Checks: ✅ codecov/project, ✅ codecov/patch, ✅ Upload Coverage (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Jest Coverage (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), 🚫 Upload Coverage, ✅ gerald, 🚫 Publish npm snapshot (ubuntu-latest, 20.x), 🚫 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), 🚫 Jest Coverage (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), 🚫 Check builds for changes in size (ubuntu-latest, 20.x), ✅ gerald Pull Request URL: https://github.com/Khan/perseus/pull/1388 --- .changeset/sour-cougars-draw.md | 5 +++++ .../perseus/src/widgets/interactive-graphs/graphs/circle.tsx | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/sour-cougars-draw.md diff --git a/.changeset/sour-cougars-draw.md b/.changeset/sour-cougars-draw.md new file mode 100644 index 0000000000..29c902d9c4 --- /dev/null +++ b/.changeset/sour-cougars-draw.md @@ -0,0 +1,5 @@ +--- +"@khanacademy/perseus": patch +--- + +[Interactive Graph: Circle] Add a key prop to the circle drag handle diff --git a/packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx b/packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx index ab49ae0bac..8afbbd671d 100644 --- a/packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx +++ b/packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx @@ -108,6 +108,7 @@ function DragHandle(props: {center: [x: number, y: number]}) { const [xPx, yPx] = vec.add(offsetPx, centerPx); return (