From 5b6b976416f885c08bda2ead5948fcdbe94dc380 Mon Sep 17 00:00:00 2001 From: Matthew Date: Tue, 13 Aug 2024 14:17:26 -0500 Subject: [PATCH] make the trig buttons real text so they can be translated (#1497) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary: It looks basically the same, but now it can be translated. Previously "sin", "cos", and "tan" were SVGs. Screenshot 2024-08-07 at 2 32 50 PM Issue: LEMS-1621 ## Test plan: Author: handeyeco Reviewers: benchristel Required Reviewers: Approved By: benchristel Checks: ✅ codecov/project, ✅ codecov/patch, ✅ Upload Coverage (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Jest Coverage (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Cypress (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, ✅ Upload Coverage (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Jest Coverage (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ gerald Pull Request URL: https://github.com/Khan/perseus/pull/1497 --- .changeset/chilly-eagles-fry.md | 5 ++ .../__snapshots__/keypad.test.tsx.snap | 80 +++++++++---------- .../__snapshots__/mobile-keypad.test.tsx.snap | 32 ++++---- .../src/components/keypad/button-assets.tsx | 49 ++---------- .../src/components/keypad/keypad-button.tsx | 1 + packages/math-input/src/strings.ts | 21 +++++ 6 files changed, 88 insertions(+), 100 deletions(-) create mode 100644 .changeset/chilly-eagles-fry.md diff --git a/.changeset/chilly-eagles-fry.md b/.changeset/chilly-eagles-fry.md new file mode 100644 index 0000000000..533fecffa2 --- /dev/null +++ b/.changeset/chilly-eagles-fry.md @@ -0,0 +1,5 @@ +--- +"@khanacademy/math-input": patch +--- + +Switch trig keys from SVG to text diff --git a/packages/math-input/src/components/keypad/__tests__/__snapshots__/keypad.test.tsx.snap b/packages/math-input/src/components/keypad/__tests__/__snapshots__/keypad.test.tsx.snap index bcb11f03e6..e149a9ebdc 100644 --- a/packages/math-input/src/components/keypad/__tests__/__snapshots__/keypad.test.tsx.snap +++ b/packages/math-input/src/components/keypad/__tests__/__snapshots__/keypad.test.tsx.snap @@ -189,7 +189,7 @@ exports[`keypad should snapshot expanded: first render 1`] = ` class="default_xu2jcg-o_O-outerBoxBase_3w5jmh" >
); case "TAN": - return ( - - - - ); + return strings.tan; case "COS": - return ( - - - - ); + return strings.cos; case "SIN": - return ( - - - - ); + return strings.sin; case "EQUAL": return (