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 deprecated/unused support for examples in Renderer (keeping for numeric-input though) #1961

Merged
merged 4 commits into from
Dec 6, 2024

Conversation

jeremywiebe
Copy link
Collaborator

@jeremywiebe jeremywiebe commented Dec 6, 2024

Summary:

While working on SSS, I came across the examples() function on the Renderer that was causing me issues (with threading client-side validation in).

I checked and it is no longer used anywhere. Note that the input-number and numeric-input use their local examples() functions still to pass a set of examples to the InputWithExamples component, which we're keeping.

Implemented in D2749

Issue: LEMS-2561

Test plan:

yarn test
yarn typecheck
Checked in host webapp and the function is not used.

@jeremywiebe jeremywiebe self-assigned this Dec 6, 2024
Copy link
Contributor

github-actions bot commented Dec 6, 2024

npm Snapshot: Published

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

Example:

yarn add @khanacademy/perseus@PR1961

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

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

Copy link
Contributor

github-actions bot commented Dec 6, 2024

Size Change: 0 B

Total Size: 1.29 MB

ℹ️ 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 697 kB
packages/perseus-linter/dist/es/index.js 22.2 kB
packages/perseus/dist/es/index.js 425 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

@@ -123,8 +123,11 @@ export class NumericInput
isFocused: false,
};

// TODO(Nicole, Jeremy): This is maybe never used and should be removed
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is used, but only internal to the widget.

@jeremywiebe jeremywiebe marked this pull request as ready for review December 6, 2024 02:53
@khan-actions-bot khan-actions-bot requested a review from a team December 6, 2024 02:53
@khan-actions-bot
Copy link
Contributor

Gerald

Required Reviewers
  • @Khan/perseus for changes to .changeset/orange-wombats-destroy.md, packages/perseus/src/renderer.tsx, packages/perseus/src/types.ts, packages/perseus/src/__tests__/renderer.test.tsx, packages/perseus/src/widgets/input-number/input-number.tsx, packages/perseus/src/widgets/numeric-input/numeric-input.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

@handeyeco handeyeco left a comment

Choose a reason for hiding this comment

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

Nice, love to see a smaller external API

@jeremywiebe jeremywiebe merged commit d93e3ec into main Dec 6, 2024
16 checks passed
@jeremywiebe jeremywiebe deleted the jer/no-mo-examples branch December 6, 2024 16:43
jeremywiebe pushed a commit that referenced this pull request Dec 6, 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]

### Major Changes

-   [#1962](#1962) [`435280ac4`](435280a) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Move scoring utility functions out of `Util` object into their own file and only export externally used function (`keScoreFromPerseusScore`)


-   [#1961](#1961) [`d93e3ecde`](d93e3ec) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Remove deprecated/unused `examples()` function from `Renderer`

## @khanacademy/[email protected]

### Patch Changes

-   Updated dependencies \[[`435280ac4`](435280a), [`d93e3ecde`](d93e3ec)]:
    -   @khanacademy/[email protected]

Author: khan-actions-bot

Reviewers: jeremywiebe

Required Reviewers:

Approved By: jeremywiebe

Checks: ⏭️  Publish npm snapshot, ✅ Cypress (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ gerald

Pull Request URL: #1964
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