-
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
Move getLines to polygon.tsx #1398
Conversation
It's only used by the polygon graph, and doesn't seem like a good candidate for reuse (with a name like getLines, how would people find it?) so I moved it closer to its usage site.
GeraldRequired Reviewers
Don't want to be involved in this pull request? Comment |
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (41c1bc2) and published it to npm. You Example: yarn add @khanacademy/perseus@PR1398 If you are working in Khan Academy's webapp, you can run: ./dev/tools/bump_perseus_version.sh -t PR1398 |
Size Change: -20 B (0%) Total Size: 854 kB
ℹ️ View Unchanged
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1398 +/- ##
==========================================
+ Coverage 69.81% 71.08% +1.27%
==========================================
Files 503 507 +4
Lines 105124 105209 +85
Branches 7589 10717 +3128
==========================================
+ Hits 73394 74791 +1397
+ Misses 31546 30418 -1128
+ Partials 184 0 -184
... and 143 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.
I had a failing test for a second there after running yarn test
, but I ran a yarn install
and everything is passing now, so looks good to me!
|
||
import type {MafsGraphProps, PolygonGraphState} from "../types"; | ||
import {CollinearTuple} from "@khanacademy/perseus"; |
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 like you might want to add type
to this. Ah, the PR gives you a warning for this already. Looks like some other linting issues around here too.
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/[email protected] ### Major Changes - [#1411](#1411) [`b0df85a80`](b0df85a) Thanks [@handeyeco](https://github.com/handeyeco)! - Consolidate PerseusError code and move it into perseus-core (deletes the perseus-error package) ### Patch Changes - [#1405](#1405) [`a430de4c1`](a430de4) Thanks [@benchristel](https://github.com/benchristel)! - Internal: Fix console errors and warnings printed in tests - [#1398](#1398) [`fa19dbc97`](fa19dbc) Thanks [@benchristel](https://github.com/benchristel)! - Internal: move the getLines function to polygon.tsx - [#1399](#1399) [`147ab0442`](147ab04) Thanks [@benchristel](https://github.com/benchristel)! - Internal: refactor and test `segmentsIntersect` function - [#1394](#1394) [`8ae3d18f1`](8ae3d18) Thanks [@benchristel](https://github.com/benchristel)! - Internal: move angle functions to math/angle.ts - [#1391](#1391) [`f5711a331`](f5711a3) Thanks [@benchristel](https://github.com/benchristel)! - Internal: Resolve TODO comments - [#1397](#1397) [`3108f933e`](3108f93) Thanks [@benchristel](https://github.com/benchristel)! - Internal: split `MafsGraph` and `StatefulMafsGraph` into separate files. - [#1393](#1393) [`e6424d5e7`](e6424d5) Thanks [@benchristel](https://github.com/benchristel)! - Internal: Move and rename test files - Updated dependencies \[[`be7f14153`](be7f141), [`b0df85a80`](b0df85a), [`24a72177e`](24a7217)]: - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Major Changes - [#1411](#1411) [`b0df85a80`](b0df85a) Thanks [@handeyeco](https://github.com/handeyeco)! - Consolidate PerseusError code and move it into perseus-core (deletes the perseus-error package) ### Patch Changes - [#1405](#1405) [`a430de4c1`](a430de4) Thanks [@benchristel](https://github.com/benchristel)! - Internal: Fix console errors and warnings printed in tests - Updated dependencies \[[`a430de4c1`](a430de4), [`fa19dbc97`](fa19dbc), [`be7f14153`](be7f141), [`147ab0442`](147ab04), [`8ae3d18f1`](8ae3d18), [`b0df85a80`](b0df85a), [`f5711a331`](f5711a3), [`3108f933e`](3108f93), [`e6424d5e7`](e6424d5)]: - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Major Changes - [#1406](#1406) [`24a72177e`](24a7217) Thanks [@handeyeco](https://github.com/handeyeco)! - No longer lint for profanity ### Patch Changes - [#1407](#1407) [`be7f14153`](be7f141) Thanks [@handeyeco](https://github.com/handeyeco)! - Updates to README files - [#1411](#1411) [`b0df85a80`](b0df85a) Thanks [@handeyeco](https://github.com/handeyeco)! - Consolidate PerseusError code and move it into perseus-core (deletes the perseus-error package) - Updated dependencies \[[`b0df85a80`](b0df85a)]: - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Minor Changes - [#1411](#1411) [`b0df85a80`](b0df85a) Thanks [@handeyeco](https://github.com/handeyeco)! - Consolidate PerseusError code and move it into perseus-core (deletes the perseus-error package) ## @khanacademy/[email protected] ### Patch Changes - [#1407](#1407) [`be7f14153`](be7f141) Thanks [@handeyeco](https://github.com/handeyeco)! - Updates to README files - Updated dependencies \[[`b0df85a80`](b0df85a)]: - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#1407](#1407) [`be7f14153`](be7f141) Thanks [@handeyeco](https://github.com/handeyeco)! - Updates to README files - Updated dependencies \[[`b0df85a80`](b0df85a)]: - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#1407](#1407) [`be7f14153`](be7f141) Thanks [@handeyeco](https://github.com/handeyeco)! - Updates to README files - Updated dependencies \[[`b0df85a80`](b0df85a)]: - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#1407](#1407) [`be7f14153`](be7f141) Thanks [@handeyeco](https://github.com/handeyeco)! - Updates to README files - Updated dependencies \[[`be7f14153`](be7f141), [`b0df85a80`](b0df85a)]: - @khanacademy/[email protected] - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#1407](#1407) [`be7f14153`](be7f141) Thanks [@handeyeco](https://github.com/handeyeco)! - Updates to README files - Updated dependencies \[[`b0df85a80`](b0df85a)]: - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - Updated dependencies \[[`be7f14153`](be7f141), [`b0df85a80`](b0df85a), [`24a72177e`](24a7217)]: - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] Author: khan-actions-bot Reviewers: benchristel Required Reviewers: Approved By: benchristel Checks: ✅ codecov/project, ✅ codecov/patch, ✅ Upload Coverage (ubuntu-latest, 20.x), ⏭️ Publish npm snapshot, ✅ 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), ✅ Cypress (ubuntu-latest, 20.x), ✅ gerald Pull Request URL: #1396
Summary:
It's only used by the polygon graph, and doesn't seem like a good candidate for
reuse (with a name like getLines, how would people find it?) so I moved it
closer to its usage site.
Issue: none
Test plan:
yarn test