Skip to content

Commit 2684103

Browse files
Modernization and Migration of InputWithExamples to NumericInput folder (#2121)
This PR is part of the Numeric Input Project work. It is being landed onto the `feature/numeric-dx-refactor` branch. This PR contains the following changes: 1. Moves the InputWithExamples component to the NumericInput folder 2. Modernizes InputWithExamples to be a functional component 3. Addition of some comments Video Example of Snapshot Testing: https://github.com/user-attachments/assets/ca917778-50b0-46d2-89d8-dad95d1dadf2 Issue: LEMS-2785 - Ensure all tests pass - Manual testing with PR Snapshot in upstream consumer - Landing onto feature branch that will see full QA regression pass before deployment Author: SonicScrewdriver Reviewers: SonicScrewdriver, mark-fitzgerald Required Reviewers: Approved By: mark-fitzgerald Checks: ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x) Pull Request URL: #2121
1 parent 1b40412 commit 2684103

File tree

7 files changed

+209
-223
lines changed

7 files changed

+209
-223
lines changed

.changeset/rich-flowers-prove.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@khanacademy/math-input": minor
3+
"@khanacademy/perseus": minor
4+
---
5+
6+
Modernization and Migration of InputWithExamples to NumericInput folder

packages/perseus/src/components/input-with-examples.tsx

-213
This file was deleted.

packages/perseus/src/widgets/input-number/input-number.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import * as React from "react";
66
import _ from "underscore";
77

88
import {PerseusI18nContext} from "../../components/i18n-context";
9-
import InputWithExamples from "../../components/input-with-examples";
109
import SimpleKeypadInput from "../../components/simple-keypad-input";
1110
import {ApiOptions} from "../../perseus-api";
1211
import {getPromptJSON as _getPromptJSON} from "../../widget-ai-utils/input-number/input-number-ai-utils";
12+
import InputWithExamples from "../numeric-input/input-with-examples";
1313

1414
import type {PerseusStrings} from "../../strings";
1515
import type {Path, Widget, WidgetExports, WidgetProps} from "../../types";

packages/perseus/src/components/__stories__/input-with-examples.stories.tsx packages/perseus/src/widgets/numeric-input/input-with-examples.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {action} from "@storybook/addon-actions";
22

3-
import InputWithExamples from "../input-with-examples";
3+
import InputWithExamples from "./input-with-examples";
44

55
import type {Meta, StoryObj} from "@storybook/react";
66

0 commit comments

Comments
 (0)