-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Interactive Graph] Update the builder with all currently migrated graph types #1373
Conversation
Size Change: -833 B (-0.1%) Total Size: 845 kB
ℹ️ View Unchanged
|
f0d1856
to
37fe1c4
Compare
GeraldRequired Reviewers
Don't want to be involved in this pull request? Comment |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1373 +/- ##
==========================================
+ Coverage 69.68% 70.92% +1.24%
==========================================
Files 492 495 +3
Lines 103871 103927 +56
Branches 7505 10556 +3051
==========================================
+ Hits 72382 73710 +1328
+ Misses 31310 30217 -1093
+ Partials 179 0 -179
... and 147 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you! My one question is whether we want to let callers of the builder pass both startCoords
and numSegments
to the segment graph. In the common case, the information in numSegments
is redundant and could be derived from startCoords
. I could maybe see an argument that we'd want to let numSegments
be different from startCoords
in order to test what happens when the data is inconsistent. That's such an edge case, though, that I don't think it's worth complicating the builder for the sake of the O(1)
tests we might write that take advantage of it.
I'll leave the decision up to you, though.
@benchristel I think it's still nice to have |
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (4389efc) and published it to npm. You Example: yarn add @khanacademy/perseus@PR1373 If you are working in Khan Academy's webapp, you can run: ./dev/tools/bump_perseus_version.sh -t PR1373 |
I agree. I guess the way I'd prefer to accomplish that is by having a separate method to set non-default coords, so you could do either: const question = interactiveGraphBuilder()
.withNumSegments(3)
.build(); or const question = interactiveGraphBuilder()
.withSegments([
// ...
])
.build(); |
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @khanacademy/perseus@24.0.0 ### Major Changes - [#1371](#1371) [`ba5f33460`](ba5f334) Thanks [@anakaren-rojas](https://github.com/anakaren-rojas)! - update attributes for expression widget button ### Patch Changes - [#1364](#1364) [`35651e097`](35651e0) Thanks [@Myranae](https://github.com/Myranae)! - Fix a bug in the exercise editor where the preview did not update after a change to the number of sides in polygon graphs - [#1373](#1373) [`961510673`](9615106) Thanks [@nishasy](https://github.com/nishasy)! - [Interactive Graph] Update the interactive graph builder with all currently migrated graph types ## @khanacademy/perseus-editor@7.0.0 ### Major Changes - [#1371](#1371) [`ba5f33460`](ba5f334) Thanks [@anakaren-rojas](https://github.com/anakaren-rojas)! - update attributes for expression widget button ### Patch Changes - [#1373](#1373) [`961510673`](9615106) Thanks [@nishasy](https://github.com/nishasy)! - [Interactive Graph] Update the interactive graph builder with all currently migrated graph types - Updated dependencies \[[`35651e097`](35651e0), [`961510673`](9615106), [`ba5f33460`](ba5f334)]: - @khanacademy/perseus@24.0.0
Summary:
I updated the builder utility with all currently migrated graph types. This
meant adding linear, linear system, ray, quadratic, and sinusoid.
I also added the ability to give them all starting coords. This is necessary
to prove that the starting coords can be set at all.
Now that it's clear they can be set, we can move onto adding the ability
to edit these coordinates in the editor UI in the next task.
NOTE: The task also includes start coords for the Points graph type, but
that doesn't seem to have the mafs flag on in storybook yet, so I didn't
include that here.
Issue: https://khanacademy.atlassian.net/browse/LEMS-2051
Test plan:
Storybook
Storybook previews showing custom start coords