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

[Hint Mode: Start Coords] Add start coords UI for sinusoid graphs #1468

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

nishasy
Copy link
Contributor

@nishasy nishasy commented Jul 31, 2024

Summary:

Add the UI to specify start coords for Sinusoid graph type.

  • Add the sinusoid graph type to start-coord-settings.tsx
  • Create a start-coords-sinusoid.tsx file with the main UI
  • Add a utility for getting the sinusoid equation from coordinates (less complex
    than the static method on InteractiveGraph that does the same)
  • Add start coords UI phase 2 flag

Issue: https://khanacademy.atlassian.net/browse/LEMS-2207

Test plan:

yarn jest

Storybook

@nishasy nishasy self-assigned this Jul 31, 2024
@nishasy nishasy requested a review from benchristel July 31, 2024 19:25
Copy link
Contributor

github-actions bot commented Jul 31, 2024

Size Change: +548 B (+0.06%)

Total Size: 851 kB

Filename Size Change
packages/perseus-editor/dist/es/index.js 272 kB +541 B (+0.2%)
packages/perseus/dist/es/index.js 412 kB +7 B (0%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 38.3 kB
packages/kmath/dist/es/index.js 4.27 kB
packages/math-input/dist/es/index.js 80.8 kB
packages/math-input/dist/es/strings.js 1.73 kB
packages/perseus-core/dist/es/index.js 1.48 kB
packages/perseus-linter/dist/es/index.js 21.6 kB
packages/perseus/dist/es/strings.js 3.23 kB
packages/pure-markdown/dist/es/index.js 3.67 kB
packages/simple-markdown/dist/es/index.js 12.4 kB

compressed-size-action

@@ -19,6 +19,7 @@ export const flags = {
// Start coords UI flags
// TODO(LEMS-2228): Remove flags once this is fully released
"start-coords-ui-phase-1": true,
"start-coords-ui-phase-2": true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can remove this and all the extra flag code below if we want to release sinusoid as part of phase 1.

@nishasy nishasy marked this pull request as ready for review July 31, 2024 19:29
@nishasy nishasy requested a review from a team July 31, 2024 19:29
@khan-actions-bot
Copy link
Contributor

Gerald

Required Reviewers
  • @Khan/perseus for changes to .changeset/eighty-ducks-appear.md, packages/perseus/src/index.ts, packages/perseus/src/types.ts, packages/perseus-editor/src/__stories__/flags-for-api-options.ts, packages/perseus-editor/src/components/start-coords-settings.tsx, packages/perseus-editor/src/components/start-coords-sinusoid.tsx, packages/perseus-editor/src/components/util.ts, packages/perseus-editor/src/widgets/interactive-graph-editor.tsx, packages/perseus-editor/src/components/__tests__/start-coords-settings.test.tsx, packages/perseus-editor/src/components/__tests__/util.test.ts, packages/perseus-editor/src/widgets/__tests__/interactive-graph-editor.test.tsx, packages/perseus/src/widgets/interactive-graphs/reducer/initialize-graph-state.ts

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

Copy link

codecov bot commented Jul 31, 2024

Codecov Report

Attention: Patch coverage is 96.40288% with 5 lines in your changes missing coverage. Please review.

Project coverage is 70.47%. Comparing base (94ad04f) to head (dc31410).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1468      +/-   ##
==========================================
+ Coverage   69.62%   70.47%   +0.85%     
==========================================
  Files         507      511       +4     
  Lines      105156   105325     +169     
  Branches     7517    11428    +3911     
==========================================
+ Hits        73218    74231    +1013     
+ Misses      31749    31094     -655     
+ Partials      189        0     -189     

Impacted file tree graph

Files Coverage Δ
...us-editor/src/components/start-coords-settings.tsx 98.43% <100.00%> (+0.14%) ⬆️
...us-editor/src/components/start-coords-sinusoid.tsx 100.00% <100.00%> (ø)
...us-editor/src/widgets/interactive-graph-editor.tsx 91.52% <100.00%> (+0.09%) ⬆️
packages/perseus/src/index.ts 100.00% <100.00%> (ø)
...teractive-graphs/reducer/initialize-graph-state.ts 92.53% <100.00%> (+11.99%) ⬆️
packages/perseus-editor/src/components/util.ts 70.96% <84.37%> (-3.77%) ⬇️

... and 142 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 94ad04f...dc31410. Read the comment docs.

Copy link
Contributor

@mark-fitzgerald mark-fitzgerald left a comment

Choose a reason for hiding this comment

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

Looks good.

@nishasy nishasy merged commit af68a9e into main Jul 31, 2024
18 of 20 checks passed
@nishasy nishasy deleted the start-coords-sinusoid branch July 31, 2024 21:20
Copy link
Contributor

@mark-fitzgerald mark-fitzgerald left a comment

Choose a reason for hiding this comment

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

LGTM

nishasy added a commit that referenced this pull request Aug 1, 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/[email protected]

### Minor Changes

- [#1468](#1468)
[`af68a9e08`](af68a9e)
Thanks [@nishasy](https://github.com/nishasy)! - [Hint Mode: Start
Coords] Add start coords UI for sinusoid graphs


- [#1469](#1469)
[`6e1ec850c`](6e1ec85)
Thanks [@nishasy](https://github.com/nishasy)! - [Hint Mode: Start
Coords] Add start coords UI for quadratic graphs

### Patch Changes

- [#1470](#1470)
[`942b0a9a5`](942b0a9)
Thanks [@nishasy](https://github.com/nishasy)! - [Interactive Graph
Locked Figures] Remove m2 flag from the code


- [#1465](#1465)
[`94ad04fee`](94ad04f)
Thanks [@nishasy](https://github.com/nishasy)! - [Hint Mode: Start
Coords] Add separate flags for graph types


- [#1432](#1432)
[`ed6737025`](ed67370)
Thanks [@SonicScrewdriver](https://github.com/SonicScrewdriver)! - Bug
fix to ensure that new angle graphs are scored correctly.

## @khanacademy/[email protected]

### Minor Changes

- [#1468](#1468)
[`af68a9e08`](af68a9e)
Thanks [@nishasy](https://github.com/nishasy)! - [Hint Mode: Start
Coords] Add start coords UI for sinusoid graphs


- [#1469](#1469)
[`6e1ec850c`](6e1ec85)
Thanks [@nishasy](https://github.com/nishasy)! - [Hint Mode: Start
Coords] Add start coords UI for quadratic graphs

### Patch Changes

- [#1470](#1470)
[`942b0a9a5`](942b0a9)
Thanks [@nishasy](https://github.com/nishasy)! - [Interactive Graph
Locked Figures] Remove m2 flag from the code


- [#1465](#1465)
[`94ad04fee`](94ad04f)
Thanks [@nishasy](https://github.com/nishasy)! - [Hint Mode: Start
Coords] Add separate flags for graph types

- Updated dependencies
\[[`af68a9e08`](af68a9e),
[`942b0a9a5`](942b0a9),
[`6e1ec850c`](6e1ec85),
[`94ad04fee`](94ad04f),
[`ed6737025`](ed67370)]:
    -   @khanacademy/[email protected]
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.

3 participants