Add showAngles option to polygon locked figure#3481
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
🗄️ Schema Change: Changes Detected
|
|
Size Change: +108 B (+0.02%) Total Size: 497 kB 📦 View Changed
ℹ️ View Unchanged
|
🛠️ Item Splitting: Changes Detected
|
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (5f752bd) and published it to npm. You Example: pnpm add @khanacademy/perseus@PR3481If you are working in Khan Academy's frontend, you can run the below command. ./dev/tools/bump_perseus_version.ts -t PR3481If you are working in Khan Academy's webapp, you can run the below command. ./dev/tools/bump_perseus_version.js -t PR3481 |
|
I'll be following through with the CI failures next week! |
Summary:
Extend the polygon locked figure to include a
showAnglesoption similar to the polygon interactive graph.I'm contributing upstream to Perseus becuase this feature would enable the Visual Output team to lean on Perseus for computing and displaying angles rather than trusting the LLM to do the math. I plan on following up with a change to allow these angle measure labels to be configurable per-vertex.
Feel free to nit-pick style / conventions, and let me know if I'm missing any tests!
Test plan:
pnpm lint && pnpm testonChangePropswhen toggled in locked polygon settings (mirrors existing test cases)packages/perseus/src/widgets/interactive-graphs/graphs/polygon.test.tsx