diff --git a/.changeset/bright-dragons-reflect.md b/.changeset/bright-dragons-reflect.md deleted file mode 100644 index c42a325d1f..0000000000 --- a/.changeset/bright-dragons-reflect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@khanacademy/perseus": minor ---- - -add aria label and description to angle graph diff --git a/.changeset/shiny-fireants-jump.md b/.changeset/shiny-fireants-jump.md deleted file mode 100644 index 083d6cb403..0000000000 --- a/.changeset/shiny-fireants-jump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@khanacademy/perseus": patch ---- - -Add aria label to angle graph diff --git a/.changeset/soft-lizards-lie.md b/.changeset/soft-lizards-lie.md new file mode 100644 index 0000000000..4aabbd4f81 --- /dev/null +++ b/.changeset/soft-lizards-lie.md @@ -0,0 +1,6 @@ +--- +"@khanacademy/perseus": patch +"@khanacademy/perseus-editor": patch +--- + +[Interactive Graph][axis labels] Make default x & y axis labels TeX on load diff --git a/config/build/CHANGELOG.md b/config/build/CHANGELOG.md index 517bd1d59f..2fe41ed999 100644 --- a/config/build/CHANGELOG.md +++ b/config/build/CHANGELOG.md @@ -1,5 +1,11 @@ # perseus-build-settings +## 0.4.2 + +### Patch Changes + +- [#2027](https://github.com/Khan/perseus/pull/2027) [`368e222a6`](https://github.com/Khan/perseus/commit/368e222a6577dff38143d1584d6773129e8abbd7) Thanks [@handeyeco](https://github.com/handeyeco)! - Bump all packages to reset releases + ## 0.4.1 ### Patch Changes diff --git a/config/build/package.json b/config/build/package.json index 0153142312..a9d2ada7fa 100644 --- a/config/build/package.json +++ b/config/build/package.json @@ -1,6 +1,6 @@ { "name": "perseus-build-settings", - "version": "0.4.1", + "version": "0.4.2", "license": "MIT", "private": true } diff --git a/dev/CHANGELOG.md b/dev/CHANGELOG.md index c67bbb6c42..38e41f6f2b 100644 --- a/dev/CHANGELOG.md +++ b/dev/CHANGELOG.md @@ -1,5 +1,33 @@ # @khanacademy/perseus-dev-ui +## 5.0.5 + +### Patch Changes + +- Updated dependencies [[`762b295ec`](https://github.com/Khan/perseus/commit/762b295eccd7d0dbc344edd271d3300b506adb93)]: + - @khanacademy/kas@0.4.7 + - @khanacademy/kmath@0.1.21 + - @khanacademy/math-input@22.0.4 + - @khanacademy/perseus-core@3.0.3 + - @khanacademy/perseus-linter@1.2.9 + - @khanacademy/pure-markdown@0.3.18 + - @khanacademy/simple-markdown@0.13.11 + +## 5.0.4 + +### Patch Changes + +- [#2027](https://github.com/Khan/perseus/pull/2027) [`368e222a6`](https://github.com/Khan/perseus/commit/368e222a6577dff38143d1584d6773129e8abbd7) Thanks [@handeyeco](https://github.com/handeyeco)! - Bump all packages to reset releases + +- Updated dependencies [[`368e222a6`](https://github.com/Khan/perseus/commit/368e222a6577dff38143d1584d6773129e8abbd7)]: + - @khanacademy/kas@0.4.6 + - @khanacademy/kmath@0.1.20 + - @khanacademy/math-input@22.0.3 + - @khanacademy/perseus-core@3.0.2 + - @khanacademy/perseus-linter@1.2.8 + - @khanacademy/pure-markdown@0.3.17 + - @khanacademy/simple-markdown@0.13.10 + ## 5.0.3 ### Patch Changes diff --git a/dev/package.json b/dev/package.json index 93966f47ca..493cd2c038 100644 --- a/dev/package.json +++ b/dev/package.json @@ -3,7 +3,7 @@ "description": "Perseus dev UI", "author": "Khan Academy", "license": "MIT", - "version": "5.0.3", + "version": "5.0.5", "private": true, "repository": { "type": "git", @@ -14,13 +14,13 @@ "dev": "vite" }, "dependencies": { - "@khanacademy/kas": "^0.4.5", - "@khanacademy/kmath": "^0.1.19", - "@khanacademy/math-input": "^22.0.2", - "@khanacademy/perseus-core": "3.0.1", - "@khanacademy/perseus-linter": "^1.2.7", - "@khanacademy/pure-markdown": "^0.3.16", - "@khanacademy/simple-markdown": "^0.13.9", + "@khanacademy/kas": "^0.4.7", + "@khanacademy/kmath": "^0.1.21", + "@khanacademy/math-input": "^22.0.4", + "@khanacademy/perseus-core": "3.0.3", + "@khanacademy/perseus-linter": "^1.2.9", + "@khanacademy/pure-markdown": "^0.3.18", + "@khanacademy/simple-markdown": "^0.13.11", "@khanacademy/wonder-blocks-banner": "4.0.3", "@khanacademy/wonder-blocks-icon": "5.0.3", "@khanacademy/wonder-blocks-icon-button": "6.0.3", diff --git a/packages/kas/CHANGELOG.md b/packages/kas/CHANGELOG.md index af10004f7c..e49d3e8ef7 100644 --- a/packages/kas/CHANGELOG.md +++ b/packages/kas/CHANGELOG.md @@ -1,5 +1,23 @@ # @khanacademy/kas +## 0.4.7 + +### Patch Changes + +- [#2028](https://github.com/Khan/perseus/pull/2028) [`762b295ec`](https://github.com/Khan/perseus/commit/762b295eccd7d0dbc344edd271d3300b506adb93) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Forcing release + +- Updated dependencies [[`762b295ec`](https://github.com/Khan/perseus/commit/762b295eccd7d0dbc344edd271d3300b506adb93)]: + - @khanacademy/perseus-core@3.0.3 + +## 0.4.6 + +### Patch Changes + +- [#2027](https://github.com/Khan/perseus/pull/2027) [`368e222a6`](https://github.com/Khan/perseus/commit/368e222a6577dff38143d1584d6773129e8abbd7) Thanks [@handeyeco](https://github.com/handeyeco)! - Bump all packages to reset releases + +- Updated dependencies [[`368e222a6`](https://github.com/Khan/perseus/commit/368e222a6577dff38143d1584d6773129e8abbd7)]: + - @khanacademy/perseus-core@3.0.2 + ## 0.4.5 ### Patch Changes diff --git a/packages/kas/package.json b/packages/kas/package.json index 9d01e17f6c..b25c05d87d 100644 --- a/packages/kas/package.json +++ b/packages/kas/package.json @@ -3,7 +3,7 @@ "description": "A lightweight JavaScript CAS for comparing expressions and equations.", "author": "Khan Academy", "license": "MIT", - "version": "0.4.5", + "version": "0.4.7", "publishConfig": { "access": "public" }, @@ -26,11 +26,11 @@ "test": "bash -c 'yarn --silent --cwd \"../..\" test ${@:0} $($([[ ${@: -1} = -* ]] || [[ ${@: -1} = bash ]]) && echo $PWD)'" }, "dependencies": { - "@khanacademy/perseus-core": "3.0.1" + "@khanacademy/perseus-core": "3.0.3" }, "devDependencies": { "jison": "0.4.15", - "perseus-build-settings": "^0.4.1", + "perseus-build-settings": "^0.4.2", "underscore": "1.4.4" }, "peerDependencies": { diff --git a/packages/kas/src/nodes.ts b/packages/kas/src/nodes.ts index 12a6d5a4d0..bf4c5a9823 100644 --- a/packages/kas/src/nodes.ts +++ b/packages/kas/src/nodes.ts @@ -1,6 +1,6 @@ /* eslint-disable prettier/prettier */ /* eslint-disable import/order */ -/* TODO(charlie): fix these lint errors (http://eslint.org/docs/rules): */ +/* TODO: fix these lint errors (http://eslint.org/docs/rules): */ /* eslint-disable indent, no-undef, no-var, no-dupe-keys, no-new-func, no-redeclare, comma-dangle, max-len, prefer-spread, space-infix-ops, space-unary-ops */ import _ from "underscore"; diff --git a/packages/keypad-context/CHANGELOG.md b/packages/keypad-context/CHANGELOG.md index 4d16b550ec..3e53da4562 100644 --- a/packages/keypad-context/CHANGELOG.md +++ b/packages/keypad-context/CHANGELOG.md @@ -1,5 +1,23 @@ # @khanacademy/keypad-context +## 1.0.9 + +### Patch Changes + +- [#2028](https://github.com/Khan/perseus/pull/2028) [`762b295ec`](https://github.com/Khan/perseus/commit/762b295eccd7d0dbc344edd271d3300b506adb93) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Forcing release + +- Updated dependencies [[`762b295ec`](https://github.com/Khan/perseus/commit/762b295eccd7d0dbc344edd271d3300b506adb93)]: + - @khanacademy/perseus-core@3.0.3 + +## 1.0.8 + +### Patch Changes + +- [#2027](https://github.com/Khan/perseus/pull/2027) [`368e222a6`](https://github.com/Khan/perseus/commit/368e222a6577dff38143d1584d6773129e8abbd7) Thanks [@handeyeco](https://github.com/handeyeco)! - Bump all packages to reset releases + +- Updated dependencies [[`368e222a6`](https://github.com/Khan/perseus/commit/368e222a6577dff38143d1584d6773129e8abbd7)]: + - @khanacademy/perseus-core@3.0.2 + ## 1.0.7 ### Patch Changes diff --git a/packages/keypad-context/package.json b/packages/keypad-context/package.json index 2b8fad6afe..a5b3a8ab46 100644 --- a/packages/keypad-context/package.json +++ b/packages/keypad-context/package.json @@ -3,7 +3,7 @@ "description": "Perseus keypad context", "author": "Khan Academy", "license": "MIT", - "version": "1.0.7", + "version": "1.0.9", "publishConfig": { "access": "public" }, @@ -25,7 +25,7 @@ "test": "bash -c 'yarn --silent --cwd \"../..\" test ${@:0} $($([[ ${@: -1} = -* ]] || [[ ${@: -1} = bash ]]) && echo $PWD)'" }, "dependencies": { - "@khanacademy/perseus-core": "3.0.1" + "@khanacademy/perseus-core": "3.0.3" }, "devDependencies": { "react": "^18.2.0" diff --git a/packages/kmath/CHANGELOG.md b/packages/kmath/CHANGELOG.md index 69140a12c7..ba9e40ceac 100644 --- a/packages/kmath/CHANGELOG.md +++ b/packages/kmath/CHANGELOG.md @@ -1,5 +1,23 @@ # @khanacademy/kmath +## 0.1.21 + +### Patch Changes + +- [#2028](https://github.com/Khan/perseus/pull/2028) [`762b295ec`](https://github.com/Khan/perseus/commit/762b295eccd7d0dbc344edd271d3300b506adb93) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Forcing release + +- Updated dependencies [[`762b295ec`](https://github.com/Khan/perseus/commit/762b295eccd7d0dbc344edd271d3300b506adb93)]: + - @khanacademy/perseus-core@3.0.3 + +## 0.1.20 + +### Patch Changes + +- [#2027](https://github.com/Khan/perseus/pull/2027) [`368e222a6`](https://github.com/Khan/perseus/commit/368e222a6577dff38143d1584d6773129e8abbd7) Thanks [@handeyeco](https://github.com/handeyeco)! - Bump all packages to reset releases + +- Updated dependencies [[`368e222a6`](https://github.com/Khan/perseus/commit/368e222a6577dff38143d1584d6773129e8abbd7)]: + - @khanacademy/perseus-core@3.0.2 + ## 0.1.19 ### Patch Changes diff --git a/packages/kmath/package.json b/packages/kmath/package.json index 95971e0fc2..23bcbfbdb9 100644 --- a/packages/kmath/package.json +++ b/packages/kmath/package.json @@ -3,7 +3,7 @@ "description": "Khan Academy's Javascript Numeric Math Utilities", "author": "Khan Academy", "license": "MIT", - "version": "0.1.19", + "version": "0.1.21", "publishConfig": { "access": "public" }, @@ -24,10 +24,10 @@ "test": "bash -c 'yarn --silent --cwd \"../..\" test ${@:0} $($([[ ${@: -1} = -* ]] || [[ ${@: -1} = bash ]]) && echo $PWD)'" }, "dependencies": { - "@khanacademy/perseus-core": "3.0.1" + "@khanacademy/perseus-core": "3.0.3" }, "devDependencies": { - "perseus-build-settings": "^0.4.1", + "perseus-build-settings": "^0.4.2", "underscore": "1.4.4" }, "peerDependencies": { diff --git a/packages/math-input/CHANGELOG.md b/packages/math-input/CHANGELOG.md index 5020d7ff97..8d1f590423 100644 --- a/packages/math-input/CHANGELOG.md +++ b/packages/math-input/CHANGELOG.md @@ -1,5 +1,25 @@ # @khanacademy/math-input +## 22.0.4 + +### Patch Changes + +- [#2028](https://github.com/Khan/perseus/pull/2028) [`762b295ec`](https://github.com/Khan/perseus/commit/762b295eccd7d0dbc344edd271d3300b506adb93) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Forcing release + +- Updated dependencies [[`762b295ec`](https://github.com/Khan/perseus/commit/762b295eccd7d0dbc344edd271d3300b506adb93)]: + - @khanacademy/keypad-context@1.0.9 + - @khanacademy/perseus-core@3.0.3 + +## 22.0.3 + +### Patch Changes + +- [#2027](https://github.com/Khan/perseus/pull/2027) [`368e222a6`](https://github.com/Khan/perseus/commit/368e222a6577dff38143d1584d6773129e8abbd7) Thanks [@handeyeco](https://github.com/handeyeco)! - Bump all packages to reset releases + +- Updated dependencies [[`368e222a6`](https://github.com/Khan/perseus/commit/368e222a6577dff38143d1584d6773129e8abbd7)]: + - @khanacademy/keypad-context@1.0.8 + - @khanacademy/perseus-core@3.0.2 + ## 22.0.2 ### Patch Changes diff --git a/packages/math-input/package.json b/packages/math-input/package.json index 52e30a3f49..762156a0cb 100644 --- a/packages/math-input/package.json +++ b/packages/math-input/package.json @@ -3,7 +3,7 @@ "description": "Khan Academy's new expression editor for the mobile web.", "author": "Khan Academy", "license": "MIT", - "version": "22.0.2", + "version": "22.0.4", "publishConfig": { "access": "public" }, @@ -38,8 +38,8 @@ ], "scripts": {}, "dependencies": { - "@khanacademy/keypad-context": "^1.0.7", - "@khanacademy/perseus-core": "3.0.1", + "@khanacademy/keypad-context": "^1.0.9", + "@khanacademy/perseus-core": "3.0.3", "mathquill": "https://github.com/Khan/mathquill/releases/download/v1.0.0/mathquill-v1.0.0.tgz" }, "devDependencies": { @@ -54,7 +54,7 @@ "aphrodite": "^1.2.5", "jquery": "^2.1.1", "katex": "0.11.1", - "perseus-build-settings": "^0.4.1", + "perseus-build-settings": "^0.4.2", "prop-types": "15.6.1", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/packages/perseus-core/CHANGELOG.md b/packages/perseus-core/CHANGELOG.md index 38353c1871..5b5ed329d0 100644 --- a/packages/perseus-core/CHANGELOG.md +++ b/packages/perseus-core/CHANGELOG.md @@ -1,5 +1,17 @@ # @khanacademy/perseus-core +## 3.0.3 + +### Patch Changes + +- [#2028](https://github.com/Khan/perseus/pull/2028) [`762b295ec`](https://github.com/Khan/perseus/commit/762b295eccd7d0dbc344edd271d3300b506adb93) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Forcing release + +## 3.0.2 + +### Patch Changes + +- [#2027](https://github.com/Khan/perseus/pull/2027) [`368e222a6`](https://github.com/Khan/perseus/commit/368e222a6577dff38143d1584d6773129e8abbd7) Thanks [@handeyeco](https://github.com/handeyeco)! - Bump all packages to reset releases + ## 3.0.1 ### Patch Changes diff --git a/packages/perseus-core/package.json b/packages/perseus-core/package.json index 62fb935662..b3ae2af574 100644 --- a/packages/perseus-core/package.json +++ b/packages/perseus-core/package.json @@ -3,7 +3,7 @@ "description": "Shared Perseus infrastructure", "author": "Khan Academy", "license": "MIT", - "version": "3.0.1", + "version": "3.0.3", "publishConfig": { "access": "public" }, diff --git a/packages/perseus-editor/CHANGELOG.md b/packages/perseus-editor/CHANGELOG.md index 624621c207..5ac97b70b6 100644 --- a/packages/perseus-editor/CHANGELOG.md +++ b/packages/perseus-editor/CHANGELOG.md @@ -1,5 +1,35 @@ # @khanacademy/perseus-editor +## 17.0.5 + +### Patch Changes + +- [#2028](https://github.com/Khan/perseus/pull/2028) [`762b295ec`](https://github.com/Khan/perseus/commit/762b295eccd7d0dbc344edd271d3300b506adb93) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Forcing release + +- Updated dependencies [[`762b295ec`](https://github.com/Khan/perseus/commit/762b295eccd7d0dbc344edd271d3300b506adb93)]: + - @khanacademy/kas@0.4.7 + - @khanacademy/keypad-context@1.0.9 + - @khanacademy/kmath@0.1.21 + - @khanacademy/math-input@22.0.4 + - @khanacademy/perseus@49.1.1 + - @khanacademy/perseus-core@3.0.3 + - @khanacademy/pure-markdown@0.3.18 + +## 17.0.4 + +### Patch Changes + +- [#2027](https://github.com/Khan/perseus/pull/2027) [`368e222a6`](https://github.com/Khan/perseus/commit/368e222a6577dff38143d1584d6773129e8abbd7) Thanks [@handeyeco](https://github.com/handeyeco)! - Bump all packages to reset releases + +- Updated dependencies [[`78c5a77ce`](https://github.com/Khan/perseus/commit/78c5a77ce17c5392e5c8ebb1fff8e2ed8a69a0c1), [`37dc680b4`](https://github.com/Khan/perseus/commit/37dc680b4415c9c75bcda39e0440ded55d24d4a1), [`368e222a6`](https://github.com/Khan/perseus/commit/368e222a6577dff38143d1584d6773129e8abbd7)]: + - @khanacademy/perseus@49.1.0 + - @khanacademy/kas@0.4.6 + - @khanacademy/keypad-context@1.0.8 + - @khanacademy/kmath@0.1.20 + - @khanacademy/math-input@22.0.3 + - @khanacademy/perseus-core@3.0.2 + - @khanacademy/pure-markdown@0.3.17 + ## 17.0.3 ### Patch Changes diff --git a/packages/perseus-editor/package.json b/packages/perseus-editor/package.json index 7a1d2f0618..db6db653da 100644 --- a/packages/perseus-editor/package.json +++ b/packages/perseus-editor/package.json @@ -3,7 +3,7 @@ "description": "Perseus editors", "author": "Khan Academy", "license": "MIT", - "version": "17.0.3", + "version": "17.0.5", "publishConfig": { "access": "public" }, @@ -34,17 +34,17 @@ "test": "bash -c 'yarn --silent --cwd \"../..\" test ${@:0} $($([[ ${@: -1} = -* ]] || [[ ${@: -1} = bash ]]) && echo $PWD)'" }, "dependencies": { - "@khanacademy/kas": "^0.4.5", - "@khanacademy/keypad-context": "^1.0.7", - "@khanacademy/kmath": "^0.1.19", - "@khanacademy/math-input": "^22.0.2", - "@khanacademy/perseus": "^49.0.3", - "@khanacademy/perseus-core": "3.0.1", - "@khanacademy/pure-markdown": "^0.3.16", + "@khanacademy/kas": "^0.4.7", + "@khanacademy/keypad-context": "^1.0.9", + "@khanacademy/kmath": "^0.1.21", + "@khanacademy/math-input": "^22.0.4", + "@khanacademy/perseus": "^49.1.1", + "@khanacademy/perseus-core": "3.0.3", + "@khanacademy/pure-markdown": "^0.3.18", "mafs": "^0.19.0" }, "devDependencies": { - "@khanacademy/perseus-linter": "^1.2.7", + "@khanacademy/perseus-linter": "^1.2.9", "@khanacademy/wonder-blocks-accordion": "3.0.1", "@khanacademy/wonder-blocks-banner": "4.0.3", "@khanacademy/wonder-blocks-button": "7.0.3", @@ -66,7 +66,7 @@ "create-react-class": "15.6.3", "jquery": "^2.1.1", "katex": "0.11.1", - "perseus-build-settings": "^0.4.1", + "perseus-build-settings": "^0.4.2", "prop-types": "15.6.1", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.test.tsx b/packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.test.tsx index f9e1884a63..3fa98fbafc 100644 --- a/packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.test.tsx +++ b/packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.test.tsx @@ -548,7 +548,7 @@ describe("InteractiveGraphSettings", () => { await waitFor(() => expect(onChange).toHaveBeenCalledWith( expect.objectContaining({ - labels: ["time", "y"], + labels: ["time", "$y$"], }), undefined, ), @@ -572,7 +572,7 @@ describe("InteractiveGraphSettings", () => { await waitFor(() => expect(onChange).toHaveBeenCalledWith( expect.objectContaining({ - labels: ["x", "count"], + labels: ["$x$", "count"], }), undefined, ), diff --git a/packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx b/packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx index 73a1ef623e..67e023572e 100644 --- a/packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx +++ b/packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx @@ -135,7 +135,7 @@ class InteractiveGraphSettings extends React.Component { interactiveSizes.defaultBoxSizeSmall, interactiveSizes.defaultBoxSizeSmall, ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], range: [ [-10, 10], [-10, 10], diff --git a/packages/perseus-linter/CHANGELOG.md b/packages/perseus-linter/CHANGELOG.md index 8f044876ec..cf913a8811 100644 --- a/packages/perseus-linter/CHANGELOG.md +++ b/packages/perseus-linter/CHANGELOG.md @@ -1,5 +1,23 @@ # @khanacademy/perseus-linter +## 1.2.9 + +### Patch Changes + +- [#2028](https://github.com/Khan/perseus/pull/2028) [`762b295ec`](https://github.com/Khan/perseus/commit/762b295eccd7d0dbc344edd271d3300b506adb93) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Forcing release + +- Updated dependencies [[`762b295ec`](https://github.com/Khan/perseus/commit/762b295eccd7d0dbc344edd271d3300b506adb93)]: + - @khanacademy/perseus-core@3.0.3 + +## 1.2.8 + +### Patch Changes + +- [#2027](https://github.com/Khan/perseus/pull/2027) [`368e222a6`](https://github.com/Khan/perseus/commit/368e222a6577dff38143d1584d6773129e8abbd7) Thanks [@handeyeco](https://github.com/handeyeco)! - Bump all packages to reset releases + +- Updated dependencies [[`368e222a6`](https://github.com/Khan/perseus/commit/368e222a6577dff38143d1584d6773129e8abbd7)]: + - @khanacademy/perseus-core@3.0.2 + ## 1.2.7 ### Patch Changes diff --git a/packages/perseus-linter/package.json b/packages/perseus-linter/package.json index d22cfc2389..9b9f4734dd 100644 --- a/packages/perseus-linter/package.json +++ b/packages/perseus-linter/package.json @@ -3,7 +3,7 @@ "description": "Linter engine for Perseus", "author": "Khan Academy", "license": "MIT", - "version": "1.2.7", + "version": "1.2.9", "publishConfig": { "access": "public" }, @@ -25,10 +25,10 @@ "test": "bash -c 'yarn --silent --cwd \"../..\" test ${@:0} $($([[ ${@: -1} = -* ]] || [[ ${@: -1} = bash ]]) && echo $PWD)'" }, "dependencies": { - "@khanacademy/perseus-core": "3.0.1" + "@khanacademy/perseus-core": "3.0.3" }, "devDependencies": { - "@khanacademy/pure-markdown": "^0.3.16", + "@khanacademy/pure-markdown": "^0.3.18", "prop-types": "15.6.1" }, "peerDependencies": { diff --git a/packages/perseus/CHANGELOG.md b/packages/perseus/CHANGELOG.md index de6a7aed51..e2c241f2a2 100644 --- a/packages/perseus/CHANGELOG.md +++ b/packages/perseus/CHANGELOG.md @@ -1,5 +1,43 @@ # @khanacademy/perseus +## 49.1.1 + +### Patch Changes + +- [#2028](https://github.com/Khan/perseus/pull/2028) [`762b295ec`](https://github.com/Khan/perseus/commit/762b295eccd7d0dbc344edd271d3300b506adb93) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Forcing release + +- Updated dependencies [[`762b295ec`](https://github.com/Khan/perseus/commit/762b295eccd7d0dbc344edd271d3300b506adb93)]: + - @khanacademy/kas@0.4.7 + - @khanacademy/keypad-context@1.0.9 + - @khanacademy/kmath@0.1.21 + - @khanacademy/math-input@22.0.4 + - @khanacademy/perseus-core@3.0.3 + - @khanacademy/perseus-linter@1.2.9 + - @khanacademy/pure-markdown@0.3.18 + - @khanacademy/simple-markdown@0.13.11 + +## 49.1.0 + +### Minor Changes + +- [#2020](https://github.com/Khan/perseus/pull/2020) [`78c5a77ce`](https://github.com/Khan/perseus/commit/78c5a77ce17c5392e5c8ebb1fff8e2ed8a69a0c1) Thanks [@anakaren-rojas](https://github.com/anakaren-rojas)! - add aria label and description to angle graph + +### Patch Changes + +- [#1994](https://github.com/Khan/perseus/pull/1994) [`37dc680b4`](https://github.com/Khan/perseus/commit/37dc680b4415c9c75bcda39e0440ded55d24d4a1) Thanks [@anakaren-rojas](https://github.com/anakaren-rojas)! - Add aria label to angle graph + +* [#2027](https://github.com/Khan/perseus/pull/2027) [`368e222a6`](https://github.com/Khan/perseus/commit/368e222a6577dff38143d1584d6773129e8abbd7) Thanks [@handeyeco](https://github.com/handeyeco)! - Bump all packages to reset releases + +* Updated dependencies [[`368e222a6`](https://github.com/Khan/perseus/commit/368e222a6577dff38143d1584d6773129e8abbd7)]: + - @khanacademy/kas@0.4.6 + - @khanacademy/keypad-context@1.0.8 + - @khanacademy/kmath@0.1.20 + - @khanacademy/math-input@22.0.3 + - @khanacademy/perseus-core@3.0.2 + - @khanacademy/perseus-linter@1.2.8 + - @khanacademy/pure-markdown@0.3.17 + - @khanacademy/simple-markdown@0.13.10 + ## 49.0.3 ### Patch Changes diff --git a/packages/perseus/package.json b/packages/perseus/package.json index 4d7fa99c29..b2bc22905d 100644 --- a/packages/perseus/package.json +++ b/packages/perseus/package.json @@ -3,7 +3,7 @@ "description": "Core Perseus API (includes renderers and widgets)", "author": "Khan Academy", "license": "MIT", - "version": "49.0.3", + "version": "49.1.1", "publishConfig": { "access": "public" }, @@ -40,14 +40,14 @@ "test": "bash -c 'yarn --silent --cwd \"../..\" test ${@:0} $($([[ ${@: -1} = -* ]] || [[ ${@: -1} = bash ]]) && echo $PWD)'" }, "dependencies": { - "@khanacademy/kas": "^0.4.5", - "@khanacademy/keypad-context": "^1.0.7", - "@khanacademy/kmath": "^0.1.19", - "@khanacademy/math-input": "^22.0.2", - "@khanacademy/perseus-core": "3.0.1", - "@khanacademy/perseus-linter": "^1.2.7", - "@khanacademy/pure-markdown": "^0.3.16", - "@khanacademy/simple-markdown": "^0.13.9", + "@khanacademy/kas": "^0.4.7", + "@khanacademy/keypad-context": "^1.0.9", + "@khanacademy/kmath": "^0.1.21", + "@khanacademy/math-input": "^22.0.4", + "@khanacademy/perseus-core": "3.0.3", + "@khanacademy/perseus-linter": "^1.2.9", + "@khanacademy/pure-markdown": "^0.3.18", + "@khanacademy/simple-markdown": "^0.13.11", "@types/classnames": "2.2.0", "@use-gesture/react": "^10.2.27", "mafs": "0.19.0", @@ -82,7 +82,7 @@ "intersection-observer": "^0.12.0", "jquery": "^2.1.1", "lodash.debounce": "^4.0.8", - "perseus-build-settings": "^0.4.1", + "perseus-build-settings": "^0.4.2", "prop-types": "15.6.1", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/packages/perseus/src/widget-ai-utils/interactive-graph/interactive-graph-ai-utils.test.ts b/packages/perseus/src/widget-ai-utils/interactive-graph/interactive-graph-ai-utils.test.ts index c81f0bdce7..b4192eae7f 100644 --- a/packages/perseus/src/widget-ai-utils/interactive-graph/interactive-graph-ai-utils.test.ts +++ b/packages/perseus/src/widget-ai-utils/interactive-graph/interactive-graph-ai-utils.test.ts @@ -55,7 +55,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }; const userInput: any = { @@ -87,7 +87,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { coords: [ @@ -114,7 +114,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }; const userInput: any = { @@ -140,7 +140,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { center: [1, 1], @@ -163,7 +163,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }; const userInput: any = { @@ -191,7 +191,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { coords: [ @@ -222,7 +222,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }; const userInput: any = { @@ -262,7 +262,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { coords: [ @@ -287,7 +287,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }; const userInput: any = { @@ -313,7 +313,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { coords: [ @@ -341,7 +341,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }; const userInput: any = { @@ -373,7 +373,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { coords: [ @@ -400,7 +400,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }; const userInput: any = { @@ -430,7 +430,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { coords: [ @@ -456,7 +456,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }; const userInput: any = { @@ -484,7 +484,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { coords: [ @@ -510,7 +510,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }; const userInput: any = { @@ -539,7 +539,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { coords: [ @@ -564,7 +564,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }; const userInput: any = { @@ -592,7 +592,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { coords: [ @@ -613,7 +613,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }; const userInput: any = { @@ -658,7 +658,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { coords: [ @@ -702,7 +702,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { center: [0, 0], @@ -739,7 +739,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { coords: [ @@ -778,7 +778,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { coords: [ @@ -823,7 +823,7 @@ describe("InteractiveGraph AI utils", () => { [-4, 4], [-4, 4], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { coords: undefined, @@ -862,7 +862,7 @@ describe("InteractiveGraph AI utils", () => { [-1, 6], [-1, 6], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { coords: [ @@ -902,7 +902,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { coords: [ @@ -943,7 +943,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { coords: [ @@ -984,7 +984,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { coords: [ @@ -1027,7 +1027,7 @@ describe("InteractiveGraph AI utils", () => { [-10, 10], [-10, 10], ], - labels: ["x", "y"], + labels: ["$x$", "$y$"], }, userInput: { coords: [ diff --git a/packages/perseus/src/widgets/interactive-graphs/graphs/linear.test.tsx b/packages/perseus/src/widgets/interactive-graphs/graphs/linear.test.tsx index 5b514f5879..68b87e4a48 100644 --- a/packages/perseus/src/widgets/interactive-graphs/graphs/linear.test.tsx +++ b/packages/perseus/src/widgets/interactive-graphs/graphs/linear.test.tsx @@ -56,36 +56,54 @@ describe("Linear graph screen reader", () => { ); }); - test("should have aria labels and describedbys for both points and grab handle on the line", () => { + test.each` + element | index | expectedValue + ${"point1"} | ${0} | ${"Point 1 at -5 comma 5"} + ${"grabHandle"} | ${1} | ${"Line from -5 comma 5 to 5 comma 5."} + ${"point2"} | ${2} | ${"Point 2 at 5 comma 5"} + `( + "should have aria label for $element on the line", + ({index, expectedValue}) => { + // Arrange + render( + , + ); + + // Act + // Moveable elements: point 1, grab handle, point 2 + const movableElements = screen.getAllByRole("button"); + const element = movableElements[index]; + + // Assert + // Check aria-label and describedby on interactive elements. + // (The actual description text is tested separately below.) + expect(element).toHaveAttribute("aria-label", expectedValue); + }, + ); + + test.each` + element | index + ${"point1"} | ${0} + ${"grabHandle"} | ${1} + ${"point2"} | ${2} + `("should have aria describedby for $element on the line", ({index}) => { // Arrange render(); // Act // Moveable elements: point 1, grab handle, point 2 const movableElements = screen.getAllByRole("button"); - const [point1, grabHandle, point2] = movableElements; + const element = movableElements[index]; // Assert - // Check aria-label and describedby on interactive elements. + // Check aria-describedby on interactive elements. // (The actual description text is tested separately below.) - expect(point1).toHaveAttribute("aria-label", "Point 1 at -5 comma 5"); // We don't know the exact ID because of React.useID(), but we can // check the suffix. - expect(point1.getAttribute("aria-describedby")).toContain("-intercept"); - expect(point1.getAttribute("aria-describedby")).toContain("-slope"); - - expect(grabHandle).toHaveAttribute( - "aria-label", - "Line from -5 comma 5 to 5 comma 5.", - ); - expect(grabHandle.getAttribute("aria-describedby")).toContain( + expect(element.getAttribute("aria-describedby")).toContain( "-intercept", ); - expect(grabHandle.getAttribute("aria-describedby")).toContain("-slope"); - - expect(point2).toHaveAttribute("aria-label", "Point 2 at 5 comma 5"); - expect(point2.getAttribute("aria-describedby")).toContain("-intercept"); - expect(point2.getAttribute("aria-describedby")).toContain("-slope"); + expect(element.getAttribute("aria-describedby")).toContain("-slope"); }); test("points description should include points info", () => { diff --git a/packages/perseus/src/widgets/interactive-graphs/graphs/linear.tsx b/packages/perseus/src/widgets/interactive-graphs/graphs/linear.tsx index 4cc8eff7c0..e3110b2253 100644 --- a/packages/perseus/src/widgets/interactive-graphs/graphs/linear.tsx +++ b/packages/perseus/src/widgets/interactive-graphs/graphs/linear.tsx @@ -61,6 +61,7 @@ const LinearGraph = (props: LinearGraphProps, key: number) => { // Outer line minimal description aria-label={strings.srLinearGraph} aria-describedby={`${pointsDescriptionId} ${interceptDescriptionId} ${slopeDescriptionId}`} + role="figure" >