Skip to content

Commit

Permalink
Add mafs.point flag to Renderer prop types (#1386)
Browse files Browse the repository at this point in the history
## Summary:
Perseus renders point graphs with fixed numbers of points using Mafs
when the `mafs.point` flag is on. Previously, however, the apiOptions
type (used in the Renderer props) did not allow this flag to be passed.
This commit makes it so the flag can be passed without a type error.

Issue: none

## Test plan:

- Check out this webapp PR: Khan/webapp#23239
- Upgrade Perseus to the dev version built by CI for this pull request.
- Run the typechecker in webapp's static service.
- There should be no errors.

Author: benchristel

Reviewers: nishasy, #perseus, mark-fitzgerald, SonicScrewdriver

Required Reviewers:

Approved By: nishasy

Checks: ✅ codecov/project, ✅ codecov/patch, ✅ Upload Coverage (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Jest Coverage (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ gerald, ❌ Upload Coverage (ubuntu-latest, 20.x), ✅ Publish npm snapshot (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), ✅ Jest Coverage (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ gerald

Pull Request URL: #1386
  • Loading branch information
benchristel authored Jul 1, 2024
1 parent 94067d7 commit 5fdbeb9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/curvy-singers-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/perseus": minor
---

Add `mafs.point` flag to ApiOptions type
4 changes: 3 additions & 1 deletion packages/perseus/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,16 @@ export const MafsGraphTypeFlags = [
"linear-system",
/** Enables the `ray` interactive-graph type. */
"ray",
/** Enables the `polygon` interactive-graph type. */
/** Enables the `polygon` interactive-graph type a fixed number of sides. */
"polygon",
/** Enables the `circle` interactive-graph type. */
"circle",
/** Enables the `quadratic` interactive-graph type. */
"quadratic",
/** Enables the `sinusoid` interactive-graph type. */
"sinusoid",
/** Enables the `point` interactive-graph type with a fixed number of points. */
"point",
] as const;

export const InteractiveGraphLockedFeaturesFlags = [
Expand Down

0 comments on commit 5fdbeb9

Please sign in to comment.