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

Add linter to check Expression button sets #1531

Merged
merged 3 commits into from
Aug 22, 2024

Conversation

handeyeco
Copy link
Contributor

@handeyeco handeyeco commented Aug 19, 2024

Summary:

Checks Expression answers to see if they require a symbol that's not available to the keypad.

Issue: LEMS-2199

Test plan:

  • Make an Expression widget in the content editor
  • Add \\sqrt to an answer
  • Make sure the "prealgebra" button set is not enabled
  • You should see a warning that you need to enable "prealgebra"

@handeyeco handeyeco self-assigned this Aug 19, 2024
@khan-actions-bot
Copy link
Contributor

khan-actions-bot commented Aug 19, 2024

Gerald

Required Reviewers
  • @Khan/perseus for changes to .changeset/fluffy-otters-join.md, packages/perseus-linter/src/__tests__/rules.test.ts, packages/perseus-linter/src/rules/all-rules.ts, packages/perseus-linter/src/rules/expression-widget.ts

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

@khan-actions-bot khan-actions-bot requested a review from a team August 19, 2024 20:59
@handeyeco handeyeco changed the title add tests for rule Add linter to check Expression button sets Aug 19, 2024
Copy link
Contributor

github-actions bot commented Aug 19, 2024

npm Snapshot: Published

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

Example:

yarn add @khanacademy/perseus@PR1531

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

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

Copy link
Contributor

github-actions bot commented Aug 19, 2024

Size Change: +409 B (+0.05%)

Total Size: 854 kB

Filename Size Change
packages/perseus-linter/dist/es/index.js 22.1 kB +409 B (+1.89%)
ℹ️ 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-editor/dist/es/index.js 273 kB
packages/perseus/dist/es/index.js 413 kB
packages/perseus/dist/es/strings.js 3.29 kB
packages/pure-markdown/dist/es/index.js 3.67 kB
packages/simple-markdown/dist/es/index.js 12.4 kB

compressed-size-action

Copy link

codecov bot commented Aug 19, 2024

Codecov Report

Attention: Patch coverage is 96.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 70.59%. Comparing base (3044038) to head (9a62e3f).
Report is 40 commits behind head on LEMS-2199/prework.

Files Patch % Lines
...ages/perseus-linter/src/rules/expression-widget.ts 95.83% 2 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##           LEMS-2199/prework    #1531      +/-   ##
=====================================================
- Coverage              71.75%   70.59%   -1.16%     
=====================================================
  Files                    520      514       -6     
  Lines                 106610   105759     -851     
  Branches               11948    11458     -490     
=====================================================
- Hits                   76495    74665    -1830     
- Misses                 30115    31094     +979     

Impacted file tree graph

Files Coverage Δ
packages/perseus-linter/src/rules/all-rules.ts 100.00% <100.00%> (ø)
...ages/perseus-linter/src/rules/expression-widget.ts 95.83% <95.83%> (ø)

... and 83 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 3044038...9a62e3f. Read the comment docs.

@handeyeco handeyeco merged commit 0143421 into LEMS-2199/prework Aug 22, 2024
10 of 11 checks passed
@handeyeco handeyeco deleted the LEMS-2199/add-rule branch August 22, 2024 14:50
handeyeco added a commit that referenced this pull request Aug 22, 2024
## Summary:
Just trying to tidy up before addressing LEMS-2199 ([followup PR](#1531))

Issue: [LEMS-2199](https://khanacademy.atlassian.net/browse/LEMS-2199)

[LEMS-2199]: https://khanacademy.atlassian.net/browse/LEMS-2199?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Author: handeyeco

Reviewers: SonicScrewdriver, benchristel, handeyeco

Required Reviewers:

Approved By: SonicScrewdriver, benchristel

Checks: ✅ codecov/project, ✅ codecov/patch, ✅ Upload Coverage (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Jest Coverage (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ gerald

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