Skip to content
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

Refactor Wrapped{Ellipse,Line,Path} to be ES6 classes #995

Merged
merged 23 commits into from
Feb 14, 2024

Conversation

benchristel
Copy link
Member

This enables better typechecking in the area of the code we want to change
next.

Issue: none

Test plan:

yarn dev
open http://localhost:5173

You should see a bunch of working interactive graphs

@khan-actions-bot
Copy link
Contributor

khan-actions-bot commented Feb 14, 2024

Gerald

Required Reviewers
  • @Khan/perseus for changes to package.json, yarn.lock, .changeset/light-panthers-invite.md, .changeset/lovely-cheetahs-end.md, dev/index.tsx, packages/math-input/src/enums.ts, packages/math-input/src/types.ts, packages/perseus/src/perseus-types.ts, packages/perseus-error/src/index.ts, packages/math-input/src/data/keys.ts, packages/perseus/src/components/image-loader.tsx, packages/perseus/src/components/math-input.tsx, packages/perseus/src/interactive2/arrowhead.ts, packages/perseus/src/interactive2/get-clip-point.ts, packages/perseus/src/interactive2/movable-line-options.ts, packages/perseus/src/interactive2/wrapped-drawing.ts, packages/perseus/src/interactive2/wrapped-ellipse.ts, packages/perseus/src/interactive2/wrapped-line.ts, packages/perseus/src/interactive2/wrapped-path.ts, packages/perseus/src/logging/log.ts, packages/perseus/src/util/interactive.ts, packages/perseus/src/util/sizing-utils.ts, packages/perseus/src/widgets/graded-group.tsx, packages/perseus-editor/src/widgets/expression-editor.tsx, packages/perseus-editor/src/widgets/plotter-editor.tsx, packages/math-input/src/components/input/mathquill-helpers.ts, packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx, packages/math-input/src/components/keypad/keypad.tsx, packages/math-input/src/components/keypad/shared-keys.tsx, packages/math-input/src/components/keypad/utils.ts, packages/math-input/src/components/keypad/__tests__/keypad.test.tsx, packages/math-input/src/components/keypad/keypad-pages/fractions-page.tsx

Don't want to be involved in this pull request? Comment #removeme and we won't notify you of further changes.

Copy link
Contributor

github-actions bot commented Feb 14, 2024

Size Change: -645 B (0%)

Total Size: 815 kB

