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

Remove scoreInput #1973

Merged
merged 13 commits into from
Dec 12, 2024
Merged

Remove scoreInput #1973

merged 13 commits into from
Dec 12, 2024

Conversation

handeyeco
Copy link
Contributor

@handeyeco handeyeco commented Dec 10, 2024

Summary:

Remove scoreInput from ServerItemRenderer. This was marked as deprecated and uses of it in Webapp have been removed in favor of scorePerseusItem.

Test plan:

This was an external-facing API and usage was already removed. At this point it's just dead code, so I'm not sure what would need to be tested.

@handeyeco handeyeco self-assigned this Dec 10, 2024
@handeyeco handeyeco changed the title remove scoring things again Remove scoreInput Dec 10, 2024
@handeyeco handeyeco changed the title Remove scoreInput WIP: Remove scoreInput Dec 10, 2024
Copy link
Contributor

github-actions bot commented Dec 10, 2024

npm Snapshot: Published

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

Example:

yarn add @khanacademy/perseus@PR1973

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

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

Copy link
Contributor

github-actions bot commented Dec 10, 2024

Size Change: -410 B (-0.03%)

Total Size: 1.27 MB

Filename Size Change
packages/perseus/dist/es/index.js 415 kB -410 B (-0.1%)
ℹ️ 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 77.9 kB
packages/math-input/dist/es/strings.js 1.79 kB
packages/perseus-core/dist/es/index.js 1.48 kB
packages/perseus-editor/dist/es/index.js 688 kB
packages/perseus-linter/dist/es/index.js 22.2 kB
packages/perseus/dist/es/strings.js 3.7 kB
packages/pure-markdown/dist/es/index.js 3.66 kB
packages/simple-markdown/dist/es/index.js 12.5 kB

compressed-size-action

@handeyeco handeyeco changed the title WIP: Remove scoreInput Remove scoreInput Dec 10, 2024
@handeyeco handeyeco requested review from a team December 10, 2024 21:39
@@ -118,31 +118,6 @@ describe("server item renderer", () => {
expect(screen.getByRole("textbox")).toBeVisible();
});

it("should be invalid if no input provided", async () => {
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 don't like deleting tests, but these seem to be specifically focused on testing SIR's ability to score.

@@ -165,9 +165,6 @@ function scoreExpression(
// We matched a graded answer form, so we can now tell the user
// whether their input was correct or incorrect, and hand out
// points accordingly
// TODO(eater): Seems silly to translate result to this
Copy link
Contributor Author

Choose a reason for hiding this comment

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

idk, I think we're past the point of doing anything about this since this is from the Eater era.

Base automatically changed from rm-multirenderer to main December 11, 2024 12:50
## Summary:
Remove `guessAndScore` from Renderer. This hasn't been used in learner-facing logic for a little bit now. The bulk of this PR is updating internal usage - tools for testing exercise correctness were using this (specifically in Cypress and our custom matchers for Jest); so most of the work was porting tests to use `scorePerseusItem` instead.

## Test plan:
From a learner's perspective, this is dead code. So while this is a major API change, it's mostly removing dead code and updating tests. Tests should continue to run successfully.

Author: handeyeco

Reviewers: handeyeco, Myranae, jeremywiebe

Required Reviewers:

Approved By: Myranae, jeremywiebe

Checks: ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ⏹️  [cancelled] Publish npm snapshot (ubuntu-latest, 20.x), ⏹️  [cancelled] Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ⏹️  [cancelled] Check builds for changes in size (ubuntu-latest, 20.x), ⏹️  [cancelled] Cypress (ubuntu-latest, 20.x), ⏹️  [cancelled] Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x)

Pull Request URL: #1974
@handeyeco handeyeco merged commit f990672 into main Dec 12, 2024
8 checks passed
@handeyeco handeyeco deleted the remove-scoreinput2 branch December 12, 2024 13:33
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