-
Notifications
You must be signed in to change notification settings - Fork 359
[Explanation] Create explanation widget generator for testdata #3104
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
Conversation
… widget generator for testdata
…eric input widget generator for testdata
…meric-input-generator
…et generator for testdata
…meric-input-generator
…meric-input-generator
…meric-input-generator
…tion widget generator for testdata
🗄️ Schema Change: No Changes ✅ |
🛠️ Item Splitting: No Changes ✅ |
|
Size Change: +51 B (+0.01%) Total Size: 499 kB
ℹ️ View Unchanged
|
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (7449b8c) and published it to npm. You Example: pnpm add @khanacademy/perseus@PR3104If you are working in Khan Academy's frontend, you can run the below command. ./dev/tools/bump_perseus_version.ts -t PR3104If you are working in Khan Academy's webapp, you can run the below command. ./dev/tools/bump_perseus_version.js -t PR3104 |
Myranae
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.
Looks good! Just had a couple small comments :)
| }; | ||
|
|
||
| describe("generateExplanationOptions", () => { | ||
| it("builds a default explanation options", () => { |
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.
| it("builds a default explanation options", () => { | |
| it("builds a default explanation options object", () => { |
| }, | ||
| alignment: "default", | ||
| }, | ||
| widgets: {}, |
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.
Is this something that is included in the default options?
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.
Yes! This is the default options object inside Explanation's widgetLogic:
const defaultWidgetOptions: ExplanationDefaultWidgetOptions = {
showPrompt: "Explain",
hidePrompt: "Hide explanation",
explanation: "explanation goes here\n\nmore explanation",
widgets: {},
};
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.
OH I see. I can remove it.
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.
Do you need to add it here then if it gets added via the generate functions?
Summary:
Create a generator for the Explanation widget to make testdata easier to read and write.
Issue: https://khanacademy.atlassian.net/browse/LEMS-3771
Test plan:
pnpm jest