Skip to content

Commit

Permalink
Add a finite point question to gallery (#1541)
Browse files Browse the repository at this point in the history
## Summary:
Adds a finite point question so its easier to test infinite points vs. finite points.

<img width="2289" alt="Pasted_Image_8_21_24__1_26 PM" src="https://github.com/user-attachments/assets/1df8d2df-aba0-46e3-a1d5-21197a39ac8d">


Issue: LEMS-1816

## Test plan:
- Visit the gallery
- **There should be a new question**

Author: nicolecomputer

Reviewers: benchristel

Required Reviewers:

Approved By: benchristel

Checks: ✅ codecov/project, ✅ codecov/patch, ✅ Upload Coverage (ubuntu-latest, 20.x), ✅ Publish npm snapshot (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), ✅ Cypress (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), 🚫 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), 🚫 Cypress (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ gerald

Pull Request URL: #1541
  • Loading branch information
nicolecomputer authored Aug 22, 2024
1 parent f05b0f9 commit 3647119
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/selfish-kiwis-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@khanacademy/perseus-dev-ui": patch
"@khanacademy/perseus": patch
---

Adds a finite point question to dev gallery
1 change: 1 addition & 0 deletions dev/gallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import "../packages/perseus/src/styles/perseus-renderer.less";
const questions: [PerseusRenderer, number][] = pairWithIndices([
interactiveGraph.segmentQuestion,
interactiveGraph.pointQuestion,
interactiveGraph.finitePointQuestion,
interactiveGraph.angleQuestion,
interactiveGraph.linearSystemQuestion,
interactiveGraph.circleQuestion,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,27 @@ export const pointQuestionWithStartingCoords: PerseusRenderer =
})
.build();

export const finitePointQuestion: PerseusRenderer =
interactiveGraphQuestionBuilder()
.withContent(
"Vector $\\vec v$ is graphed in the interactive graph below.\n\n**Assuming $3\\vec v$ starts at the origin, plot its endpoint.**\n\n[[\u2603 interactive-graph 1]]",
)
.withBackgroundImage(
"web+graphie://ka-perseus-graphie.s3.amazonaws.com/d6983eff3063dac5815cc4d48c565cddba819765",
400,
400,
)
.withMarkings("none")
.withGridStep(1, 1)
.withSnapStep(1, 1)
.withTickStep(1, 1)
.withXRange(-8, 8)
.withYRange(-8, 8)
.withPoints(1, {
coords: [[0, 0]],
})
.build();

export const polygonQuestion: PerseusRenderer =
interactiveGraphQuestionBuilder()
.withContent(
Expand Down

0 comments on commit 3647119

Please sign in to comment.