-
Notifications
You must be signed in to change notification settings - Fork 360
Remove Noop #3064
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
base: main
Are you sure you want to change the base?
Remove Noop #3064
Conversation
🗄️ Schema Change: No Changes ✅ |
🛠️ Item Splitting: No Changes ✅ |
|
Size Change: -43 B (-0.01%) Total Size: 498 kB
ℹ️ View Unchanged
|
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (fbdbad1) and published it to npm. You Example: pnpm add @khanacademy/perseus@PR3064If you are working in Khan Academy's frontend, you can run the below command. ./dev/tools/bump_perseus_version.ts -t PR3064If you are working in Khan Academy's webapp, you can run the below command. ./dev/tools/bump_perseus_version.js -t PR3064 |
Remove Noop in favour of using a new isScorable function that checks whether we've registered a scorer for a widget.
…isScorable feature.
aebabdf to
a4f9118
Compare
| registerWidget("sorter", scoreSorter as any, validateSorter as any); | ||
| registerWidget("table", scoreTable as any, validateTable as any); | ||
| registerWidget("deprecated-standin", () => scoreNoop(1) as any); | ||
| registerWidget("measurer", () => scoreNoop(1) as any); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea why the measurer was set to 1 versus the other widgets. I could add a score-measurer file, but I wasn't sure if it would ever actually be required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good. Probably just need to make sure Measurer still works in a ZND before shipping.
handeyeco
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks Third!
| registerWidget("sorter", scoreSorter as any, validateSorter as any); | ||
| registerWidget("table", scoreTable as any, validateTable as any); | ||
| registerWidget("deprecated-standin", () => scoreNoop(1) as any); | ||
| registerWidget("measurer", () => scoreNoop(1) as any); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good. Probably just need to make sure Measurer still works in a ZND before shipping.
Summary:
This PR is part of the cleanup work for Server Side Scoring.
This PR removes scoreNoop and ensures that we're only registering scorers for widgets where necessary. It also creates the new isScorable function for determining whether a widget is scorable or not.
isScorable is exported so that it can be used upstream, for some custom scoring logic in our reporting tools.
Issue: LEMS-2543
Test plan: