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

[Interactive Graph] New Axes type for graph markings. #2053

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

catandthemachines
Copy link
Member

@catandthemachines catandthemachines commented Dec 20, 2024

Summary:

At request from content creators they would like to have a new marking type for graph that will show the axes without requiring a full grid.

image
image

Issue: LEMS-2713

Test plan:

Go to: http://localhost:6006/?path=/story/perseuseditor-widgets-interactive-graph--interactive-graph-linear or any other graph editor.
Select Axes option and notice new axes graph markings.

@catandthemachines catandthemachines self-assigned this Dec 20, 2024
Copy link
Contributor

github-actions bot commented Dec 20, 2024

Size Change: +49 B (0%)

Total Size: 1.28 MB

Filename Size Change
packages/perseus-editor/dist/es/index.js 688 kB +11 B (0%)
packages/perseus/dist/es/index.js 419 kB +38 B (+0.01%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 39 kB
packages/keypad-context/dist/es/index.js 760 B
packages/kmath/dist/es/index.js 4.27 kB
packages/math-input/dist/es/index.js 78 kB
packages/math-input/dist/es/strings.js 1.79 kB
packages/perseus-core/dist/es/index.js 1.48 kB
packages/perseus-linter/dist/es/index.js 22.2 kB
packages/perseus/dist/es/strings.js 5.03 kB
packages/pure-markdown/dist/es/index.js 3.67 kB
packages/simple-markdown/dist/es/index.js 12.5 kB

compressed-size-action

@catandthemachines catandthemachines marked this pull request as draft December 20, 2024 19:59
@catandthemachines catandthemachines changed the title [DRAFT] New Axis type for graph markings. [DRAFT] New Axes type for graph markings. Dec 20, 2024
Copy link
Contributor

npm Snapshot: Published

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

Example:

yarn add @khanacademy/perseus@PR2053

If you are working in Khan Academy's webapp, you can run:

./dev/tools/bump_perseus_version.sh -t PR2053

@catandthemachines catandthemachines changed the title [DRAFT] New Axes type for graph markings. [Interactive Graph] New Axes type for graph markings. Jan 7, 2025
@catandthemachines catandthemachines marked this pull request as ready for review January 7, 2025 00:38
Comment on lines 76 to 82
/**
* The type of markings to display on the graph.
* - axes: shows the axes without the gride lines
* - graph: shows the axes and the grid lines
* - grid: shows only the grid lines
* - none: shows no markings
*/
Copy link
Member

Choose a reason for hiding this comment

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

Since the possible values are not actually defined on this line anymore, it seems like this comment might drift out of sync with the code. How would you feel about documenting the different values where MarkingsType is defined (in perseus-types.ts)?

Copy link
Member

@benchristel benchristel left a comment

Choose a reason for hiding this comment

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

The code looks good! I think we should probably have a visual test for the axes option, in interactive-graph-regression.stories.ts.

Writing that test will probably involve updating interactive-graph-question-builder.ts as well, which currently has hardcoded "grid" | "graph" | "none".

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.

2 participants