Filename Size Change
packages/perseus/dist/es/index.js 390 kB -645 B (0%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 38.1 kB
packages/kmath/dist/es/index.js 4.27 kB
packages/math-input/dist/es/index.js 79.7 kB
packages/perseus-core/dist/es/index.js 908 B
packages/perseus-editor/dist/es/index.js 263 kB
packages/perseus-error/dist/es/index.js 878 B
packages/perseus-linter/dist/es/index.js 21.8 kB
packages/pure-markdown/dist/es/index.js 3.77 kB
packages/simple-markdown/dist/es/index.js 12.4 kB

compressed-size-action

Copy link

codecov bot commented Feb 14, 2024

Codecov Report

Attention: 99 lines in your changes are missing coverage. Please review.

Comparison is base (97b5bbf) 63.67% compared to head (66cbf59) 64.71%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #995      +/-   ##
==========================================
+ Coverage   63.67%   64.71%   +1.04%     
==========================================
  Files         423      427       +4     
  Lines       96516    96456      -60     
  Branches     6283     8660    +2377     
==========================================
+ Hits        61452    62426     +974     
+ Misses      35064    34030    -1034     

Impacted file tree graph

Files Coverage Δ
...th-input/src/components/input/mathquill-helpers.ts 98.09% <100.00%> (-0.39%) ⬇️
.../components/keypad/keypad-pages/fractions-page.tsx 100.00% <100.00%> (ø)
...ckages/math-input/src/components/keypad/keypad.tsx 96.99% <100.00%> (ø)
...s/math-input/src/components/keypad/shared-keys.tsx 100.00% <100.00%> (ø)
packages/math-input/src/components/keypad/utils.ts 85.29% <100.00%> (ø)
packages/math-input/src/data/keys.ts 100.00% <100.00%> (ø)
packages/math-input/src/enums.ts 100.00% <100.00%> (ø)
...s/perseus-editor/src/widgets/expression-editor.tsx 71.81% <100.00%> (ø)
...ages/perseus-editor/src/widgets/plotter-editor.tsx 18.81% <100.00%> (ø)
packages/perseus-error/src/index.ts 100.00% <100.00%> (ø)
... and 13 more

... and 69 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 97b5bbf...66cbf59. Read the comment docs.

Copy link
Contributor

github-actions bot commented Feb 14, 2024

npm Snapshot: Published

Good news!! We've packaged up the latest commit from this PR (66cbf59) and published it to npm. You
can install it using the tag PR995.

Example:

yarn add @khanacademy/perseus@PR995

Copy link
Collaborator

@jeremywiebe jeremywiebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments from browsing this PR. I'll leave full review/approval for the keyboard team (Ned/Mark). :)

packages/perseus/src/interactive2/arrowhead.ts Outdated Show resolved Hide resolved
packages/perseus/src/interactive2/get-clip-point.ts Outdated Show resolved Hide resolved
packages/perseus/src/interactive2/wrapped-ellipse.ts Outdated Show resolved Hide resolved
@benchristel benchristel merged commit a4ead99 into main Feb 14, 2024
13 checks passed
@benchristel benchristel deleted the triad/wrapped-ellipse-refactor branch February 14, 2024 19:36
aag added a commit that referenced this pull request Feb 14, 2024
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@19.2.0

### Minor Changes

- [#989](#989)
[`97b5bbfb`](97b5bbf)
Thanks [@aag](https://github.com/aag)! - Add a new python-program widget
and its editor

### Patch Changes

- [#995](#995)
[`a4ead994`](a4ead99)
Thanks [@benchristel](https://github.com/benchristel)! - Internal:
Refactor wrapped Raphael SVGs to be ES6 classes


- [#995](#995)
[`a4ead994`](a4ead99)
Thanks [@benchristel](https://github.com/benchristel)! - Update
formatting for Prettier 2.8.8

- Updated dependencies
\[[`a4ead994`](a4ead99)]:
    -   @khanacademy/math-input@17.0.8
    -   @khanacademy/perseus-linter@0.3.12
    -   @khanacademy/pure-markdown@0.2.15

## @khanacademy/perseus-editor@4.2.0

### Minor Changes

- [#989](#989)
[`97b5bbfb`](97b5bbf)
Thanks [@aag](https://github.com/aag)! - Add a new python-program widget
and its editor

### Patch Changes

- [#995](#995)
[`a4ead994`](a4ead99)
Thanks [@benchristel](https://github.com/benchristel)! - Update
formatting for Prettier 2.8.8

- Updated dependencies
\[[`a4ead994`](a4ead99),
[`a4ead994`](a4ead99),
[`97b5bbfb`](97b5bbf)]:
    -   @khanacademy/perseus@19.2.0
    -   @khanacademy/math-input@17.0.8

## @khanacademy/perseus-dev-ui@1.1.1

### Patch Changes

- [#995](#995)
[`a4ead994`](a4ead99)
Thanks [@benchristel](https://github.com/benchristel)! - Internal:
Refactor wrapped Raphael SVGs to be ES6 classes


- [#995](#995)
[`a4ead994`](a4ead99)
Thanks [@benchristel](https://github.com/benchristel)! - Update
formatting for Prettier 2.8.8

- Updated dependencies
\[[`a4ead994`](a4ead99)]:
    -   @khanacademy/math-input@17.0.8
    -   @khanacademy/perseus-linter@0.3.12
    -   @khanacademy/pure-markdown@0.2.15

## @khanacademy/math-input@17.0.8

### Patch Changes

- [#995](#995)
[`a4ead994`](a4ead99)
Thanks [@benchristel](https://github.com/benchristel)! - Update
formatting for Prettier 2.8.8

## @khanacademy/perseus-error@0.2.11

### Patch Changes

- [#995](#995)
[`a4ead994`](a4ead99)
Thanks [@benchristel](https://github.com/benchristel)! - Update
formatting for Prettier 2.8.8

## @khanacademy/perseus-linter@0.3.12

### Patch Changes

- Updated dependencies
\[[`a4ead994`](a4ead99)]:
    -   @khanacademy/perseus-error@0.2.11

## @khanacademy/pure-markdown@0.2.15

### Patch Changes

- Updated dependencies
\[[`a4ead994`](a4ead99)]:
    -   @khanacademy/perseus-error@0.2.11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants